🐛(component): 修复cascader组件 children不能为空的问题
ISSUES CLOSED: #I5E4OM
This commit is contained in:
parent
6648e99b96
commit
fbe7688a83
@ -174,7 +174,7 @@ function findData(orginData: any, level: number) {
|
||||
const dataContainer = ref<any>([]);
|
||||
const selectBar = (item: any, selectIndex: number, parentIndex: number) => {
|
||||
treeData.value[parentIndex].selectIndex = selectIndex;
|
||||
if (item.children) {
|
||||
if (item.children && item.children.length > 0) {
|
||||
treeData.value[parentIndex + 1].selectIndex = null;
|
||||
treeData.value[parentIndex + 1].data = findData(item.children, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user