|
@@ -3,7 +3,7 @@
|
|
<div class="toast-wrap">
|
|
<div class="toast-wrap">
|
|
<p v-show="val" :class="['ptab',{'check':val != '请选择'}]" @click="showPicker">{{val}}</p>
|
|
<p v-show="val" :class="['ptab',{'check':val != '请选择'}]" @click="showPicker">{{val}}</p>
|
|
<p v-show="val != '请选择'" class="tip">点击可修改</p>
|
|
<p v-show="val != '请选择'" class="tip">点击可修改</p>
|
|
- <Picker :show="showTime" @comfirn="getTimeVal" @cancel="close"/>
|
|
|
|
|
|
+ <Picker :show="showTime" @comfirn="getTimeVal" @cancel="close" :picIndex="item.pickIndex||[]"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
@@ -24,7 +24,7 @@
|
|
$(".btscroll").css({'position':'fixed'})
|
|
$(".btscroll").css({'position':'fixed'})
|
|
$(".foot").css({'position':'fixed'})
|
|
$(".foot").css({'position':'fixed'})
|
|
},
|
|
},
|
|
- getTimeVal(value){//确定
|
|
|
|
|
|
+ getTimeVal(value,index){//确定
|
|
// 首位为0则去掉
|
|
// 首位为0则去掉
|
|
if(value.charAt(0) == 0){
|
|
if(value.charAt(0) == 0){
|
|
this.val = value.substr(1);
|
|
this.val = value.substr(1);
|
|
@@ -32,7 +32,7 @@
|
|
this.val = value;
|
|
this.val = value;
|
|
}
|
|
}
|
|
this.showTime = false;
|
|
this.showTime = false;
|
|
- const newData = Object.assign({},this.item,{value:this.val,valueP:this.val});
|
|
|
|
|
|
+ const newData = Object.assign({},this.item,{value:this.val,valueP:this.val,pickIndex:index});
|
|
this.$emit("updata",newData);
|
|
this.$emit("updata",newData);
|
|
$(".btscroll").css({'position':'absolute'})
|
|
$(".btscroll").css({'position':'absolute'})
|
|
},
|
|
},
|
|
@@ -43,6 +43,14 @@
|
|
},
|
|
},
|
|
components:{
|
|
components:{
|
|
Picker
|
|
Picker
|
|
|
|
+ },
|
|
|
|
+ watch:{
|
|
|
|
+ item:{
|
|
|
|
+ handler(newVal,oldVal){
|
|
|
|
+ this.val = newVal.value|| '请选择';
|
|
|
|
+ },
|
|
|
|
+ deep:true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -66,6 +74,7 @@
|
|
}
|
|
}
|
|
.tip{
|
|
.tip{
|
|
color: #7C828E;
|
|
color: #7C828E;
|
|
|
|
+ font-size: .24rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|