#
whycq
2022-09-23 a8ff66137ee5397527290dd015d9d9ea39065cf4
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"
            placeholder-style="font-size:28rpx" v-model="val">
         </view>
      </view>
   </view>
@@ -17,10 +18,22 @@
            type: String,
            default: ''
         },
         inputVal: {
         value: {
            type: [String, Number],
            default: ''
         },
         placeholder: {
            type: String,
            default: ''
         }
      },
      watch: {
         value(val) {
            this.val = val
         },
      },
      created() {
         this.val = this.value
      },
      computed: {
         titleText() {
@@ -37,6 +50,11 @@
         return {
            val:''
         };
      },
      methods: {
         input() {
            this.$emit('input',this.val);
         }
      }
   }
</script>
@@ -59,18 +77,22 @@
      color: #303133;
   }
   .input {
      font-size: 28rpx;
      font-size: 12rpx;
      color: #606266;
      
   }
   .input input{
      width: 96%;
      height: 45rpx;
      line-height: 50rpx;
      margin-left: 2%;
      margin-right: 1%;
      border-radius: 5rpx;
      border: 1px solid #EBEDF0;
      background-color: #FAFAFA;
      /* box-shadow: 0 0 10upx rgba(0, 0, 0, 0.2); */
      font-size: 28rpx;
      text-indent: 10rpx;
      /* letter-spacing: 1rpx; */
   }
   .item-height {
      height: 50rpx;