feat(脑图): 编辑节点快捷键改为空格

This commit is contained in:
baiqi 2024-11-14 17:37:47 +08:00 committed by Craftsman
parent 8efc5f5207
commit 857a420281
4 changed files with 11 additions and 3 deletions

View File

@ -108,11 +108,11 @@ export default function useShortCut(shortcuts: Shortcuts, options: MinderOperati
}
default:
}
const key = event.key.toLowerCase();
if (key === 'f2') {
const code = event.code.toLowerCase();
if (code === 'space') {
// 执行快捷键编辑事件
if (shortcuts.input) {
event.preventDefault();
shortcuts.input(event);
}
}

View File

@ -115,5 +115,6 @@ export default {
expand: 'Expand/Collapse',
notSupportClipboard:
'Due to browser security policy restrictions, websites that are not HTTPS cannot access the clipboard. Please use keyboard shortcuts to copy/paste.',
editNodeText: '编辑节点文本',
},
};

View File

@ -108,5 +108,6 @@ export default {
shortcutTitle: '快捷键说明',
expand: '展开/收起',
notSupportClipboard: '因浏览器安全策略限制,非 HTTPS 协议的网站无法访问剪贴板,请使用快捷键复制/粘贴',
editNodeText: '编辑节点文本',
},
};

View File

@ -134,6 +134,12 @@
<div class="ms-minder-shortcut-trigger-listitem-icon">Y</div>
</div>
</div> -->
<div class="ms-minder-shortcut-trigger-listitem">
<div>{{ t('minder.editNodeText') }}</div>
<div class="ms-minder-shortcut-trigger-listitem-icon ms-minder-shortcut-trigger-listitem-icon-auto">
Space
</div>
</div>
<slot name="shortCutList"></slot>
</div>
</template>