Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-web-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
isc-web-vue
Commits
99987d4b
Commit
99987d4b
authored
Oct 21, 2024
by
李少勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改多行组件限制字符行数问题
parent
c02fcfc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
MulRowInput.vue
src/components/business/MulRowInput.vue
+3
-2
No files found.
src/components/business/MulRowInput.vue
View file @
99987d4b
...
@@ -431,8 +431,9 @@ export default {
...
@@ -431,8 +431,9 @@ export default {
let
checkMaxRow
=
_this
.
getCheckMaxRow
?
[
let
checkMaxRow
=
_this
.
getCheckMaxRow
?
[
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
let
scrollHeight
=
_this
.
$refs
.
rootDiv
.
$el
.
getElementsByClassName
(
'el-textarea__inner'
)[
0
].
scrollHeight
let
scrollHeight
=
_this
.
$refs
.
rootDiv
.
$el
.
getElementsByClassName
(
'el-textarea__inner'
)[
0
].
scrollHeight
;
let
curRows
=
Math
.
round
((
scrollHeight
-
10
)
/
19.5
)
let
lineHeight
=
_this
.
difFontSize
?
21
*
1.5
:
13
*
1.5
;
let
curRows
=
Math
.
round
((
scrollHeight
-
10
)
/
lineHeight
)
console
.
log
(
'最大行数校验:'
,
curRows
)
console
.
log
(
'最大行数校验:'
,
curRows
)
if
(
curRows
>
_this
.
rows
)
{
if
(
curRows
>
_this
.
rows
)
{
callback
(
new
Error
(
'输入内容不能超过'
+
_this
.
rows
+
'行'
))
callback
(
new
Error
(
'输入内容不能超过'
+
_this
.
rows
+
'行'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment