ソースを参照

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">
     <textarea
       ref="textareaRef"
@@ -44,7 +44,7 @@ export default create({
     },
     rows: {
       type: [String, Number],
-      default: ''
+      default: '2'
     },
     placeholder: {
       type: String,
@@ -109,7 +109,7 @@ export default create({
           height = Math.max(height, minHeight);
         }
       }
-      if (height && props.rows == '') {
+      if (height) {
         textarea.style.height = height + 'px';
       }
     };