<span>{{showTest}}</span>
<mt-radio align="right" :options="options" v-model="test"></mt-radio>
data() {
return{
showTest:'',
test:'',
options: [{
label: '选项A',
value: '1'
},
{
label: '选项B',
value: '2'
},
{
label: '选项C',
value: '3'
}
,
{
label: '其它',
value: '4'
}
]
}
}
watch: {
test(val) {
this.test= val;
//console.log(this.refundReasonSel);
for(var i=0;i<this.options.length;i++){
if(val==this.options[i].value){
console.log(this.options[i].label)
this.showTest= this.options[i].label;
}
}
}
}