mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-02-28 17:37:07 +08:00
feat: 更好的辅助按键显示
This commit is contained in:
parent
334c25fb7a
commit
49d8050e03
@ -15,8 +15,6 @@ interface CustomToolbarEvent extends EmitableEvent {
|
|||||||
emit: (id: string) => void;
|
emit: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToolbarItemType = 'hotkey' | 'item' | 'assistKey';
|
|
||||||
|
|
||||||
interface ToolbarItemBase<T extends ToolbarItemType> {
|
interface ToolbarItemBase<T extends ToolbarItemType> {
|
||||||
type: T;
|
type: T;
|
||||||
id: string;
|
id: string;
|
||||||
@ -45,6 +43,8 @@ interface ToolbarItemMap {
|
|||||||
assistKey: AssistKeyToolbarItem;
|
assistKey: AssistKeyToolbarItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ToolbarItemType = keyof ToolbarItemMap;
|
||||||
|
|
||||||
export type SettableItemData<T extends ToolbarItemType = ToolbarItemType> =
|
export type SettableItemData<T extends ToolbarItemType = ToolbarItemType> =
|
||||||
Omit<ToolbarItemMap[T], 'id' | 'type'>;
|
Omit<ToolbarItemMap[T], 'id' | 'type'>;
|
||||||
|
|
||||||
|
@ -84,14 +84,14 @@ function click() {
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #222;
|
background-color: #222;
|
||||||
border: 1px solid #ddd8;
|
border: 1.5px solid #ddd8;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
transition: all 0.1s linear;
|
transition: all 0.1s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-item::v-deep(> *) {
|
.toolbar-item::v-deep(> *) {
|
||||||
height: 50px;
|
height: 100%;
|
||||||
min-width: 50px;
|
min-width: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -99,6 +99,12 @@ function click() {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
text-overflow: clip;
|
text-overflow: clip;
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-item::v-deep(.button-text)[active='true'] {
|
||||||
|
color: gold;
|
||||||
|
background-color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-item:hover {
|
.toolbar-item:hover {
|
||||||
|
Loading…
Reference in New Issue
Block a user