增加设备保养
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<view class="selectView">
|
||||
<picker mode="selector" @change="bindPickerChange" @cancel="pickerHide" :value="value" range-key="name" :range="list" >
|
||||
<view class="pickerBom" @click="pickerClick">
|
||||
<input type="text" :value="text" :placeholder="placeholder" disabled />
|
||||
<input class="input" type="text" :value="text" :placeholder="placeholder" disabled />
|
||||
<text class="iconfont icon-gengduo" :class="selectShow?'selectOpen':'selectHide'"></text>
|
||||
</view>
|
||||
</picker>
|
||||
@ -37,13 +37,19 @@
|
||||
watch:{
|
||||
id:{
|
||||
handler(val){
|
||||
this.array.forEach((item,index)=>{
|
||||
if(item.value == val){
|
||||
this.value = index;
|
||||
this.text = item.name;
|
||||
this.id = val;
|
||||
}
|
||||
})
|
||||
if(val){
|
||||
this.array.forEach((item,index)=>{
|
||||
if(item.value == val){
|
||||
this.value = index;
|
||||
this.text = item.name;
|
||||
this.id = val;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.value = '';
|
||||
this.text = '';
|
||||
this.id = '';
|
||||
}
|
||||
},
|
||||
immediate:true,
|
||||
deep:true
|
||||
@ -91,6 +97,9 @@
|
||||
}
|
||||
.pickerBom{
|
||||
width: 100%;
|
||||
.input{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.selectOpen{
|
||||
animation: rotate 0.6s;
|
||||
|
Reference in New Issue
Block a user