<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>
定义一个 refconst classifyRef = ref()
setup 外面
const classifyChange = () => {console.log(classifyRef.value)
// 调用实例的办法手动敞开
classifyRef.value.togglePopperVisible()}