From ac98dc496c6bb2afca060ba6c04422c4de4f7aaa Mon Sep 17 00:00:00 2001 From: Nexus Agent Date: Fri, 12 Jun 2026 04:54:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(watch):=20=E7=A7=BB=E9=99=A4=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E6=A7=BD=20hover=20=E6=97=B6=20Vuetify=20=E7=81=B0?= =?UTF-8?q?=E9=81=AE=E7=BD=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v-card 关闭 link/ripple 并隐藏 overlay,仅保留外框主题色高亮。 Co-authored-by: Cursor --- docs/changelog/2026-06-12-watch-slot-hover-border.md | 4 ++++ frontend/src/components/watch/WatchSlotCard.vue | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/changelog/2026-06-12-watch-slot-hover-border.md b/docs/changelog/2026-06-12-watch-slot-hover-border.md index 7fec6e82..dcc61e6e 100644 --- a/docs/changelog/2026-06-12-watch-slot-hover-border.md +++ b/docs/changelog/2026-06-12-watch-slot-hover-border.md @@ -6,6 +6,10 @@ 监测槽卡片(空槽/满槽)hover 时改为**外框主题色**,不再整卡铺灰底。 +## 补充(2026-06-12 晚) + +- `v-card` 设 `:link="false"` `:ripple="false"`,并隐藏 `.v-card__overlay`,消除 Vuetify 默认可点击卡片的 hover 灰遮罩。 + ## 涉及文件 - `frontend/src/components/watch/WatchSlotCard.vue` diff --git a/frontend/src/components/watch/WatchSlotCard.vue b/frontend/src/components/watch/WatchSlotCard.vue index 0f2c9f68..29113114 100644 --- a/frontend/src/components/watch/WatchSlotCard.vue +++ b/frontend/src/components/watch/WatchSlotCard.vue @@ -46,6 +46,8 @@ const load1 = computed(() => props.slot.metrics?.load_1) elevation="0" border rounded="lg" + :link="false" + :ripple="false" class="watch-slot-card pa-3 watch-slot-card--filled" :class="{ 'watch-slot-card--error': monitoringOn && slot.metrics?.probe_status && slot.metrics.probe_status !== 'ok', @@ -194,6 +196,8 @@ const load1 = computed(() => props.slot.metrics?.load_1) elevation="0" border rounded="lg" + :link="false" + :ripple="false" class="watch-slot-card watch-slot-card--empty d-flex align-center justify-center pa-4" variant="outlined" role="button" @@ -212,6 +216,10 @@ const load1 = computed(() => props.slot.metrics?.load_1) .watch-slot-card { min-height: 280px; } +/* Vuetify v-card--link 会在 hover 时铺 v-card__overlay 灰层,此处仅保留外框高亮 */ +.watch-slot-card :deep(.v-card__overlay) { + opacity: 0 !important; +} .watch-slot-card--empty { min-height: 220px; border-style: dashed !important;