From 367a95b78ba14e5847b49e50194d316ffb4175bb Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 7 Mar 2022 09:29:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=A7=86=E5=9B=BE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/mixin/detailViewMixin.js | 12 +++++++----- nezha-fronted/src/components/page/asset/asset.vue | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/components/common/mixin/detailViewMixin.js b/nezha-fronted/src/components/common/mixin/detailViewMixin.js index 2f039f6e9..df2cc285b 100644 --- a/nezha-fronted/src/components/common/mixin/detailViewMixin.js +++ b/nezha-fronted/src/components/common/mixin/detailViewMixin.js @@ -17,9 +17,9 @@ export default { return } // this.$refs.dataList.bottomBox.showSubList = false - if (this.orderBy) { - this.detailViewRightObj = '' - } + // if (this.orderBy) { + // this.detailViewRightObj = '' + // } this.detailType = flag let dataList = '' localStorage.setItem('detail-view-' + this.tableId, this.detailType) @@ -66,7 +66,7 @@ export default { this.$refs[dataList].$refs.searchInput.searchLabelList = this.$refs.dataList.$refs.searchInput.searchLabelList.filter(item => searchLabel.label !== item.label) } }) - if (this.orderBy && this.$refs.dataTable.$refs.dataTable) { + if (this.orderBy) { const index = this.orderBy.indexOf('-') let orderBy = '' let orderType = '' @@ -78,7 +78,9 @@ export default { orderBy = this.orderBy orderType = 'ascending' } - this.$refs.dataTable.$refs.dataTable.sort(orderBy, orderType) + if (this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) { + this.$refs.dataTable.$refs.dataTable.sort(orderBy, orderType) + } } }, 100) }, diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index ddcac1ff9..0d4e6335f 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -739,7 +739,6 @@ export default { }) } this.tableData = response.data.list - console.log(this.$refs.dataTable.$refs.dataTable) const globalSearchId = this.$store.getters.getGlobalSearchId let detailViewRightObj = '' if (globalSearchId) {