浏览代码

fix(textarea): add rows defaults (#1216)

Ymm 3 年之前
父节点
当前提交
789e9ccf83
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/packages/__VUE/textarea/index.vue

+ 3 - 3
src/packages/__VUE/textarea/index.vue

@@ -1,4 +1,4 @@
-, nextTick<template>
+<template>
   <view :class="classes">
   <view :class="classes">
     <textarea
     <textarea
       ref="textareaRef"
       ref="textareaRef"
@@ -44,7 +44,7 @@ export default create({
     },
     },
     rows: {
     rows: {
       type: [String, Number],
       type: [String, Number],
-      default: ''
+      default: '2'
     },
     },
     placeholder: {
     placeholder: {
       type: String,
       type: String,
@@ -109,7 +109,7 @@ export default create({
           height = Math.max(height, minHeight);
           height = Math.max(height, minHeight);
         }
         }
       }
       }
-      if (height && props.rows == '') {
+      if (height) {
         textarea.style.height = height + 'px';
         textarea.style.height = height + 'px';
       }
       }
     };
     };