From e2e7eaec2ab40c0e209f9b8bbb08a54a989f77e4 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Thu, 24 Mar 2022 09:46:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20exploreItem=20?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=8A=A5=E9=94=99=EF=BC=8Cprojects=20?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=88=97=E8=A1=A8=E8=B7=B3=E8=BD=AC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=20=E5=88=9D=E5=A7=8B=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=B8=BAnull=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/mixin/dataList.js | 5 ++++- .../src/components/page/dashboard/explore/exploreItem.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/mixin/dataList.js b/nezha-fronted/src/components/common/mixin/dataList.js index 351498f97..c8f386c61 100644 --- a/nezha-fronted/src/components/common/mixin/dataList.js +++ b/nezha-fronted/src/components/common/mixin/dataList.js @@ -336,7 +336,10 @@ export default { } }, created () { - const path = this.$route.fullPath.match(/\/(\S*)\?/)[1] + let path = '' + if (this.$route.fullPath.match(/\/(\S*)\?/)) { + path = this.$route.fullPath.match(/\/(\S*)\?/)[1] + } if (this.$route.query.orderBy && !this.isSubList) { this.orderBy = this.$route.query.orderBy } diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 7f16cd4f2..82f3f9ce4 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -444,7 +444,7 @@ export default { this.tableData = this.filterShowData(this.storedTableData, this.pageObj) }, filterShowData (source, pageObj) { - return source.slice((pageObj.pageNo - 1) * pageObj.pageSize, pageObj.pageNo * pageObj.pageSize) + if (source) return source.slice((pageObj.pageNo - 1) * pageObj.pageSize, pageObj.pageNo * pageObj.pageSize) }, chartUnitChange (unit) { this.chartUnit = unit