Open ezjason opened 3 years ago
Translation of this issue:
<el-cascader
v-model=\"uploadForm.category\" :options=\"categories\"
:props=\"{ checkStrictly: true,
value: 'categoryId', label: 'categoryName',
children: 'children', emitPath: false,
multiple: true, }\"
:key=\"cascaderKey\" :show-all-levels=\"false\"
@change=\"selectItem2\" Placeholder = \"please select category\"
clearable
selectItem(i) { if (i.length == 1) {
this.singleItem = i[0] }
if (i.length > 1) { let index = i.findIndex((v) => v === this.singleItem)
i.splice(index, 1) this.form.category = ''
this.$nextTick(() => { this.form.category = i
this.singleItem = i[0] })
} },
From design to assignment, there are lower level options that can trigger bugs (no video demo can be inserted)
<el-cascader v-model="uploadForm.category" :options="categories" :props="{ checkStrictly: true, value: 'categoryId', label: 'categoryName', children: 'children', emitPath: false, multiple: true, }" :key="cascaderKey" :show-all-levels="false" @change="selectItem2" placeholder="请选择分类" clearable
设计到赋值有下级的选项可以触发bug(插入不了视频演示)