Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
6648c36a
Commit
6648c36a
authored
Aug 25, 2017
by
WittBulter
Committed by
杨奕
Aug 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: fix params type
parent
48135c7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
packages/input/src/calcTextareaHeight.js
packages/input/src/calcTextareaHeight.js
+5
-5
No files found.
packages/input/src/calcTextareaHeight.js
View file @
6648c36a
...
...
@@ -28,8 +28,8 @@ const CONTEXT_STYLE = [
'
box-sizing
'
];
function
calculateNodeStyling
(
node
)
{
const
style
=
window
.
getComputedStyle
(
node
);
function
calculateNodeStyling
(
targetElement
)
{
const
style
=
window
.
getComputedStyle
(
targetElement
);
const
boxSizing
=
style
.
getPropertyValue
(
'
box-sizing
'
);
...
...
@@ -51,7 +51,7 @@ function calculateNodeStyling(node) {
}
export
default
function
calcTextareaHeight
(
target
Node
,
target
Element
,
minRows
=
null
,
maxRows
=
null
)
{
...
...
@@ -65,10 +65,10 @@ export default function calcTextareaHeight(
borderSize
,
boxSizing
,
contextStyle
}
=
calculateNodeStyling
(
target
Node
);
}
=
calculateNodeStyling
(
target
Element
);
hiddenTextarea
.
setAttribute
(
'
style
'
,
`
${
contextStyle
}
;
${
HIDDEN_STYLE
}
`
);
hiddenTextarea
.
value
=
target
Node
.
value
||
targetNode
.
placeholder
||
''
;
hiddenTextarea
.
value
=
target
Element
.
value
||
targetElement
.
placeholder
||
''
;
let
height
=
hiddenTextarea
.
scrollHeight
;
...
...
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