From e6bbac83666caa3fcc0502ff485dc6ab2e8d0782 Mon Sep 17 00:00:00 2001 From: anghunk Date: Mon, 2 Feb 2026 11:11:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E4=B8=BA=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=A1=B9=E6=B7=BB=E5=8A=A0=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E8=AE=BE=E7=BD=AE=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E8=BE=93=E5=85=A5=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在导航菜单项中引入图标组件,提升视觉识别性 - 将设置页中的文本域输入替换为交互式标签输入组件,支持添加/删除标签 - 新增标签输入组件的样式和交互逻辑,改善用户体验 --- cwd-admin/src/styles/components/setting.less | 77 ++++++ cwd-admin/src/styles/layout.less | 7 + cwd-admin/src/views/LayoutView/index.vue | 15 +- cwd-admin/src/views/SettingsView/index.vue | 269 ++++++++++++++++--- 4 files changed, 321 insertions(+), 47 deletions(-) diff --git a/cwd-admin/src/styles/components/setting.less b/cwd-admin/src/styles/components/setting.less index fc33ba2..2e52f6d 100644 --- a/cwd-admin/src/styles/components/setting.less +++ b/cwd-admin/src/styles/components/setting.less @@ -90,6 +90,83 @@ box-shadow: 0 0 0 1px rgba(9, 105, 218, 0.2); } +.tag-input { + padding: 4px 6px; + border-radius: 4px; + border: 1px solid var(--border-color); + background-color: var(--bg-input); +} + +.tag-input-inner { + display: flex; + flex-wrap: wrap; + gap: 6px; +} + +.tag-input-tag { + display: inline-flex; + align-items: center; + max-width: 100%; + padding: 2px 8px; + border-radius: 999px; + background-color: var(--bg-sider); + color: var(--text-primary); + font-size: 13px; + position: relative; +} + +.tag-input-tag-text { + max-width: 180px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.tag-input-tag-remove { + border: none; + padding: 0; + background: none; + cursor: pointer; + color: var(--text-secondary); + font-size: 12px; + opacity: 0; + visibility: hidden; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.tag-input-tag-remove:hover { + color: var(--color-danger); +} + +.tag-input-tag:hover .tag-input-tag-text { + opacity: 0; + visibility: hidden; +} + +.tag-input-tag:hover .tag-input-tag-remove { + opacity: 1; + visibility: visible; +} + +.tag-input-input { + flex: 1; + min-width: 120px; + border: none; + outline: none; + background: transparent; + padding: 4px 2px; + font-size: 14px; + color: var(--text-primary); +} + .toast { position: fixed; top: 20px; diff --git a/cwd-admin/src/styles/layout.less b/cwd-admin/src/styles/layout.less index 3356a2c..ae6c9ee 100644 --- a/cwd-admin/src/styles/layout.less +++ b/cwd-admin/src/styles/layout.less @@ -152,6 +152,13 @@ cursor: pointer; font-size: 15px; color: var(--text-primary); + display: flex; + align-items: center; + gap: 8px; +} + +.menu-item-icon { + flex: 0 0 auto; } .menu-item:hover { diff --git a/cwd-admin/src/views/LayoutView/index.vue b/cwd-admin/src/views/LayoutView/index.vue index 0fbcaed..aff4103 100644 --- a/cwd-admin/src/views/LayoutView/index.vue +++ b/cwd-admin/src/views/LayoutView/index.vue @@ -83,35 +83,40 @@ :class="{ active: isRouteActive('comments') }" @click="goComments" > - 评论管理 + + 评论管理
- +
+
+ + {{ domain }} + + + +
+
- +
+
+ + {{ ip }} + + + +
+
- +
+
+ + {{ email }} + + + +
+
@@ -361,7 +415,7 @@