From 23bff375cfffa8c5a15ea78932d6de712db85178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?0o=E5=BC=A0=E4=B8=8D=E6=AD=AAo0?= Date: Sat, 25 Jun 2022 22:41:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=F0=9F=90=9B(compone?= =?UTF-8?q?nt):=20=E4=BF=AE=E5=A4=8Dcascader=E7=BB=84=E4=BB=B6=20=E5=BD=93?= =?UTF-8?q?=E4=BC=A0=E5=85=A5children=E4=B8=BA=E7=A9=BA=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E6=97=B6=20=E7=82=B9=E5=87=BB=E6=97=A0=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- package/component/src/component/cascader/index.vue | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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) {