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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章