Ant Design Vue <a-select>获取value和label

          <a-col :span="24">
            <a-form-model-item label="学历" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eduType">
              <a-select @select="eduTypeChange" placeholder="请选择学历" v-model="model.eduType">
                <a-select-option v-for="item in eduTypeList" :key="item.id.toString()" :value="item.id.toString()">{{
                    item.title
                  }}
                </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
		  
	// 学历选择
	eduTypeChange(value, e) {
	 const label = e.componentOptions.children[0].elm.data.trim()
	 this.model.eduTypeId = value
	 this.model.eduType = label
	},
	
posted @   Charles博客  阅读(203)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效
点击右上角即可分享
微信分享提示