mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-07 13:14:30 +08:00
fix: 工具栏编辑器报错
This commit is contained in:
1 parent
ad2cb0b757
commit
f4757d7cc3
4 files changed
+4
-28
No files matched your search
@@ -321,24 +321,3 @@ CustomToolbar.register(
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
hook.once('reset', () => {
|
||||
const toolbar = new CustomToolbar('test');
|
||||
toolbar
|
||||
.add<'hotkey'>({
|
||||
id: 'test1',
|
||||
type: 'hotkey',
|
||||
assist: 0,
|
||||
key: KeyCode.KeyX
|
||||
})
|
||||
.add<'assistKey'>({
|
||||
id: 'test2',
|
||||
type: 'assistKey',
|
||||
assist: KeyCode.Ctrl
|
||||
})
|
||||
.add<'item'>({
|
||||
id: 'test3',
|
||||
type: 'item',
|
||||
item: 'book'
|
||||
});
|
||||
});
|
||||
@@ -114,10 +114,7 @@ function KeyToolEdtior(props: CustomToolbarProps<'hotkey'>) {
|
||||
};
|
||||
|
||||
const getKeyShow = (key: KeyCode, assist: number) => {
|
||||
return (
|
||||
unwarpAssist(assist) +
|
||||
(key === KeyCode.Unknown ? '' : KeyCodeUtils.toString(key))
|
||||
);
|
||||
return unwarpAssist(assist) + KeyCodeUtils.toString(key);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
:type="isMobile ? 'horizontal' : 'vertical'"
|
||||
></a-divider>
|
||||
<div id="tool-info">
|
||||
<div id="tool-detail">
|
||||
<div id="tool-detail" v-if="!!bar">
|
||||
<Scroll class="tool-item-list-scroll">
|
||||
<div class="tool-item-list">
|
||||
<div
|
||||
@@ -152,7 +152,7 @@
|
||||
</Scroll>
|
||||
</div>
|
||||
<a-divider dashed></a-divider>
|
||||
<div id="tool-preview">
|
||||
<div id="tool-preview" v-if="!!bar">
|
||||
<div id="tool-preview-container">
|
||||
<div class="tool-preview-item" v-for="item of bar.items">
|
||||
<component
|
||||
|
||||
Reference in new issue
Block a user