el-select clear清空内容时触发事件

<el-form-item label="">
                <el-select v-model="formData.brandName" @change="getCarModel()" @clear="setValueNull" clearable placeholder="请选择品牌名称">
                    <el-option
                            v-for="item in brandNames"
                            :key="item.id"
                            :label="item.brandName"
                            :value="item.id">
                    </el-option>
                </el-select>
            </el-form-item>

methods: {
     
	setValueNull(val) {
     
                this.carModels = [];
                this.derives = [];
            }
}

参考:https://element.eleme.cn/#/zh-CN/component/select

你可能感兴趣的:(Vue)