mt-radio怎么获取label的值

<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;
			}
		}
	}
}

猜你喜欢

转载自blog.csdn.net/m0_37270964/article/details/84992685