<el-cascader
v-model="form.productCategoryId"
@change="classifyChange"
:options="classify"
:props="{
checkStrictly: true,
value: 'categoryId',
label: 'categoryName',
expandTrigger: 'hover',
emitPath: false,
}"
clearable
:show-all-levels='false'
ref='classifyRef'
>
</el-cascader>
Define a refconst classifyRef = ref()
setup Inside
const classifyChange = () => {
console.log(classifyRef.value)
// Call the method of the instance to close manually
classifyRef.value.togglePopperVisible()
}