feat: 更好的辅助按键显示

This commit is contained in:
AncTe committed 2023-12-18 17:47:00 +08:00
1 parent 334c25fb7a
commit 49d8050e03
2 files changed
+10 -4

No files matched your search

+2 -2
View File
@@ -15,8 +15,6 @@ interface CustomToolbarEvent extends EmitableEvent {
emit: (id: string) => void;
}
type ToolbarItemType = 'hotkey' | 'item' | 'assistKey';
interface ToolbarItemBase<T extends ToolbarItemType> {
type: T;
id: string;
@@ -45,6 +43,8 @@ interface ToolbarItemMap {
assistKey: AssistKeyToolbarItem;
}
type ToolbarItemType = keyof ToolbarItemMap;
export type SettableItemData<T extends ToolbarItemType = ToolbarItemType> =
Omit<ToolbarItemMap[T], 'id' | 'type'>;