antd a-select 获取选中得label

html 需要在标签上加属性 labelInValue :

<a-select labelInValue
placeholder="请选择市"
v-decorator="['cityCode', validatorRules.cityCode]"
@change="onchangeCity"

js 获取得时候 value.label 即可获取到了:
onchangeCity(value) {
this.model.cityCode = value.key
this.model.cityName = value.label.replace(/\ /g,"").replace(/\s/g,"")//去掉空格和 \n

猜你喜欢

转载自blog.51cto.com/zhaoyingyatou/2581576