feat(脑图): 快捷键是否可编辑判定

This commit is contained in:
baiqi 2024-11-07 15:17:19 +08:00 committed by 刘瑞斌
parent 6657ad923f
commit 6e749c4e2d
1 changed files with 4 additions and 2 deletions

View File

@ -59,7 +59,7 @@
tagProps, tagProps,
viewMenuProps, viewMenuProps,
} from './props'; } from './props';
import { isNodeInMinderView } from './script/tool/utils'; import { isDisableNode, isNodeInMinderView } from './script/tool/utils';
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'moldChange', data: number): void; (e: 'moldChange', data: number): void;
@ -132,7 +132,9 @@
const { unbindShortcuts } = useShortCut( const { unbindShortcuts } = useShortCut(
{ {
input: () => { input: () => {
window.minderEditor.editText(); if (window.minder._status !== 'readonly' && !isDisableNode(window.minder)) {
window.minderEditor.editText();
}
}, },
undo: () => { undo: () => {
window.minderHistory?.undo(); window.minderHistory?.undo();