| | |
| | | <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> |
| | |
| | | value: { |
| | | type: [String, Number], |
| | | default: '' |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | watch: { |
| | | value(val) { |
| | | this.val = val |
| | | }, |
| | | }, |
| | | created() { |
| | | this.val = this.value |
| | | }, |
| | | computed: { |
| | | titleText() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | input(val) { |
| | | this.val = val |
| | | this.$emit('input',val); |
| | | input() { |
| | | this.$emit('input',this.val); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |