|
@@ -1,3 +1,5 @@
|
|
|
+import merge from 'element-ui/src/utils/merge';
|
|
|
+
|
|
|
let hiddenTextarea;
|
|
|
|
|
|
const HIDDEN_STYLE = `
|
|
@@ -53,7 +55,8 @@ function calculateNodeStyling(node) {
|
|
|
export default function calcTextareaHeight(
|
|
|
targetNode,
|
|
|
minRows = null,
|
|
|
- maxRows = null
|
|
|
+ maxRows = null,
|
|
|
+ options = null
|
|
|
) {
|
|
|
if (!hiddenTextarea) {
|
|
|
hiddenTextarea = document.createElement('textarea');
|
|
@@ -96,5 +99,5 @@ export default function calcTextareaHeight(
|
|
|
height = Math.min(maxHeight, height);
|
|
|
}
|
|
|
|
|
|
- return { height: height + 'px'};
|
|
|
+ return merge({ height: height + 'px'}, options);
|
|
|
};
|