画布隐藏关闭键盘事件
This commit is contained in:
@@ -114,6 +114,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hideCanvas: {
|
||||
type: Boolean,
|
||||
default: false, // 是否隐藏画布-隐藏关闭部分功能
|
||||
},
|
||||
});
|
||||
|
||||
// 引用和状态
|
||||
@@ -171,6 +175,15 @@ function toggleShortcutHelp() {
|
||||
showShortcutHelp.value = !showShortcutHelp.value;
|
||||
}
|
||||
|
||||
watch(()=>props.hideCanvas, (newVal)=>{
|
||||
console.log("==========是否隐藏画布",newVal)
|
||||
if(newVal){
|
||||
keyboardManager?.removeEvents()
|
||||
}else {
|
||||
keyboardManager?.init()
|
||||
}
|
||||
})
|
||||
|
||||
// 工具选择处理
|
||||
function handleToolSelect(tool) {
|
||||
activeTool.value = tool;
|
||||
|
||||
Reference in New Issue
Block a user