fix: 修复 exploreItem 分页报错,projects 点击列表跳转页面, 初始获取路由为null报错
This commit is contained in:
@@ -336,7 +336,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
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) {
|
if (this.$route.query.orderBy && !this.isSubList) {
|
||||||
this.orderBy = this.$route.query.orderBy
|
this.orderBy = this.$route.query.orderBy
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ export default {
|
|||||||
this.tableData = this.filterShowData(this.storedTableData, this.pageObj)
|
this.tableData = this.filterShowData(this.storedTableData, this.pageObj)
|
||||||
},
|
},
|
||||||
filterShowData (source, 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) {
|
chartUnitChange (unit) {
|
||||||
this.chartUnit = unit
|
this.chartUnit = unit
|
||||||
|
|||||||
Reference in New Issue
Block a user