#
whycq
2022-09-23 d170cf41d68bbb82179fae1b2332a315465ef93b
components/y-input/y-input.vue
@@ -3,7 +3,7 @@
      <view class="main">
         <view class="title item-height">{{titleText}}</view>
         <view class="input item-height">
            <input type="text" :placeholder="placeholderText" @input="input(val)"
            <input type="text" :placeholder="placeholderText" @input="input"
            placeholder-style="font-size:28rpx" v-model="val">
         </view>
      </view>
@@ -22,6 +22,11 @@
            type: [String, Number],
            default: ''
         }
      },
      watch: {
         value(val) {
            this.val = val
         },
      },
      created() {
         this.val = this.value
@@ -43,9 +48,8 @@
         };
      },
      methods: {
         input(val) {
            this.val = val
            this.$emit('input',val);
         input() {
            this.$emit('input',this.val);
         }
      }
   }