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 @@