el-select获取当前选择的label值

发布时间 2023-07-04 14:15:09作者: 菜鸟辉哥

例如

    <el-select v-model="biaotou11" placeholder="请选择模型类别" 
                clearable 
                @change="biaotouchange"
                ref="dataTypeSelect1">
     <el-option v-for="tabname in tableTitleName" :key="tabname.id" :label="tabname.columnComment":value="tabname.columnName" />
    </el-select>

获取当前选中的select的label值

let currentLabel = this.$refs.dataTypeSelect1.selected.currentLabel;
console.log("当前select选中的label值是:",currentLabel )