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