elementui plus怎么在级联选中后关闭弹层
文章目录
<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()
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论