From 49d8050e0322a1f79249a75d01423e94241281bf Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Mon, 18 Dec 2023 17:47:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E5=A5=BD=E7=9A=84=E8=BE=85?= =?UTF-8?q?=E5=8A=A9=E6=8C=89=E9=94=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/main/custom/toolbar.ts | 4 ++-- src/ui/toolbar.vue | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/main/custom/toolbar.ts b/src/core/main/custom/toolbar.ts index aa79337..0438cd6 100644 --- a/src/core/main/custom/toolbar.ts +++ b/src/core/main/custom/toolbar.ts @@ -15,8 +15,6 @@ interface CustomToolbarEvent extends EmitableEvent { emit: (id: string) => void; } -type ToolbarItemType = 'hotkey' | 'item' | 'assistKey'; - interface ToolbarItemBase { type: T; id: string; @@ -45,6 +43,8 @@ interface ToolbarItemMap { assistKey: AssistKeyToolbarItem; } +type ToolbarItemType = keyof ToolbarItemMap; + export type SettableItemData = Omit; diff --git a/src/ui/toolbar.vue b/src/ui/toolbar.vue index a3a6691..68e2dc0 100644 --- a/src/ui/toolbar.vue +++ b/src/ui/toolbar.vue @@ -84,14 +84,14 @@ function click() { height: 50px; cursor: pointer; background-color: #222; - border: 1px solid #ddd8; + border: 1.5px solid #ddd8; justify-content: center; align-items: center; transition: all 0.1s linear; } .toolbar-item::v-deep(> *) { - height: 50px; + height: 100%; min-width: 50px; display: flex; justify-content: center; @@ -99,6 +99,12 @@ function click() { text-align: center; text-overflow: clip; text-wrap: nowrap; + overflow: hidden; +} + +.toolbar-item::v-deep(.button-text)[active='true'] { + color: gold; + background-color: #555; } .toolbar-item:hover {