| | |
| | | <view class="main"> |
| | | <view class="inner1">{{desc}}</view> |
| | | <view class="put inner2"> |
| | | <input class="p-input" type="text" :placeholder="placeholder" v-model="data" :focus="focusData"> |
| | | <uni-icons class="p-icon" type="closeempty" size="16" color="#707070" |
| | | v-show="data.length" @click="clear"> |
| | | <input class="p-input" |
| | | type="text" |
| | | :placeholder="placeholder" |
| | | v-model="data" |
| | | :focus="focusData" @input="inputVal"> |
| | | |
| | | <uni-icons class="p-icon" |
| | | type="closeempty" |
| | | size="16" |
| | | color="#b9b9b9" |
| | | v-show="data.length" |
| | | @click="clear"> |
| | | </uni-icons> |
| | | </view> |
| | | <view class="inner3" v-show="btn"> |
| | |
| | | }; |
| | | }, |
| | | props: { |
| | | index: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | desc: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | name: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: '请输入' |
| | | default: '扫码 / 录入' |
| | | }, |
| | | value: { |
| | | type: [String,Number], |
| | |
| | | this.$emit('input',val) |
| | | } |
| | | }, |
| | | value(val) { |
| | | this.data = val |
| | | }, |
| | | focus(f) { |
| | | console.log(f); |
| | | this.focusData = !f |
| | | setTimeout(()=>{ |
| | | this.focusData = f |
| | |
| | | }, |
| | | clickBtn() { |
| | | this.$emit('clickBtn'); |
| | | }, |
| | | inputVal() { |
| | | this.$emit('inputVal',[this.data,this.name]); |
| | | } |
| | | } |
| | | } |
| | |
| | | .main { |
| | | display: flex; |
| | | align-items: center; |
| | | min-height: 70rpx; |
| | | min-height: 35px; |
| | | background-color: #FFF; |
| | | margin: 8px; |
| | | /* border-bottom: 1px solid darkgray; */ |
| | | } |
| | | .put { |
| | |
| | | } |
| | | |
| | | .inner1 { |
| | | width: 120rpx; |
| | | width: 65px; |
| | | padding-left: 8px; |
| | | font-weight: 700; |
| | | color: #606164; |
| | | font-weight: 900; |
| | | font-family:'Helvetica Neue'; |
| | | } |
| | | .inner2 { |
| | | background-color: aliceblue; |
| | | background-color: #f1f3f4; |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 5px; |
| | | color: #606266; |
| | | } |
| | | .p-input { |
| | | flex:1; |
| | |
| | | margin-right: 8px; |
| | | } |
| | | .inner3 { |
| | | width: 200rpx; |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .m-btn { |
| | | background-color: #3c9cff; |
| | | background-color: #00aeec; |
| | | color: #FFF; |
| | | } |
| | | .m-btn:active { |