<template>
<el-cascader
v-model="value"
:options="options"
:props="props"
/>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const value = ref([])
const props = {
expandTrigger: 'hover' as const,
}
const options = [
{
value: '1',
label: '1',
children: [
{
value: '1-1',
label: '1-1',
children: [
{
value: '1-1-1',
label: '1-1-1',
},
{
value: '1-1-2',
label: '1-1-2',
},
{
value: '1-1-3',
label: '1-1-3',
}
]
},
{
value: '1-2',
label: '1-2',
children: [
{
value: '1-2-1',
label: '1-2-1',
},
{
value: '1-2-2',
label: '1-2-2',
}
]
}
]
},{
value: '2',
label: '2',
children: [
{
value: '2-1',
label: '2-1',
children: [
{
value: '2-1-1',
label: '2-1-1',
},
{
value: '2-1-2',
label: '2-1-2',
}
]
}
]
}
]
</script>
Bug Type:
ComponentEnvironment
3.5.132.11.0Chrome 139.0.7258.155(正式版本) (64 位)ViteReproduction
Related Component
el-cascaderReproduction Link
Docs
Steps to reproduce
cascader级联选择器的expandTrigger设置为hover时无法选中选项,expandTrigger为click时没有问题
我试了三个版本2.11.1和2.11.0和2.10.7,问题出现在2.11.0及以上版本
文档中的也是同样的效果 https://element-plus.org/zh-CN/component/cascader.html#%E5%9F%BA%E7%A1%80%E7%94%A8%E6%B3%95
What is Expected?
点击选项后,v-model的值应为选项的value,输入框为选项的label
What is actually happening?
点击选项后v-model的值和输入框都为空
Additional comments
(empty)