<mt-popup
v-model="popupVisible1"
position="bottom">
{{value.id}}
<mt-radio
title="选择项目下单"
v-model="value"
:options="options" @change="monitor">
</mt-radio>
</mt-popup>
data(){
return{
value:"",
options:[],
}
}
monitor(){
this.$api.addShoppingCartQianyue({pro_id:this.value.id,mat_id:this.id,mod_id:this.materialId,colorId:this.colors[this.number1] ? this.colors[this.number1].id : '',elementId:this.element[this.number2] ? this.element[this.number2].id : '',styleId:this.style[this.number3] ? this.style[this.number3].id : '',textureId:this.texture[this.number4] ? this.texture[this.number4].id : '',memberId:localStorage.getItem("userId")?localStorage.getItem("userId"):localStorage.getItem("Identification"),num:this.num}).then(res =>{
this.nums = res.data.data
this.popupVisible1 = false
})
},
有可能你的 @change 事件没触发,如果你依赖这个方法获取数据,你应该在生命周期中获取数据