From fbe7688a836e9565d2249047a12c091a7f436bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?0o=E5=BC=A0=E4=B8=8D=E6=AD=AAo0?= Date: Mon, 27 Jun 2022 23:23:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=E4=BF=AE=E5=A4=8Dca?= =?UTF-8?q?scader=E7=BB=84=E4=BB=B6=20children=E4=B8=8D=E8=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ISSUES CLOSED: #I5E4OM --- package/component/src/component/cascader/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/component/src/component/cascader/index.vue b/package/component/src/component/cascader/index.vue index 3481b61c..890e01c7 100644 --- a/package/component/src/component/cascader/index.vue +++ b/package/component/src/component/cascader/index.vue @@ -174,7 +174,7 @@ function findData(orginData: any, level: number) { const dataContainer = ref([]); 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); }