diff --git a/.gitignore b/.gitignore index 1dd34fbf..34482087 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_Store node_modules/ package-lock.json - +package/document/dist/ # Editor directories and files .idea .vscode diff --git a/package/component/src/component/cascader/index.vue b/package/component/src/component/cascader/index.vue index 3d9c77c4..2aa47ae6 100644 --- a/package/component/src/component/cascader/index.vue +++ b/package/component/src/component/cascader/index.vue @@ -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) {