From 2ff4071a358b626a34d6776ef513df82159edec3 Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Thu, 19 Jun 2025 19:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E8=BD=AC=E5=AD=98=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=BF=AB=E9=80=9F=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 可以通过点击任务名称来快速筛选或取消筛选任务 --- app/static/css/main.css | 10 ++++++++++ app/templates/index.html | 23 +++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index a4737e5..8311f99 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -4119,3 +4119,13 @@ select.task-filter-select, position: relative; z-index: 2; } + +/* 添加任务名称悬停样式 */ +.task-name-hover { + cursor: pointer; + transition: color 0.2s ease-in-out; +} + +.task-name-hover:hover { + color: var(--focus-border-color) !important; +} diff --git a/app/templates/index.html b/app/templates/index.html index 2b851b7..0c5eb30 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -768,13 +768,15 @@
+ v-check-overflow="index + '|task_name'" + :class="{'task-name-hover': true}" + @click.stop="filterByTaskName(record.task_name, $event)"> {{ record.task_name }}
-
+
{{ record.task_name }}
@@ -3684,6 +3686,23 @@ alert("刷新 AList 目录失败: " + (error.response?.data?.message || error.message || "未知错误")); }); }, + filterByTaskName(taskName, event) { + // 防止事件冒泡,避免触发行选择 + if (event) { + event.stopPropagation(); + } + + // 如果当前已经筛选了该任务,则取消筛选 + if (this.historyTaskSelected === taskName) { + this.historyTaskSelected = ""; + } else { + // 设置任务筛选值 + this.historyTaskSelected = taskName; + } + + // 重新加载记录 + this.loadHistoryRecords(); + }, } });