| | |
| | | <template> |
| | | <view> |
| | | <view class="main"> |
| | | <view class="title item-height">{{titleText}}</view> |
| | | <view class="input item-height"> |
| | | <input type="text" :placeholder="placeholderText" @input="input(val)" |
| | | placeholder-style="font-size:28rpx" v-model="val"> |
| | | <y-title :title="titleText"/> |
| | | <view :class="zBig"> |
| | | <view style="display: flex;" class="input"> |
| | | <input type="text" :placeholder="placeholderText" @input="input" |
| | | placeholder-style="font-size:22rpx" v-model="val"> |
| | | <view class="icons" v-if="val.length" @click="clear"> |
| | | <uni-icons type="close"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | value: { |
| | | type: [String, Number], |
| | | default: '' |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | watch: { |
| | | value(val) { |
| | | this.val = val |
| | | }, |
| | | }, |
| | | created() { |
| | | this.val = this.value |
| | |
| | | placeholderText() { |
| | | return this.placeholder |
| | | }, |
| | | // val() { |
| | | // return this.inputVal || t("uni-popup.inputVal") |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | val:'' |
| | | val:'', |
| | | yBig: { |
| | | height: '100rpx', |
| | | lineHeight: '100rpx', |
| | | width: '100%', |
| | | backgroundColor: '#cccddd' |
| | | |
| | | }, |
| | | zBig: 'small', |
| | | pps: { |
| | | fontSize: '24rpx', |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | input(val) { |
| | | this.val = val |
| | | this.$emit('input',val); |
| | | input() { |
| | | this.$emit('input',this.val); |
| | | }, |
| | | clear() { |
| | | this.val = '' |
| | | this.input() |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .main { |
| | | width: 98%; |
| | | width: 96%; |
| | | min-height: 100rpx; |
| | | background-color: #fff; |
| | | margin: 1%; |
| | | margin: 2%; |
| | | border-radius: 5rpx; |
| | | box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1); |
| | | } |
| | | .title { |
| | | font-size: 32rpx; |
| | | font-weight: bold; |
| | | font-family: Arial, Helvetica, sans-serif; |
| | | text-indent: 1em; |
| | | letter-spacing: 8rpx; |
| | | color: #303133; |
| | | } |
| | | .input { |
| | | font-size: 28rpx; |
| | | color: #606266; |
| | | |
| | | } |
| | | .input input{ |
| | | .input{ |
| | | width: 96%; |
| | | height: 100%; |
| | | margin-left: 2%; |
| | | margin-right: 1%; |
| | | border-radius: 5rpx; |
| | | border: 1px solid #EBEDF0; |
| | | color: #606266; |
| | | /* border: 1px solid #EBEDF0; */ |
| | | background-color: #FAFAFA; |
| | | /* box-shadow: 0 0 10upx rgba(0, 0, 0, 0.2); */ |
| | | font-size: 28rpx; |
| | | text-indent: 8rpx; |
| | | /* letter-spacing: 1rpx; */ |
| | | } |
| | | .item-height { |
| | | input{ |
| | | width: 96%; |
| | | height: 45rpx; |
| | | line-height: 50rpx; |
| | | margin-left: 2%; |
| | | margin-right: 1%; |
| | | border-radius: 5rpx; |
| | | color: #606266; |
| | | /* border: 1px solid #EBEDF0; */ |
| | | /* background-color: #FAFAFA; */ |
| | | font-size: 28rpx; |
| | | text-indent: 8rpx; |
| | | /* letter-spacing: 1rpx; */ |
| | | } |
| | | .icons { |
| | | margin-right: 2% ; |
| | | } |
| | | .big { |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | font-size: 50rpx; |
| | | font-weight: bold; |
| | | } |
| | | .big input { |
| | | height: 75rpx; |
| | | line-height: 75rpx; |
| | | font-size: 38rpx; |
| | | font-weight: 400; |
| | | text-indent: 12rpx; |
| | | } |
| | | .middle { |
| | | height: 65rpx; |
| | | line-height: 65rpx; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | } |
| | | .middle input { |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | } |
| | | .small { |
| | | height: 50rpx; |
| | | line-height: 50rpx; |
| | | } |
| | | .placeholderSmall { |
| | | font-size:22rpx |
| | | } |
| | | </style> |