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