current position:Home>How does elementui plus turn off the bullet layer after cascading is selected

How does elementui plus turn off the bullet layer after cascading is selected

2021-08-27 02:37:07 Wannian Da yeyi master

<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 ref
const classifyRef = ref()

setup Inside

const classifyChange = () => {
  console.log(classifyRef.value)
  //  Call the method of the instance to close manually 
  classifyRef.value.togglePopperVisible()
}

copyright notice
author[Wannian Da yeyi master],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2021/08/20210827023705564h.html

Random recommended