From 38166bbdfb3690ec5e4b4bb573815bea17e081b2 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Wed, 2 Jun 2021 15:23:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dasset=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=A1=86=E6=98=BE=E7=A4=BA=E6=9B=B4=E5=A4=9A=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/labelFilter/clickSearch.vue | 9 ++++----- .../src/components/page/asset/asset.vue | 17 +---------------- .../components/page/config/system/linkTab.vue | 2 +- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/nezha-fronted/src/components/common/labelFilter/clickSearch.vue b/nezha-fronted/src/components/common/labelFilter/clickSearch.vue index 304cc951c..fe88bf3ab 100644 --- a/nezha-fronted/src/components/common/labelFilter/clickSearch.vue +++ b/nezha-fronted/src/components/common/labelFilter/clickSearch.vue @@ -160,11 +160,10 @@ export default { this.titleSearchListCopy[key].children.forEach((item, i) => { /* (基础宽度 + 文字宽度) 总和大于文本长时 显示更多 */ if (index === -1) { - if (this.titleSearchListCopy[key].width < this.contentWidth) { - this.titleSearchListCopy[key].width += this.getDomWidth(this.titleSearchListCopy[key], item, i) - } else { + this.titleSearchListCopy[key].width += this.getDomWidth(this.titleSearchListCopy[key], item, i) + if (this.titleSearchListCopy[key].width > this.contentWidth) { this.titleSearchListCopy[key].showMore = true - this.titleSearchListCopy[key].index = i - 1 + this.titleSearchListCopy[key].index = i index = i } } @@ -183,7 +182,7 @@ export default { let width if (parentData.type === 'dropdownCheckBox') { width = this.computeDistance(`${item.name}:`) - const marginRight = 20 + const marginRight = 22 width = width + 182 + marginRight// 182是label框的宽度除去name外的部分 } else { width = this.computeDistance(item.name) diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 117ca2a8e..fb08ee21e 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -436,22 +436,7 @@ export default { return this.userData[item].username } } - }, - /* formatPingTime (str) { - if (!str) { - return this.$t('asset.assetStatPre') + this.$t('asset.assetStatDown') - } - const ds = '-' - const ts = ':' - const time = new Date(bus.UTCTimeToConfigTimezone(str)) - const year = time.getFullYear() - const month = time.getMonth() + 1 > 9 ? time.getMonth() + 1 : ('0' + (time.getMonth() + 1)) - const day = time.getDate() > 9 ? time.getDate() : ('0' + time.getDate()) - const hours = time.getHours() > 9 ? time.getHours() : ('0' + time.getHours()) - const minutes = time.getMinutes() > 9 ? time.getMinutes() : ('0' + time.getMinutes()) - const seconds = time.getSeconds() > 9 ? time.getSeconds() : ('0' + time.getSeconds()) - return this.$t('asset.assetStatPre') + year + ds + month + ds + day + ' ' + hours + ts + minutes + ts + seconds - }, */ + } }, mounted () { // 初始化数据 diff --git a/nezha-fronted/src/components/page/config/system/linkTab.vue b/nezha-fronted/src/components/page/config/system/linkTab.vue index 20f09ca4e..eb4d9a408 100644 --- a/nezha-fronted/src/components/page/config/system/linkTab.vue +++ b/nezha-fronted/src/components/page/config/system/linkTab.vue @@ -11,7 +11,7 @@