From 0880ed24fa4ca5fcb1ba601fa309422ed10487e2 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 19 Oct 2022 13:57:17 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2264=20fix=EF=BC=9A=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E8=B7=B3=E8=BD=AC=E5=90=8E=20=E6=98=BE?= =?UTF-8?q?=E8=91=97=E6=8F=90=E7=A4=BA=20=E6=90=9C=E7=B4=A2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/common.scss | 16 ++++++++++++++++ .../src/components/common/mixin/table.js | 9 ++++++++- .../src/components/common/multipleTime.vue | 17 ++++++++++------- .../common/table/alert/alertRuleTable.vue | 1 + .../common/table/asset/assetTable.vue | 1 + .../common/table/settings/dcTable.vue | 1 + .../common/table/settings/endpointTable.vue | 1 + .../common/table/settings/moduleTable.vue | 1 + .../common/table/settings/projectTable.vue | 1 + 9 files changed, 40 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index e1a8ee8df..4df2ec9c5 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -608,3 +608,19 @@ textarea { .el-tabs--border-card { background: $--background-color-empty; } +.nz-table-global-select{ + background: linear-gradient(to right, $--table-row-hover-background-color 0%,$--table-row-hover-background-color 50%,$--background-color-empty 51%,$--background-color-empty 100%); + background-size: 200% 100%; + animation: gradientBG 5s ease-in infinite; +} +@keyframes gradientBG { + 0% { + background-position: 100% 0%; + } + 50% { + background-position: 0% 0%; + } + 100% { + background-position: 100% 0%; + } +} diff --git a/nezha-fronted/src/components/common/mixin/table.js b/nezha-fronted/src/components/common/mixin/table.js index 5b9604bde..13afdf27b 100644 --- a/nezha-fronted/src/components/common/mixin/table.js +++ b/nezha-fronted/src/components/common/mixin/table.js @@ -148,6 +148,10 @@ export default { }, rowKey (row) { // ping trace的 唯一key return row.ip + '-' + row.dc.id + }, + cellMouseEnter (row, column, cell, event) { + // console.log(row, column, cell, event) + cell.parentNode.classList.remove('nz-table-global-select') } }, watch: { @@ -173,7 +177,10 @@ export default { if (id) { setTimeout(() => { if (document.getElementById('globalSearch' + id)) { - document.getElementById('globalSearch' + id).scrollIntoView(true) + document.getElementById('globalSearch' + id).scrollIntoView({ block: 'center', inline: 'center' }) + if (document.getElementById('globalSearch' + id).parentNode.parentNode.parentNode.classList.contains('el-table__row')) { + document.getElementById('globalSearch' + id).parentNode.parentNode.parentNode.classList.add('nz-table-global-select') + } this.$store.commit('setGlobalSearchId', '') } }, 500) diff --git a/nezha-fronted/src/components/common/multipleTime.vue b/nezha-fronted/src/components/common/multipleTime.vue index c78c9363f..15d60e500 100644 --- a/nezha-fronted/src/components/common/multipleTime.vue +++ b/nezha-fronted/src/components/common/multipleTime.vue @@ -2,7 +2,7 @@
-
+