From 4d6b699b7d34fb4b1ee4a430e0df77e749cb0cbd Mon Sep 17 00:00:00 2001 From: fofolee Date: Sun, 29 Dec 2024 11:11:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=A0=87=E7=AD=BE=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=A0=87=E7=AD=BE=E6=94=BE?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E5=90=8E=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/config/TagBar.vue | 115 +++++++++++++++++++++++++++++-- src/pages/ConfigurationPage.vue | 8 +-- 2 files changed, 114 insertions(+), 9 deletions(-) diff --git a/src/components/config/TagBar.vue b/src/components/config/TagBar.vue index ec1d9da..fcb02f2 100644 --- a/src/components/config/TagBar.vue +++ b/src/components/config/TagBar.vue @@ -17,13 +17,35 @@ :key="denseTagBar" :dense="denseTagBar" > - + + + + + {{ tag }} @@ -36,8 +58,17 @@ @@ -156,8 +250,21 @@ export default { width: 0 !important; } -/* 暗色模式适配 */ -:deep(.body--dark) .q-tab:hover::after { +/* 拖拽相关样式 */ +.draggable-container { + width: 100%; +} + +.draggable-tag { + cursor: move; + touch-action: none; +} + +.ghost { opacity: 0.15; } + +.fixed-tag { + cursor: default; +} diff --git a/src/pages/ConfigurationPage.vue b/src/pages/ConfigurationPage.vue index eaa16f9..afe5d2b 100644 --- a/src/pages/ConfigurationPage.vue +++ b/src/pages/ConfigurationPage.vue @@ -86,7 +86,7 @@ export default { }, data() { return { - currentTag: "默认", + currentTag: "", lastTag: "", activatedQuickCommandFeatureCodes: [], activatedQuickPanels: [], @@ -205,13 +205,11 @@ export default { this.getAllQuickCommandTags(); }, getAllQuickCommandTags() { + // 获取所有标签 this.allQuickCommandTags = _.union( ...Object.values(this.allQuickCommands).map((x) => x.tags) ) - .concat([ - "未分类", - // "来自分享" - ]) + .concat(["未分类"]) .filter((x) => x); }, // 监听命令变更事件