From c5e9ad95f159d5283502e4c3766771424032b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=AF=BA?= <1253070437@qq.com> Date: Tue, 8 Nov 2022 21:09:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=B0=8F=E7=BB=86=E8=8A=82=EF=BC=8C=E5=90=8C=E6=97=B6=E6=94=B9?= =?UTF-8?q?=E8=BF=9Bstable=E8=A1=A8=E6=A0=BC=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/components/Table/index.vue | 10 +++++++++- snowy-admin-web/src/views/gen/basic.vue | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/snowy-admin-web/src/components/Table/index.vue b/snowy-admin-web/src/components/Table/index.vue index 1b799171..d66aa7ae 100644 --- a/snowy-admin-web/src/components/Table/index.vue +++ b/snowy-admin-web/src/components/Table/index.vue @@ -228,7 +228,15 @@ this.localPagination = false } // 返回结果中的数组数据 - this.localDataSource = r.records + if (this.showPagination === false) { + // 既然配置了不分页,那么我们这里接收到肯定是数组 + this.localDataSource = [] + if (r instanceof Array) { + this.localDataSource = r + } + } else { + this.localDataSource = r.records + } this.localLoading = false }) } diff --git a/snowy-admin-web/src/views/gen/basic.vue b/snowy-admin-web/src/views/gen/basic.vue index b8524c1b..6a81bbc1 100644 --- a/snowy-admin-web/src/views/gen/basic.vue +++ b/snowy-admin-web/src/views/gen/basic.vue @@ -262,7 +262,9 @@ const traverse = (array) => { array.forEach((element) => { if (element.menuType === 'CATALOG') { - traverse(element.children) + if (element.children) { + traverse(element.children) + } } else { // 设置不可用 element.disabled = true