#
whycq
2022-09-23 66ec61e66cf31508c08b30a28ee0bb64e45f87bb
components/y-input/y-input.vue
@@ -3,7 +3,8 @@
      <view class="main">
         <view class="title item-height">{{titleText}}</view>
         <view class="input item-height">
            <input type="text" :placeholder="placeholderText" placeholder-style="font-size:28rpx" v-model="val">
            <input type="text" :placeholder="placeholderText" @input="input(val)"
            placeholder-style="font-size:28rpx" v-model="val">
         </view>
      </view>
   </view>
@@ -17,8 +18,8 @@
            type: String,
            default: ''
         },
         inputVal: {
            type: String,
         value: {
            type: [String, Number],
            default: ''
         }
      },
@@ -37,6 +38,12 @@
         return {
            val:''
         };
      },
      methods: {
         input(val) {
            this.val = val
            this.$emit('input',val);
         }
      }
   }
</script>