From 492b738859e92a671e0c534df41c079809a00a97 Mon Sep 17 00:00:00 2001
From: JOJO <1498581755@qq.com>
Date: Tue, 11 Aug 2026 23:39:01 +0800
Subject: [PATCH] =?UTF-8?q?refactor(ui):=20=E6=89=93=E5=8B=BE=E6=A1=86?=
=?UTF-8?q?=E6=94=B6=E6=95=9B=E4=B8=BA=20FancyCheck=20=E5=8D=95=E4=B8=80?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B9=B6=E4=BF=AE=E5=A4=8D=E6=AE=8B=E7=BC=BA?=
=?UTF-8?q?=E8=B7=AF=E5=BE=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增 components/common/FancyCheck.vue 作为全局唯一打勾框实现(checked/size/accent-checked)
- 修复个人空间「编辑摘要实时显示」开关 d 路径中段缺失导致对勾渲染变长
- 38 处内联 SVG 全部改为组件引用,删除四处重复的 fancy 样式
---
static/src/admin/PolicyApp.vue | 68 +---
static/src/components/common/FancyCheck.vue | 83 +++++
static/src/components/input/EffortSlider.vue | 40 +-
.../personalization/PersonalizationDrawer.vue | 351 ++----------------
.../styles/components/overlays/_overlays.scss | 43 ---
5 files changed, 124 insertions(+), 461 deletions(-)
create mode 100644 static/src/components/common/FancyCheck.vue
diff --git a/static/src/admin/PolicyApp.vue b/static/src/admin/PolicyApp.vue
index 4bd2e229..3a3b7d88 100644
--- a/static/src/admin/PolicyApp.vue
+++ b/static/src/admin/PolicyApp.vue
@@ -109,15 +109,7 @@
:checked="getCategoryDefault(cat.id)"
@change="setCategoryDefault(cat.id, $event.target.checked)"
/>
-
-
-
+
{{ cat.default_enabled ? '开' : '关' }}
@@ -144,15 +136,7 @@
@@ -168,15 +152,7 @@
:checked="!!form.config.ui_blocks[key]"
@change="toggleUiBlock(key, $event)"
/>
-
-
-
+
{{ uiBlockLabel(key) }}
@@ -313,6 +289,7 @@
import { computed, reactive, ref, onMounted, onBeforeUnmount, watch } from 'vue';
import { useSecondaryPass } from './useSecondaryPass';
import SecondaryGate from './SecondaryGate.vue';
+import FancyCheck from '@/components/common/FancyCheck.vue';
type TargetType = 'global' | 'role' | 'user' | 'invite';
@@ -1367,43 +1344,6 @@ button:disabled {
pointer-events: none;
}
-.toggle-row .fancy-check {
- width: 28px;
- height: 28px;
- border-radius: 6px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- box-shadow: none;
- background: transparent;
-}
-
-.toggle-row .fancy-check svg {
- width: 22px;
- height: 22px;
- overflow: visible;
-}
-
-.fancy-path {
- fill: none;
- stroke: var(--text-secondary);
- stroke-width: 5;
- stroke-linecap: round;
- stroke-linejoin: round;
- transition:
- stroke-dasharray 0.5s ease,
- stroke-dashoffset 0.5s ease,
- stroke 0.2s ease;
- stroke-dasharray: 241 9999999;
- stroke-dashoffset: 0;
-}
-
-.toggle-row input:checked + .fancy-check .fancy-path {
- stroke: var(--accent);
- stroke-dasharray: 70.5096664428711 9999999;
- stroke-dashoffset: -262.2723388671875;
-}
-
.toggle-row span {
color: var(--text-primary);
font-weight: 600;
diff --git a/static/src/components/common/FancyCheck.vue b/static/src/components/common/FancyCheck.vue
new file mode 100644
index 00000000..911506d9
--- /dev/null
+++ b/static/src/components/common/FancyCheck.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
diff --git a/static/src/components/input/EffortSlider.vue b/static/src/components/input/EffortSlider.vue
index c0b1fd42..7feb4027 100644
--- a/static/src/components/input/EffortSlider.vue
+++ b/static/src/components/input/EffortSlider.vue
@@ -1,6 +1,7 @@