🐛(component): 🐛(component): 修复cascader组件 当传入children为空数组时 点击无反应问题

This commit is contained in:
0o张不歪o0 2022-06-25 22:41:47 +08:00
parent 568c77327a
commit 23bff375cf
2 changed files with 2 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
.DS_Store
node_modules/
package-lock.json
package/document/dist/
# Editor directories and files
.idea
.vscode

View File

@ -182,8 +182,7 @@ const selectBar = (item: any, selectIndex: number, parentIndex: number) => {
treeData.value[index].selectIndex = null;
treeData.value[index].data = [];
}
if (!item.children) {
if (!item.children||item.children.length===0) {
//
let data: any[] = [];
function extractData(orginData: any, dataContainer: any, index: number) {