From 05edf9851444a90ec9a449ffc66e514fd435bb72 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Wed, 6 Mar 2024 19:10:04 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=AF=E6=8C=81=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E2=80=9C=E8=BD=AC=E5=88=B0=E2=80=9D=E5=90=8E=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/TableFormatters/DetailFormatter.vue | 9 +++++++++ src/views/sessions/CommandList/BaseList.vue | 1 + 2 files changed, 10 insertions(+) diff --git a/src/components/Table/TableFormatters/DetailFormatter.vue b/src/components/Table/TableFormatters/DetailFormatter.vue index ddd2dc405..c1c33199f 100644 --- a/src/components/Table/TableFormatters/DetailFormatter.vue +++ b/src/components/Table/TableFormatters/DetailFormatter.vue @@ -5,6 +5,7 @@ :disabled="disabled" :type="col.type || 'info'" class="detail" + :class="{ 'clicked': linkClicked }" @click="goDetail" > @@ -30,6 +31,7 @@ export default { routeQuery: null, can: true, openInNewPage: false, + removeColorOnClick: false, getTitle({ col, row, cellValue }) { return cellValue }, @@ -43,6 +45,7 @@ export default { data() { const formatterArgs = Object.assign(this.formatterArgsDefault, this.col.formatterArgs) return { + linkClicked: false, formatterArgs: formatterArgs } }, @@ -100,6 +103,7 @@ export default { methods: { goDetail() { if (this.formatterArgs.openInNewPage) { + this.linkClicked = this.formatterArgs.removeColorOnClick const { href } = this.$router.resolve(this.detailRoute) window.open(href, '_blank') } else { @@ -125,6 +129,11 @@ export default { font-size: 13px; } +.clicked, +.el-link.el-link--info.clicked { + color: inherit !important; +} + .icon { width: 28px; height: 28px; diff --git a/src/views/sessions/CommandList/BaseList.vue b/src/views/sessions/CommandList/BaseList.vue index 83928b124..1a87d3e8c 100644 --- a/src/views/sessions/CommandList/BaseList.vue +++ b/src/views/sessions/CommandList/BaseList.vue @@ -92,6 +92,7 @@ export default { width: '80px', formatterArgs: { openInNewPage: true, + removeColorOnClick: true, can: this.$hasPerm('terminal.view_session'), getTitle() { return vm.$t('sessions.goto')