取消插件默认的快捷键,提取为命令,同时增加一些界面操作的命令

This commit is contained in:
街角小林 2025-09-19 09:21:49 +08:00
parent 32367a9a4a
commit 2f43bf55a2
28 changed files with 987 additions and 603 deletions

15
Help.md
View file

@ -1,5 +1,16 @@
# FAQ/Help
> The Ctrl key mentioned in this document corresponds to the Command key on Mac systems.
- Open a hyperlink in a new tab
Ctrl + click the hyperlink.
- When the left button is set to frame-select nodes and the right button is used to drag the canvas, can the left button still be used to drag the canvas?
Yes, hold down the Space key and use the left button to drag the canvas.
- When the mouse wheel behavior is set to 【Move view up and down】, how can the mouse wheel be used to zoom the canvas?
Hold down the Ctrl key and use the mouse wheel to zoom the canvas.
- **Is free node supported?**
No.
@ -22,8 +33,7 @@
- **How to edit node text?**
1. Double-click the node.
2. Press `F2`.
3. Activate node + press any letter/number key.
2. Activate node + press any letter/number key.
- **How to select multiple nodes?**
1. Set selection mode in bottom toolbar:
@ -36,6 +46,7 @@
1. Use the mouse button assigned in toolbar settings.
2. In *Left-box-select* mode: Hold `Space` + Left-drag.
3. Set *Mouse Wheel Behavior* to *Move view up/down* in Settings.
4. Hold down the Shift key while using the mouse wheel to move the canvas left and right.
- **How to adjust node width?**
Drag node edges → Release to confirm.

View file

@ -1,5 +1,19 @@
# 常见问题/使用帮助
> 本文档中提到的Ctrl键在Mac系统中对应的是Command键
- 新标签页打开超链接
ctrl + 点击超链接。
- 设置为左键框选节点,右键拖动画布时,还能使用左键拖动画布吗?
可以按住空格键Space同时使用左键拖动画布。
- 鼠标滚轮行为设置为【上下移动视图】时,如何使用鼠标滚轮来缩放画布?
按住Ctrl键同时使用鼠标滚轮可以缩放画布。
- 是否支持自由节点?
不支持。
@ -30,9 +44,7 @@ Shift + Enter键。
1.鼠标双击节点;
2.按F2键
3.激活节点,然后按任何数字键或字母键;
2.激活节点,然后按任何数字键或字母键;
- 如何多选节点?
@ -50,6 +62,8 @@ Shift + Enter键。
3.右侧【设置】中的【鼠标滚轮行为】可以设置为【上下移动视图】,然后可以通过鼠标滚轮来上下移动画布;
4.按住Shift键同时使用鼠标滚轮可以左右移动画布。
- 如何调整节点宽度?
鼠标移到节点两侧边缘,当鼠标手型样式改变后按下鼠标然后拖动调整即可,鼠标松开即调整结束。

View file

@ -10,6 +10,10 @@ mind-map 也提供了独立的思维导图客户端,可以点击[客户端](ht
# 功能清单
- 快捷键
从`0.1.5+`开始插件不再提供默认的快捷键全部转为ob的命令你可以自行设置命令对应的快捷键。该[文档](./ShortcutKeySettingReference.md)列出了原来的快捷键,可供参考。
- 思维导图本身的功能可从[mind-map](https://github.com/wanglin2/mind-map)项目了解更多,也可以在这里查[看常见问题](./Help_zh.md)。
- 思维导图文件格式

View file

@ -10,6 +10,10 @@ mind-map also provides a standalone mind map client. Learn more about the [Clien
# Feature List
- Shortcuts
Starting from '0.1.5+', the plugin no longer provides default shortcut keys, all are converted to ob commands, and you can set the corresponding shortcut keys for the commands yourself. This [document](./ShortcutKeySettingReference_en.md) lists the original shortcut keys for reference.
- For mind map features, refer to the [mind-map](https://github.com/wanglin2/mind-map) project. You can also check [Common Issues](./Help.md) here.
- Mind Map File Format

View file

@ -0,0 +1,109 @@
# 自定义命令快捷键参考
从0.1.5+开始插件不再提供默认的快捷键全部转为ob的命令你可以自行设置命令对应的快捷键。本文档给出原默认的快捷键可供参考。
> 本文档中提到的Ctrl键在Mac系统中对应的是Command键
>
> 快捷键中的`|`表示或、`+`表示与
## 编辑操作
- 保存
`Ctrl + S`
- 保存并更新图像数据
`Ctrl + Shfit + S`
## 节点操作
- 插入下级节点
`Tab | Insert`
- 插入同级节点
`Enter`
- 插入父节点
`Shift + Tab`
- 上移节点
`Ctrl + ↑`
- 下移节点
`Ctrl + ↓`
- 插入概要
`Ctrl + G`
- 展开/收起节点
`/`
- 删除节点
`Delete | Backspace`
- 仅删除当前节点
`Shift + Backspace`
- 复制节点
`Ctrl + C`
- 剪切节点
`Ctrl + X`
- 粘贴节点
`Ctrl + V`
- 编辑节点
`F2`
- 回退
`Ctrl + Z`
- 前进
`Ctrl + Y`
- 全选
`Ctrl + A`
- 一键整理布局
`Ctrl + R`
- 搜索和替换
`Ctrl + F`
## 画布操作
- 放大
`Ctrl + +`
- 缩小
`Ctrl + -`
- 回到根节点
`Ctrl + Enter`
- 适应画布
`Ctrl + I`

View file

@ -0,0 +1,109 @@
# Custom Command Shortcut Reference
Starting from version 0.1.5+, the plugin no longer provides default shortcuts. All commands have been converted to OB commands, allowing you to set custom shortcuts for each command. This document lists the original default shortcuts for reference.
> In this document, the Ctrl key corresponds to the Command key on Mac systems.
>
> The `|` symbol in shortcuts indicates "or," while `+` indicates "and."
## Editing Operations
- Save
`Ctrl + S`
- Save and Update Image Data
`Ctrl + Shift + S`
## Node Operations
- Insert Child Node
`Tab | Insert`
- Insert Sibling Node
`Enter`
- Insert Parent Node
`Shift + Tab`
- Move Node Up
`Ctrl + ↑`
- Move Node Down
`Ctrl + ↓`
- Insert Summary
`Ctrl + G`
- Expand/Collapse Node
`/`
- Delete Node
`Delete | Backspace`
- Delete Current Node Only
`Shift + Backspace`
- Copy Node
`Ctrl + C`
- Cut Node
`Ctrl + X`
- Paste Node
`Ctrl + V`
- Edit Node
`F2`
- Undo
`Ctrl + Z`
- Redo
`Ctrl + Y`
- Select All
`Ctrl + A`
- Auto-arrange Layout
`Ctrl + R`
- Search and Replace
`Ctrl + F`
## Canvas Operations
- Zoom In
`Ctrl + +`
- Zoom Out
`Ctrl + -`
- Return to Root Node
`Ctrl + Enter`
- Fit to Canvas
`Ctrl + I`

View file

@ -131,9 +131,6 @@ class SmmEditView extends TextFileView {
}
})
}
// 注册热键覆盖
this._registerHotkeyOverrides()
}
// 获取视图数据(保存到文件)
@ -524,8 +521,6 @@ class SmmEditView extends TextFileView {
const nowActive = leaf?.view === this
if (nowActive && !this.isActive) {
// 标签被激活
// 注册热键覆盖
this._registerHotkeyOverrides()
this.isActive = true
// 激活后刷新视图
if (this.mindMapAPP) {
@ -545,8 +540,6 @@ class SmmEditView extends TextFileView {
}
} else if (!nowActive && this.isActive) {
// 标签失去激活
// 清理热键覆盖
this._clearPopScope()
const rect = this.warpEl.getBoundingClientRect()
this.isHidden = rect.width === 0 || rect.height === 0
if (this.mindMapAPP) {
@ -603,7 +596,6 @@ class SmmEditView extends TextFileView {
}
async onClose() {
this._clearPopScope()
await this.save() // 手动保存
this.clear()
this.saveButton = null
@ -851,38 +843,6 @@ class SmmEditView extends TextFileView {
return ''
}
}
// 清理之前的热键覆盖
_clearPopScope() {
if (this.popScope) {
this.popScope()
this.popScope = null
}
}
// 注册热键覆盖
_registerHotkeyOverrides() {
this._clearPopScope()
const scope = this.app.keymap.getRootScope()
const ctrlFHandler = scope.register(['Mod'], 'f', evt => {
evt.preventDefault()
return true
})
const ctrlSHandler = scope.register(['Mod'], 's', evt => {
evt.preventDefault()
const view = this.plugin._getActiveSmmView()
if (view) {
view.forceSave()
}
return true
})
scope.keys.unshift(scope.keys.pop())
scope.keys.unshift(scope.keys.pop())
this.popScope = () => {
scope.unregister(ctrlFHandler)
scope.unregister(ctrlSHandler)
}
}
}
export default SmmEditView

View file

@ -15,12 +15,10 @@
"printOutline": "Print Outline",
"import": "Import",
"export": "Export",
"saveAndUpdateImage": "Save and Update Image Data",
"insertCodeBlockToMd": "Insert Mind Map Code Block into Current Document",
"previewAsMindMap": "Preview as Mind Map",
"changeToReadonly": "Change to Readonly Mode",
"changeToEdit": "Change to Edit Mode",
"enterDemonstrate": "Enter Mind Map Demonstration Mode",
"changeToMdFile": "Convert to Markdown Document",
"changeToMindMapFile": "Convert to Mind Map Document"
},
@ -137,5 +135,47 @@
"title1": "Check for new versions",
"desc1": "After activation, it will check if a new version is available when the plugin starts. If your network cannot access Github, it is recommended to disable this option"
}
},
"commands": {
"save": "Edit operation-Save",
"saveAndUpdateImage": "Edit operation-Save and update image",
"undo": "Edit operation-Undo",
"redo": "Edit operation-Redo",
"searchReplace": "Edit operation-Search and replace",
"insertChildNode": "Node operation-Insert child node",
"insertSiblingNode": "Node operation-Insert sibling node",
"insertParentNode": "Node operation-Insert parent node",
"moveUpNode": "Node operation-Move up node",
"moveDownNode": "Node operation-Move down node",
"insertSummary": "Node operation-Insert summary",
"toggleExpandNode": "Node operation-Expand/collapse node",
"deleteNode": "Node operation-Delete node",
"deleteNodeOnly": "Node operation-Delete current node only",
"copyNode": "Node operation-Copy node",
"cutNode": "Node operation-Cut node",
"pasteNode": "Node operation-Paste node",
"selectAllNode": "Node operation-Select all",
"organizeLayout": "Node operation-Organize layout with one click",
"toggleBoldNode": "Node operation-Toggle bold",
"toggleItalicNode": "Node operation-Toggle italic",
"toggleUnderlineNode": "Node operation-Toggle underline",
"toggleStrikethroughNode": "Node operation-Toggle strikethrough",
"increaseFontSizeNode": "Node operation-Increase font size",
"decreaseFontSizeNode": "Node operation-Decrease font size",
"zoomInCanvas": "Canvas operation-Zoom in",
"zoomOutCanvas": "Canvas operation-Zoom out",
"backToRootCanvas": "Canvas operation-Back to root node",
"activateLeftCanvas": "Canvas operation-Move focus left",
"activateTopCanvas": "Canvas operation-Move focus up",
"activateRightCanvas": "Canvas operation-Move focus right",
"activateBottomCanvas": "Canvas operation-Move focus down",
"zoomFitCanvas": "Canvas operation-Fit to canvas",
"enterDemonstrate": "Auxiliary operation-Enter demonstration mode",
"openImageEdit": "Interface operation-Open image edit dialog",
"openHyperlinkEdit": "Interface operation-Open hyperlink edit dialog",
"openRemarkEdit": "Interface operation-Open remark edit dialog",
"openTagEdit": "Interface operation-Open tag edit dialog",
"openImport": "Interface operation-Open import dialog",
"openExport": "Interface operation-Open export dialog"
}
}

View file

@ -15,12 +15,10 @@
"printOutline": "In dàn bài",
"import": "Nhập vào",
"export": "Xuất ra",
"saveAndUpdateImage": "Lưu và cập nhật dữ liệu hình ảnh",
"insertCodeBlockToMd": "Chèn khối mã sơ đồ tư duy vào tài liệu hiện tại",
"previewAsMindMap": "Xem trước dưới dạng sơ đồ tư duy",
"changeToReadonly": "Chuyển sang chế độ xem",
"changeToEdit": "Chuyển sang chế độ chỉnh sửa",
"enterDemonstrate": "Vào chế độ trình diễn sơ đồ tư duy",
"changeToMdFile": "Chuyển đổi sang tài liệu Markdown",
"changeToMindMapFile": "Chuyển đổi sang tài liệu bản đồ tư duy"
},
@ -137,5 +135,47 @@
"title1": "Kiểm tra phiên bản mới",
"desc1": "Khi plugin khởi động, bạn sẽ kiểm tra xem có phiên bản mới không và nếu mạng của bạn không truy cập được Github, bạn nên tắt tùy chọn này."
}
},
"commands": {
"save": "Thao tác chỉnh sửa - Lưu",
"saveAndUpdateImage": "Thao tác chỉnh sửa - Lưu và cập nhật hình ảnh",
"undo": "Thao tác chỉnh sửa - Quay lại",
"redo": "Thao tác chỉnh sửa - Tiến tới",
"searchReplace": "Thao tác chỉnh sửa - Tìm kiếm và thay thế",
"insertChildNode": "Thao tác nút - Chèn nút con",
"insertSiblingNode": "Thao tác nút - Chèn nút cùng cấp",
"insertParentNode": "Thao tác nút - Chèn nút cha",
"moveUpNode": "Thao tác nút - Di chuyển nút lên",
"moveDownNode": "Thao tác nút - Di chuyển nút xuống",
"insertSummary": "Thao tác nút - Chèn tóm tắt",
"toggleExpandNode": "Thao tác nút - Mở rộng/Thu gọn nút",
"deleteNode": "Thao tác nút - Xóa nút",
"deleteNodeOnly": "Thao tác nút - Chỉ xóa nút hiện tại",
"copyNode": "Thao tác nút - Sao chép nút",
"cutNode": "Thao tác nút - Cắt nút",
"pasteNode": "Thao tác nút - Dán nút",
"selectAllNode": "Thao tác nút - Chọn tất cả",
"organizeLayout": "Thao tác nút - Sắp xếp bố cục một lần",
"toggleBoldNode": "Thao tác nút - Chuyển đổi in đậm",
"toggleItalicNode": "Thao tác nút - Chuyển đổi in nghiêng",
"toggleUnderlineNode": "Thao tác nút - Chuyển đổi gạch chân",
"toggleStrikethroughNode": "Thao tác nút - Chuyển đổi gạch ngang",
"increaseFontSizeNode": "Thao tác nút - Tăng kích thước chữ",
"decreaseFontSizeNode": "Thao tác nút - Giảm kích thước chữ",
"zoomInCanvas": "Thao tác canvas - Phóng to",
"zoomOutCanvas": "Thao tác canvas - Thu nhỏ",
"backToRootCanvas": "Thao tác canvas - Quay về nút gốc",
"activateLeftCanvas": "Thao tác canvas - Di chuyển tiêu điểm sang trái",
"activateTopCanvas": "Thao tác canvas - Di chuyển tiêu điểm lên trên",
"activateRightCanvas": "Thao tác canvas - Di chuyển tiêu điểm sang phải",
"activateBottomCanvas": "Thao tác canvas - Di chuyển tiêu điểm xuống dưới",
"zoomFitCanvas": "Thao tác canvas - Vừa với canvas",
"enterDemonstrate": "Thao tác hỗ trợ - Vào chế độ trình diễn",
"openImageEdit": "Thao tác giao diện - Mở hộp thoại chỉnh sửa hình ảnh",
"openHyperlinkEdit": "Thao tác giao diện - Mở hộp thoại chỉnh sửa siêu liên kết",
"openRemarkEdit": "Thao tác giao diện - Mở hộp thoại chỉnh sửa ghi chú",
"openTagEdit": "Thao tác giao diện - Mở hộp thoại chỉnh sửa thẻ",
"openImport": "Thao tác giao diện - Mở hộp thoại nhập",
"openExport": "Thao tác giao diện - Mở hộp thoại xuất"
}
}

View file

@ -15,12 +15,10 @@
"printOutline": "打印大纲",
"import": "导入",
"export": "导出",
"saveAndUpdateImage": "保存并更新图像数据",
"insertCodeBlockToMd": "插入思维导图代码块到当前文档",
"previewAsMindMap": "预览为思维导图",
"changeToReadonly": "切换为只读模式",
"changeToEdit": "切换为编辑模式",
"enterDemonstrate": "进入思维导图演示模式",
"changeToMdFile": "转换为Markdown文档",
"changeToMindMapFile": "转换为思维导图文档"
},
@ -137,5 +135,47 @@
"title1": "检查新版本",
"desc1": "开启后会在插件启动时检查是否有新版本可用如果你的网络访问不到Github则建议关闭该选项"
}
},
"commands": {
"save": "编辑操作-保存",
"saveAndUpdateImage": "编辑操作-保存并更新图像",
"undo": "编辑操作-回退",
"redo": "编辑操作-前进",
"searchReplace": "编辑操作-搜索和替换",
"insertChildNode": "节点操作-插入下级节点",
"insertSiblingNode": "节点操作-插入同级节点",
"insertParentNode": "节点操作-插入父节点",
"moveUpNode": "节点操作-上移节点",
"moveDownNode": "节点操作-下移节点",
"insertSummary": "节点操作-插入概要",
"toggleExpandNode": "节点操作-展开/收起节点",
"deleteNode": "节点操作-删除节点",
"deleteNodeOnly": "节点操作-仅删除当前节点",
"copyNode": "节点操作-复制节点",
"cutNode": "节点操作-剪切节点",
"pasteNode": "节点操作-粘贴节点",
"selectAllNode": "节点操作-全选",
"organizeLayout": "节点操作-一键整理布局",
"toggleBoldNode": "节点操作-切换粗体",
"toggleItalicNode": "节点操作-切换斜体",
"toggleUnderlineNode": "节点操作-切换下划线",
"toggleStrikethroughNode": "节点操作-切换删除线",
"increaseFontSizeNode": "节点操作-增大字号",
"decreaseFontSizeNode": "节点操作-减小字号",
"zoomInCanvas": "画布操作-放大",
"zoomOutCanvas": "画布操作-缩小",
"backToRootCanvas": "画布操作-回到根节点",
"activateLeftCanvas": "画布操作-向左移动焦点",
"activateTopCanvas": "画布操作-向上移动焦点",
"activateRightCanvas": "画布操作-向右移动焦点",
"activateBottomCanvas": "画布操作-向下移动焦点",
"zoomFitCanvas": "画布操作-适应画布",
"enterDemonstrate": "辅助操作-进入演示模式",
"openImageEdit": "界面操作-打开图片编辑弹窗",
"openHyperlinkEdit": "界面操作-打开超链接编辑弹窗",
"openRemarkEdit": "界面操作-打开备注编辑弹窗",
"openTagEdit": "界面操作-打开标签编辑弹窗",
"openImport": "界面操作-打开导入弹窗",
"openExport": "界面操作-打开导出弹窗"
}
}

View file

@ -15,12 +15,10 @@
"printOutline": "列印大綱",
"import": "匯入",
"export": "匯出",
"saveAndUpdateImage": "儲存並更新圖像資料",
"insertCodeBlockToMd": "插入思維導圖程式碼區塊到當前文件",
"previewAsMindMap": "預覽為心智圖",
"changeToReadonly": "切換為只讀模式",
"changeToEdit": "切換為編輯模式",
"enterDemonstrate": "進入心智圖演示模式",
"changeToMdFile": "轉換為Markdown檔案",
"changeToMindMapFile": "轉換為心智圖檔案"
},
@ -137,5 +135,47 @@
"title1": "檢查新版本",
"desc1": "開啟後會在挿件啟動時檢查是否有新版本可用如果你的網絡訪問不到Github則建議關閉該選項"
}
},
"commands": {
"save": "編輯操作-儲存",
"saveAndUpdateImage": "編輯操作-儲存並更新圖像",
"undo": "編輯操作-復原",
"redo": "編輯操作-重做",
"searchReplace": "編輯操作-搜尋和取代",
"insertChildNode": "節點操作-插入下級節點",
"insertSiblingNode": "節點操作-插入同級節點",
"insertParentNode": "節點操作-插入父節點",
"moveUpNode": "節點操作-上移節點",
"moveDownNode": "節點操作-下移節點",
"insertSummary": "節點操作-插入概要",
"toggleExpandNode": "節點操作-展開/收起節點",
"deleteNode": "節點操作-刪除節點",
"deleteNodeOnly": "節點操作-僅刪除目前節點",
"copyNode": "節點操作-複製節點",
"cutNode": "節點操作-剪下節點",
"pasteNode": "節點操作-貼上節點",
"selectAllNode": "節點操作-全選",
"organizeLayout": "節點操作-一鍵整理版面配置",
"toggleBoldNode": "節點操作-切換粗體",
"toggleItalicNode": "節點操作-切換斜體",
"toggleUnderlineNode": "節點操作-切換底線",
"toggleStrikethroughNode": "節點操作-切換刪除線",
"increaseFontSizeNode": "節點操作-增大字型大小",
"decreaseFontSizeNode": "節點操作-減小字型大小",
"zoomInCanvas": "畫布操作-放大",
"zoomOutCanvas": "畫布操作-縮小",
"backToRootCanvas": "畫布操作-回到根節點",
"activateLeftCanvas": "畫布操作-向左移動焦點",
"activateTopCanvas": "畫布操作-向上移動焦點",
"activateRightCanvas": "畫布操作-向右移動焦點",
"activateBottomCanvas": "畫布操作-向下移動焦點",
"zoomFitCanvas": "畫布操作-適應畫布",
"enterDemonstrate": "輔助操作-進入演示模式",
"openImageEdit": "介面操作-開啟圖片編輯彈窗",
"openHyperlinkEdit": "介面操作-開啟超連結編輯彈窗",
"openRemarkEdit": "介面操作-開啟備註編輯彈窗",
"openTagEdit": "介面操作-開啟標籤編輯彈窗",
"openImport": "介面操作-開啟匯入彈窗",
"openExport": "介面操作-開啟匯出彈窗"
}
}

View file

@ -33,8 +33,9 @@ export default class Commands {
id: 'create-smm-mindmap-insert-markdown',
name: this._t('action.createMindMapInsertToMd'),
checkCallback: checking => {
const markdownView =
this.app.workspace.getActiveViewOfType(MarkdownView)
const markdownView = this.app.workspace.getActiveViewOfType(
MarkdownView
)
if (markdownView) {
if (!checking) {
this.plugin._createSmmFile('', fileName => {
@ -60,41 +61,437 @@ export default class Commands {
})
}
_commonCheckCallback(checking, run) {
const view = this.plugin._getActiveSmmView()
if (view) {
if (!checking) {
run(view)
}
return true
}
return false
}
_addActionsCommand() {
// 演示模式
this._addMindMapEditActionCommands()
this._addMinMapNodeActionCommands()
this._addCanvasActionCommands()
this._addHelpActionCommands()
this._addUiActionCommands()
}
_addMindMapEditActionCommands() {
// 编辑操作-保存
this.addCommand({
id: 'enter-smm-mindmap-demonstrate',
name: this._t('action.enterDemonstrate'),
id: 'save-smm-mindmap',
name: this._t('commands.save'),
checkCallback: checking => {
const view = this.plugin._getActiveSmmView()
if (view) {
if (!checking) {
view.mindMapAPP.$bus.$emit('enter_demonstrate')
}
return true
}
return false
return this._commonCheckCallback(checking, view => {
view.forceSave()
})
}
})
// 保存并更新图像
// 编辑操作-保存并更新图像
this.addCommand({
id: 'save-smm-mindmap-and-update-image',
name: this._t('action.saveAndUpdateImage'),
hotkeys: [
{
modifiers: ['Mod', 'Shift'],
key: 's'
}
],
name: this._t('commands.saveAndUpdateImage'),
checkCallback: checking => {
const view = this.plugin._getActiveSmmView()
if (view) {
if (!checking) {
view.forceSaveAndUpdateImage()
}
return true
}
return false
return this._commonCheckCallback(checking, view => {
view.forceSaveAndUpdateImage()
})
}
})
// 编辑操作-回退
this.addCommand({
id: 'undo-smm-mindmap-node',
name: this._t('commands.undo'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'BACK')
})
}
})
// 编辑操作-前进
this.addCommand({
id: 'redo-smm-mindmap-node',
name: this._t('commands.redo'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'FORWARD')
})
}
})
// 编辑操作-搜索和替换
this.addCommand({
id: 'show-smm-mindmap-search',
name: this._t('commands.searchReplace'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('show_search')
})
}
})
}
_addMinMapNodeActionCommands() {
// 节点操作-插入下级节点
this.addCommand({
id: 'insert-smm-mindmap-child-node',
name: this._t('commands.insertChildNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'INSERT_CHILD_NODE')
})
}
})
// 节点操作-插入同级节点
this.addCommand({
id: 'insert-smm-mindmap-sibling-node',
name: this._t('commands.insertSiblingNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'INSERT_NODE')
})
}
})
// 节点操作-插入父节点
this.addCommand({
id: 'insert-smm-mindmap-parent-node',
name: this._t('commands.insertParentNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'INSERT_PARENT_NODE')
})
}
})
// 节点操作-上移节点
this.addCommand({
id: 'move-smm-mindmap-node-up',
name: this._t('commands.moveUpNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'UP_NODE')
})
}
})
// 节点操作-下移节点
this.addCommand({
id: 'move-smm-mindmap-node-down',
name: this._t('commands.moveDownNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'DOWN_NODE')
})
}
})
// 节点操作-插入概要
this.addCommand({
id: 'insert-smm-mindmap-summary',
name: this._t('commands.insertSummary'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'ADD_GENERALIZATION')
})
}
})
// 节点操作-展开/收起节点
this.addCommand({
id: 'toggle-expand-smm-mindmap-node',
name: this._t('commands.toggleExpandNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('toggleActiveExpand')
})
}
})
// 节点操作-删除节点
this.addCommand({
id: 'delete-smm-mindmap-node',
name: this._t('commands.deleteNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'REMOVE_NODE')
})
}
})
// 节点操作-仅删除当前节点
this.addCommand({
id: 'delete-smm-mindmap-node-only',
name: this._t('commands.deleteNodeOnly'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'REMOVE_CURRENT_NODE')
})
}
})
// 节点操作-复制节点
this.addCommand({
id: 'copy-smm-mindmap-node',
name: this._t('commands.copyNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('copyNode')
})
}
})
// 节点操作-剪切节点
this.addCommand({
id: 'cut-smm-mindmap-node',
name: this._t('commands.cutNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('cutNode')
})
}
})
// 节点操作-粘贴节点
this.addCommand({
id: 'paste-smm-mindmap-node',
name: this._t('commands.pasteNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('pasteNode')
})
}
})
// 节点操作-全选
this.addCommand({
id: 'select-all-smm-mindmap-node',
name: this._t('commands.selectAllNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'SELECT_ALL')
})
}
})
// 节点操作-一键整理布局
this.addCommand({
id: 'organize-smm-mindmap-layout',
name: this._t('commands.organizeLayout'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('execCommand', 'RESET_LAYOUT')
})
}
})
// 同级节点对齐todo
// 节点操作-切换粗体
this.addCommand({
id: 'toggle-bold-smm-mindmap-node',
name: this._t('commands.toggleBoldNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('toggleBold')
})
}
})
// 节点操作-切换斜体
this.addCommand({
id: 'toggle-italic-smm-mindmap-node',
name: this._t('commands.toggleItalicNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('toggleItalic')
})
}
})
// 节点操作-切换下划线
this.addCommand({
id: 'toggle-underline-smm-mindmap-node',
name: this._t('commands.toggleUnderlineNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('toggleUnderline')
})
}
})
// 节点操作-切换删除线
this.addCommand({
id: 'toggle-strikethrough-smm-mindmap-node',
name: this._t('commands.toggleStrikethroughNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('toggleStrikethrough')
})
}
})
// 节点操作-增大字号
this.addCommand({
id: 'increase-font-size-smm-mindmap-node',
name: this._t('commands.increaseFontSizeNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('increaseFontSize')
})
}
})
// 节点操作-减小字号
this.addCommand({
id: 'decrease-font-size-smm-mindmap-node',
name: this._t('commands.decreaseFontSizeNode'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('decreaseFontSize')
})
}
})
}
_addCanvasActionCommands() {
// 画布操作-放大
this.addCommand({
id: 'zoom-in-smm-mindmap',
name: this._t('commands.zoomInCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasZoomIn')
})
}
})
// 画布操作-缩小
this.addCommand({
id: 'zoom-out-smm-mindmap',
name: this._t('commands.zoomOutCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasZoomOut')
})
}
})
// 画布操作-回到根节点
this.addCommand({
id: 'back-to-root-smm-mindmap',
name: this._t('commands.backToRootCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasBackToRoot')
})
}
})
// 画布操作-向左移动焦点
this.addCommand({
id: 'activate-left-smm-mindmap',
name: this._t('commands.activateLeftCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasActivateLeftNode')
})
}
})
// 画布操作-向上移动焦点
this.addCommand({
id: 'activate-top-smm-mindmap',
name: this._t('commands.activateTopCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasActivateTopNode')
})
}
})
// 画布操作-向右移动焦点
this.addCommand({
id: 'activate-right-smm-mindmap',
name: this._t('commands.activateRightCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasActivateRightNode')
})
}
})
// 画布操作-向下移动焦点
this.addCommand({
id: 'activate-bottom-smm-mindmap',
name: this._t('commands.activateBottomCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasActivateBottomNode')
})
}
})
// 画布操作-适应画布
this.addCommand({
id: 'zoom-fit-smm-mindmap-node',
name: this._t('commands.zoomFitCanvas'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('canvasZoomFit')
})
}
})
}
_addHelpActionCommands() {
// 进入演示模式
this.addCommand({
id: 'enter-smm-mindmap-demonstrate',
name: this._t('commands.enterDemonstrate'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('enter_demonstrate')
})
}
})
}
_addUiActionCommands() {
// 打开图片编辑弹窗
this.addCommand({
id: 'open-smm-mindmap-image-edit',
name: this._t('commands.openImageEdit'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showNodeImage')
})
}
})
// 打开超链接编辑弹窗
this.addCommand({
id: 'open-smm-mindmap-hyperlink-edit',
name: this._t('commands.openHyperlinkEdit'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showNodeLink')
})
}
})
// 打开备注编辑弹窗
this.addCommand({
id: 'open-smm-mindmap-remark-edit',
name: this._t('commands.openRemarkEdit'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showNodeNote')
})
}
})
// 打开标签编辑弹窗
this.addCommand({
id: 'open-smm-mindmap-tag-edit',
name: this._t('commands.openTagEdit'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showNodeTag')
})
}
})
// 打开导入弹窗
this.addCommand({
id: 'open-smm-mindmap-import',
name: this._t('commands.openImport'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showImport')
})
}
})
// 打开导出弹窗
this.addCommand({
id: 'open-smm-mindmap-export',
name: this._t('commands.openExport'),
checkCallback: checking => {
return this._commonCheckCallback(checking, view => {
view.mindMapAPP.$bus.$emit('showExport')
})
}
})
}

View file

@ -205,154 +205,29 @@ export const backgroundSizeList = [
// 快捷键列表
export const shortcutKeyList = [
{
type: 'Obsidian specific',
list: [
{
icon: 'iconbaocun',
name: 'Save and update image data',
value: `${ctrl} + Shfit + S`
},
{
icon: 'iconxinbiaoqianyedakai',
name: 'New tab opens hyperlink',
value: `${ctrl} + Left key`
}
]
},
{
type: 'Node operation',
list: [
{
icon: 'icontianjiazijiedian',
name: 'Inert child node',
value: 'Tab | Insert'
},
{
icon: 'iconjiedian',
name: 'Insert sibling node',
value: enter
},
{
icon: 'icondodeparent',
name: 'Insert parent node',
value: 'Shift + Tab'
},
{
icon: 'iconshangyi',
name: 'Move up node',
value: `${ctrl} + ↑`
},
{
icon: 'iconxiayi',
name: 'Move down node',
value: `${ctrl} + ↓`
},
{
icon: 'icongaikuozonglan',
name: 'Insert summary',
value: `${ctrl} + G`
},
{
icon: 'iconzhankai',
name: 'Expand/UnExpand node',
value: '/'
},
{
icon: 'iconshanchu',
name: 'Delete node',
value: 'Delete | Backspace'
},
{
icon: 'iconshanchu',
name: 'Delete current node',
value: 'Shift + Backspace'
},
{
icon: 'iconfuzhi',
name: 'Copy node',
value: `${ctrl} + C`
},
{
icon: 'iconjianqie',
name: 'Cut node',
value: `${ctrl} + X`
},
{
icon: 'iconniantie',
name: 'Paste node',
value: `${ctrl} + V`
},
{
icon: 'iconbianji',
name: 'Edit node',
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
name: 'Text Wrap',
value: `Shift + ${enter}`
},
{
icon: 'iconhoutui-shi',
name: 'Undo',
value: `${ctrl} + Z`
},
{
icon: 'iconqianjin1',
name: 'Redo',
value: `${ctrl} + Y`
},
{
icon: 'iconquanxuan',
name: 'Select All',
value: `${ctrl} + A`
},
{
icon: 'iconquanxuan',
name: 'Multiple choice',
value: `Right click / ${ctrl} + Left click`
},
{
icon: 'iconzhengli',
name: 'Arrange layout',
value: `${ctrl} + R`
},
{
icon: 'iconsousuo',
name: 'Search and Replace',
value: `${ctrl} + F`
}
]
},
{
type: 'Canvas operation',
list: [
{
icon: 'iconfangda',
name: 'Zoom in',
value: `${ctrl} + +`
},
{
icon: 'iconsuoxiao',
name: 'Zoom out',
value: `${ctrl} + -`
},
{
icon: 'iconfangda',
name: 'Zoom in/Zoom out',
value: `${ctrl} + Mouse wheel`
},
{
icon: 'icondingwei',
name: 'Back root node',
value: `${ctrl} + ${enter}`
},
{
icon: 'iconquanping1',
name: 'Fit canvas',
value: `${ctrl} + i`
},
{
icon: 'iconshubiaoyidong',
name: 'Moving canvas',

View file

@ -209,154 +209,29 @@ const macFn = isMac ? 'fn + ' : ''
// Danh sách phím tắt
export const shortcutKeyList = [
{
type: 'Obsidian đặc biệt',
list: [
{
icon: 'iconbaocun',
name: 'Lưu và cập nhật dữ liệu hình ảnh',
value: `${ctrl} + Shfit + S`
},
{
icon: 'iconxinbiaoqianyedakai',
name: 'Trang nhãn mới Mở siêu kết nối',
value: `${ctrl} + Trái`
}
]
},
{
type: 'Hoạt động nút',
list: [
{
icon: 'icontianjiazijiedian',
name: 'Chèn nút thấp hơn',
value: 'Tab | Insert'
},
{
icon: 'iconjiedian',
name: 'Chèn nút ngang hàng',
value: enter
},
{
icon: 'icondodeparent',
name: 'Chèn nút cha',
value: 'Shift + Tab'
},
{
icon: 'iconshangyi',
name: 'Chuyển nút lên',
value: `${ctrl} + ↑`
},
{
icon: 'iconxiayi',
name: 'Di chuyển nút xuống',
value: `${ctrl} + ↓`
},
{
icon: 'icongaikuozonglan',
name: 'Chèn tóm tắt',
value: `${ctrl} + G`
},
{
icon: 'iconzhankai',
name: 'Mở rộng/thu gọn các nút',
value: '/'
},
{
icon: 'iconshanchu',
name: 'Xóa nút',
value: 'Delete | Backspace'
},
{
icon: 'iconshanchu',
name: 'Chỉ xóa nút hiện tại',
value: 'Shift + Backspace'
},
{
icon: 'iconfuzhi',
name: 'Sao chép nút',
value: `${ctrl} + C`
},
{
icon: 'iconjianqie',
name: 'Cắt nút',
value: `${ctrl} + X`
},
{
icon: 'iconniantie',
name: 'Dán nút',
value: `${ctrl} + V`
},
{
icon: 'iconbianji',
name: 'Sửa nút',
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
name: 'Dòng mới',
value: `Shift + ${enter}`
},
{
icon: 'iconhoutui-shi',
name: 'Lùi lại',
value: `${ctrl} + Z`
},
{
icon: 'iconqianjin1',
name: 'Tiến lên!',
value: `${ctrl} + Y`
},
{
icon: 'iconquanxuan',
name: 'Chọn tất cả',
value: `${ctrl} + A`
},
{
icon: 'iconquanxuan',
name: 'Nhiều lựa chọn',
value: `Phải / ${ctrl} + Trái`
},
{
icon: 'iconzhengli',
name: 'Name',
value: `${ctrl} + R`
},
{
icon: 'iconsousuo',
name: 'Tìm kiếm và thay thế',
value: `${ctrl} + F`
}
]
},
{
type: 'Hoạt động Canvas',
list: [
{
icon: 'iconfangda',
name: 'Phóng to',
value: `${ctrl} + +`
},
{
icon: 'iconsuoxiao',
name: 'Thu nhỏ',
value: `${ctrl} + -`
},
{
icon: 'iconfangda',
name: 'Phóng to/Thu nhỏ',
value: `${ctrl} + Cuộn chuột`
},
{
icon: 'icondingwei',
name: 'Trở lại Root Node',
value: `${ctrl} + ${enter}`
},
{
icon: 'iconquanping1',
name: 'Thích nghi với Canvas',
value: `${ctrl} + i`
},
{
icon: 'iconshubiaoyidong',
name: 'Di chuyển Canvas',

View file

@ -271,154 +271,29 @@ const macFn = isMac ? 'fn + ' : ''
// 快捷键列表
export const shortcutKeyList = [
{
type: 'Obsidian特有',
list: [
{
icon: 'iconbaocun',
name: '保存并更新图像数据',
value: `${ctrl} + Shfit + S`
},
{
icon: 'iconxinbiaoqianyedakai',
name: '新标签页打开超链接',
value: `${ctrl} + 左键`
}
]
},
{
type: '节点操作',
list: [
{
icon: 'icontianjiazijiedian',
name: '插入下级节点',
value: 'Tab | Insert'
},
{
icon: 'iconjiedian',
name: '插入同级节点',
value: enter
},
{
icon: 'icondodeparent',
name: '插入父节点',
value: 'Shift + Tab'
},
{
icon: 'iconshangyi',
name: '上移节点',
value: `${ctrl} + ↑`
},
{
icon: 'iconxiayi',
name: '下移节点',
value: `${ctrl} + ↓`
},
{
icon: 'icongaiyao',
name: '插入概要',
value: `${ctrl} + G`
},
{
icon: 'iconzhankai',
name: '展开/收起节点',
value: '/'
},
{
icon: 'iconshanchu',
name: '删除节点',
value: 'Delete | Backspace'
},
{
icon: 'iconshanchu',
name: '仅删除当前节点',
value: 'Shift + Backspace'
},
{
icon: 'iconfuzhi',
name: '复制节点',
value: `${ctrl} + C`
},
{
icon: 'iconjianqie',
name: '剪切节点',
value: `${ctrl} + X`
},
{
icon: 'iconniantie',
name: '粘贴节点',
value: `${ctrl} + V`
},
{
icon: 'iconbianji',
name: '编辑节点',
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
name: '文本换行',
value: `Shift + ${enter}`
},
{
icon: 'iconhoutui-shi',
name: '回退',
value: `${ctrl} + Z`
},
{
icon: 'iconqianjin1',
name: '前进',
value: `${ctrl} + Y`
},
{
icon: 'iconquanxuan',
name: '全选',
value: `${ctrl} + A`
},
{
icon: 'iconquanxuan',
name: '多选',
value: `右键 / ${ctrl} + 左键`
},
{
icon: 'iconzhengli',
name: '一键整理布局',
value: `${ctrl} + R`
},
{
icon: 'iconsousuo',
name: '搜索和替换',
value: `${ctrl} + F`
}
]
},
{
type: '画布操作',
list: [
{
icon: 'iconfangda',
name: '放大',
value: `${ctrl} + +`
},
{
icon: 'iconsuoxiao',
name: '缩小',
value: `${ctrl} + -`
},
{
icon: 'iconfangda',
name: '放大/缩小',
value: `${ctrl} + 鼠标滚动`
},
{
icon: 'icondingwei',
name: '回到根节点',
value: `${ctrl} + ${enter}`
},
{
icon: 'iconquanping1',
name: '适应画布',
value: `${ctrl} + i`
},
{
icon: 'iconshubiaoyidong',
name: '移动画布',

View file

@ -205,154 +205,29 @@ export const backgroundSizeList = [
// 快捷鍵列表
export const shortcutKeyList = [
{
type: 'Obsidian特有',
list: [
{
icon: 'iconbaocun',
name: '保存並更新影像數據',
value: `${ctrl} + Shfit + S`
},
{
icon: 'iconxinbiaoqianyedakai',
name: '新標籤頁打開超連結',
value: `${ctrl} + 左鍵`
}
]
},
{
type: '節點操作',
list: [
{
icon: 'icontianjiazijiedian',
name: '插入子節點',
value: 'Tab | Insert'
},
{
icon: 'iconjiedian',
name: '插入同層節點',
value: enter
},
{
icon: 'icondodeparent',
name: '插入父節點',
value: 'Shift + Tab'
},
{
icon: 'iconshangyi',
name: '上移節點',
value: `${ctrl} + ↑`
},
{
icon: 'iconxiayi',
name: '下移節點',
value: `${ctrl} + ↓`
},
{
icon: 'icongaikuozonglan',
name: '插入摘要',
value: `${ctrl} + G`
},
{
icon: 'iconzhankai',
name: '展開/收合節點',
value: '/'
},
{
icon: 'iconshanchu',
name: '刪除節點',
value: 'Delete | Backspace'
},
{
icon: 'iconshanchu',
name: '僅刪除目前節點',
value: 'Shift + Backspace'
},
{
icon: 'iconfuzhi',
name: '複製節點',
value: `${ctrl} + C`
},
{
icon: 'iconjianqie',
name: '剪下節點',
value: `${ctrl} + X`
},
{
icon: 'iconniantie',
name: '貼上節點',
value: `${ctrl} + V`
},
{
icon: 'iconbianji',
name: '編輯節點',
value: macFn + 'F2'
},
{
icon: 'iconhuanhang',
name: '文字換行',
value: `Shift + ${enter}`
},
{
icon: 'iconhoutui-shi',
name: '復原',
value: `${ctrl} + Z`
},
{
icon: 'iconqianjin1',
name: '重做',
value: `${ctrl} + Y`
},
{
icon: 'iconquanxuan',
name: '全選',
value: `${ctrl} + A`
},
{
icon: 'iconquanxuan',
name: '多重選擇',
value: `右鍵 / ${ctrl} + 左鍵`
},
{
icon: 'iconzhengli',
name: '一鍵整理版面配置',
value: `${ctrl} + R`
},
{
icon: 'iconsousuo',
name: '搜尋與取代',
value: `${ctrl} + F`
}
]
},
{
type: '畫布操作',
list: [
{
icon: 'iconfangda',
name: '放大',
value: `${ctrl} + +`
},
{
icon: 'iconsuoxiao',
name: '縮小',
value: `${ctrl} + -`
},
{
icon: 'iconfangda',
name: '放大/縮小',
value: `${ctrl} + 滑鼠滾輪`
},
{
icon: 'icondingwei',
name: '回到根節點',
value: `${ctrl} + ${enter}`
},
{
icon: 'iconquanping1',
name: '適應畫布',
value: `${ctrl} + i`
},
{
icon: 'iconshubiaoyidong',
name: '移動畫布',

View file

@ -297,7 +297,8 @@ export default {
zoomOut: 'Zoom out'
},
shortcutKey: {
title: 'Shortcut key'
title: 'Shortcut key',
tip: 'For other operations, please use commands, or you can set shortcut keys for commands yourself'
},
strusture: {
title: 'Strusture'

View file

@ -299,7 +299,8 @@ export default {
zoomOut: 'Thu nhỏ'
},
shortcutKey: {
title: 'Phím tắt'
title: 'Phím tắt',
tip: 'Các thao tác khác xin vui lòng thông qua lệnh, cũng có thể đặt lối tắt cho lệnh của bạn'
},
strusture: {
title: 'Cấu trúc'

View file

@ -291,7 +291,8 @@ export default {
zoomOut: '缩小'
},
shortcutKey: {
title: '快捷键'
title: '快捷键',
tip: '其他操作请通过命令,也可自行设置命令的快捷键'
},
strusture: {
title: '结构'

View file

@ -292,7 +292,8 @@ export default {
zoomOut: '縮小'
},
shortcutKey: {
title: '快速鍵'
title: '快速鍵',
tip: '其他操作請通過命令,也可自行設定命令的快速鍵'
},
strusture: {
title: '結構'

View file

@ -13,7 +13,7 @@
:class="{ disabled: insertNodeBtnDisabled }"
>
<span class="name">{{ $t('contextmenu.insertSiblingNode') }}</span>
<span class="desc">Enter</span>
<span class="desc"></span>
</div>
<div
class="item"
@ -21,7 +21,7 @@
:class="{ disabled: isGeneralization }"
>
<span class="name">{{ $t('contextmenu.insertChildNode') }}</span>
<span class="desc">Tab</span>
<span class="desc"></span>
</div>
<div
class="item"
@ -29,7 +29,7 @@
:class="{ disabled: insertNodeBtnDisabled }"
>
<span class="name">{{ $t('contextmenu.insertParentNode') }}</span>
<span class="desc">Shift + Tab</span>
<span class="desc"></span>
</div>
<div
class="item"
@ -37,7 +37,7 @@
:class="{ disabled: insertNodeBtnDisabled }"
>
<span class="name">{{ $t('contextmenu.insertSummary') }}</span>
<span class="desc">Ctrl + G</span>
<span class="desc"></span>
</div>
<div class="splitLine"></div>
<div
@ -46,7 +46,7 @@
:class="{ disabled: upNodeBtnDisabled }"
>
<span class="name">{{ $t('contextmenu.moveUpNode') }}</span>
<span class="desc">Ctrl + </span>
<span class="desc"></span>
</div>
<div
class="item"
@ -54,7 +54,7 @@
:class="{ disabled: downNodeBtnDisabled }"
>
<span class="name">{{ $t('contextmenu.moveDownNode') }}</span>
<span class="desc">Ctrl + </span>
<span class="desc"></span>
</div>
<div class="item" @click="exec('UNEXPAND_ALL')">
<span class="name">{{ $t('contextmenu.unExpandNodeChild') }}</span>
@ -65,11 +65,11 @@
<div class="splitLine"></div>
<div class="item danger" @click="exec('REMOVE_NODE')">
<span class="name">{{ $t('contextmenu.deleteNode') }}</span>
<span class="desc">Delete</span>
<span class="desc"></span>
</div>
<div class="item danger" @click="exec('REMOVE_CURRENT_NODE')">
<span class="name">{{ $t('contextmenu.deleteCurrentNode') }}</span>
<span class="desc">Shift + Backspace</span>
<span class="desc"></span>
</div>
<div class="splitLine"></div>
<div
@ -78,7 +78,7 @@
:class="{ disabled: isGeneralization }"
>
<span class="name">{{ $t('contextmenu.copyNode') }}</span>
<span class="desc">Ctrl + C</span>
<span class="desc"></span>
</div>
<div
class="item"
@ -86,11 +86,11 @@
:class="{ disabled: isGeneralization }"
>
<span class="name">{{ $t('contextmenu.cutNode') }}</span>
<span class="desc">Ctrl + X</span>
<span class="desc"></span>
</div>
<div class="item" @click="exec('PASTE_NODE')">
<span class="name">{{ $t('contextmenu.pasteNode') }}</span>
<span class="desc">Ctrl + V</span>
<span class="desc"></span>
</div>
<div class="splitLine"></div>
<div class="item" @click="exec('REMOVE_HYPERLINK')" v-if="hasHyperlink">
@ -134,7 +134,7 @@
<template v-if="type === 'svg'">
<div class="item" @click="exec('RETURN_CENTER')">
<span class="name">{{ $t('contextmenu.backCenter') }}</span>
<span class="desc">Ctrl + Enter</span>
<span class="desc"></span>
</div>
<div class="splitLine"></div>
<div class="item" @click="exec('EXPAND_ALL')">
@ -166,11 +166,11 @@
<div class="splitLine"></div>
<div class="item" @click="exec('RESET_LAYOUT')" v-if="!isReadonly">
<span class="name">{{ $t('contextmenu.arrangeLayout') }}</span>
<span class="desc">Ctrl + R</span>
<span class="desc"></span>
</div>
<div class="item" @click="exec('FIT_CANVAS')">
<span class="name">{{ $t('contextmenu.fitCanvas') }}</span>
<span class="desc">Ctrl + i</span>
<span class="desc"></span>
</div>
<div class="item" @click="exec('TOGGLE_ZEN_MODE')">
<span class="name">{{ $t('contextmenu.zenMode') }}</span>

View file

@ -247,6 +247,27 @@ export default {
this.$root.$bus.$on('obTabDeactivate', this.onObTabDeactivate)
this.$root.$bus.$on('toggleReadonly', this.onToggleReadonly)
this.$root.$bus.$on('jumpToNodeByUid', this.jumpToNodeByUid)
this.$root.$bus.$on('toggleActiveExpand', this.toggleActiveExpand)
this.$root.$bus.$on('copyNode', this.copyNode)
this.$root.$bus.$on('cutNode', this.cutNode)
this.$root.$bus.$on('pasteNode', this.pasteNode)
this.$root.$bus.$on('canvasZoomIn', this.canvasZoomIn)
this.$root.$bus.$on('canvasZoomOut', this.canvasZoomOut)
this.$root.$bus.$on('canvasBackToRoot', this.canvasBackToRoot)
this.$root.$bus.$on('canvasZoomFit', this.canvasZoomFit)
this.$root.$bus.$on('toggleBold', this.toggleBold)
this.$root.$bus.$on('toggleItalic', this.toggleItalic)
this.$root.$bus.$on('toggleUnderline', this.toggleUnderline)
this.$root.$bus.$on('toggleStrikethrough', this.toggleStrikethrough)
this.$root.$bus.$on('increaseFontSize', this.increaseFontSize)
this.$root.$bus.$on('decreaseFontSize', this.decreaseFontSize)
this.$root.$bus.$on('canvasActivateLeftNode', this.canvasActivateLeftNode)
this.$root.$bus.$on('canvasActivateRightNode', this.canvasActivateRightNode)
this.$root.$bus.$on(
'canvasActivateBottomNode',
this.canvasActivateBottomNode
)
this.$root.$bus.$on('canvasActivateTopNode', this.canvasActivateTopNode)
},
beforeDestroy() {
this.$root.$bus.$off('execCommand', this.execCommand)
@ -275,6 +296,30 @@ export default {
this.$root.$bus.$off('obTabDeactivate', this.onObTabDeactivate)
this.$root.$bus.$off('toggleReadonly', this.onToggleReadonly)
this.$root.$bus.$off('jumpToNodeByUid', this.jumpToNodeByUid)
this.$root.$bus.$off('toggleActiveExpand', this.toggleActiveExpand)
this.$root.$bus.$off('copyNode', this.copyNode)
this.$root.$bus.$off('cutNode', this.cutNode)
this.$root.$bus.$off('pasteNode', this.pasteNode)
this.$root.$bus.$off('canvasZoomIn', this.canvasZoomIn)
this.$root.$bus.$off('canvasZoomOut', this.canvasZoomOut)
this.$root.$bus.$off('canvasBackToRoot', this.canvasBackToRoot)
this.$root.$bus.$off('canvasZoomFit', this.canvasZoomFit)
this.$root.$bus.$off('toggleBold', this.toggleBold)
this.$root.$bus.$off('toggleItalic', this.toggleItalic)
this.$root.$bus.$off('toggleUnderline', this.toggleUnderline)
this.$root.$bus.$off('toggleStrikethrough', this.toggleStrikethrough)
this.$root.$bus.$off('increaseFontSize', this.increaseFontSize)
this.$root.$bus.$off('decreaseFontSize', this.decreaseFontSize)
this.$root.$bus.$off('canvasActivateLeftNode', this.canvasActivateLeftNode)
this.$root.$bus.$off(
'canvasActivateRightNode',
this.canvasActivateRightNode
)
this.$root.$bus.$off(
'canvasActivateBottomNode',
this.canvasActivateBottomNode
)
this.$root.$bus.$off('canvasActivateTopNode', this.canvasActivateTopNode)
clearTimeout(this.autoSaveTimer)
clearTimeout(this.savingTimer)
this.mindMap.destroy()
@ -525,7 +570,8 @@ export default {
style: {}
}
}
}
},
enableDefaultShortcutKeys: false
})
this.afterInitMindMap(this.tmpMindMap)
},
@ -1012,6 +1058,62 @@ export default {
}
node.setHyperlink(result.link, result.linkText || '')
}
},
//
toggleActiveExpand() {
this.mindMap.renderer.toggleActiveExpand()
},
copyNode() {
this.mindMap.renderer.copy()
},
cutNode() {
this.mindMap.renderer.cut()
},
pasteNode() {
this.mindMap.renderer.paste()
},
canvasZoomIn() {
this.mindMap.view.enlarge()
},
canvasZoomOut() {
this.mindMap.view.narrow()
},
canvasBackToRoot() {
this.mindMap.renderer.setRootNodeCenter()
},
canvasZoomFit() {
this.mindMap.view.fit()
},
toggleBold() {
this.mindMap.renderer.toggleNodeBold()
},
toggleItalic() {
this.mindMap.renderer.toggleNodeItalic()
},
toggleUnderline() {
this.mindMap.renderer.toggleNodeUnderline()
},
toggleStrikethrough() {
this.mindMap.renderer.toggleNodeLineThrough()
},
increaseFontSize() {
this.mindMap.renderer.increaseNodeFontSize()
},
decreaseFontSize() {
this.mindMap.renderer.decreaseNodeFontSize()
},
canvasActivateLeftNode() {
this.mindMap.keyboardNavigation.onLeftKeyUp()
},
canvasActivateRightNode() {
this.mindMap.keyboardNavigation.onRightKeyUp()
},
canvasActivateBottomNode() {
this.mindMap.keyboardNavigation.onDownKeyUp()
},
canvasActivateTopNode() {
this.mindMap.keyboardNavigation.onUpKeyUp()
}
}
}

View file

@ -169,6 +169,7 @@ export default {
},
handleShowNodeLink() {
if (!this.activeNodes || this.activeNodes.length === 0) return
if (this.activeNodes.length > 0) {
const firstNode = this.activeNodes[0]
const link = firstNode.getData('hyperlink') || ''

View file

@ -120,6 +120,7 @@ export default {
//
handleShowNodeImage() {
if (!this.activeNodes || this.activeNodes.length === 0) return
this.reset()
this.getObFileList()
if (this.activeNodes.length > 0) {

View file

@ -83,6 +83,7 @@ export default {
},
handleShowNodeNote(node) {
if (this.activeNodes.length === 0 && !node) return
this.$root.$bus.$emit('startTextEdit')
if (node) {
this.appointNode = node

View file

@ -118,6 +118,7 @@ export default {
},
handleShowNodeTag() {
if (this.activeNodes.length === 0) return
this.$root.$bus.$emit('startTextEdit')
this.dialogVisible = true
},

View file

@ -122,7 +122,6 @@ export default {
'search_match_node_list_change',
this.onSearchMatchNodeListChange
)
this.mindMap.keyCommand.addShortcut('Control+f', this.showSearch)
this.$root.$bus.$on('windowResize', this.setSearchResultListHeight)
this.$root.$bus.$on('setData', this.close)
},
@ -139,7 +138,6 @@ export default {
'search_match_node_list_change',
this.onSearchMatchNodeListChange
)
this.mindMap.keyCommand.removeShortcut('Control+f', this.showSearch)
this.$root.$bus.$off('windowResize', this.setSearchResultListHeight)
this.$root.$bus.$off('setData', this.close)
},

View file

@ -15,6 +15,7 @@
</div>
</div>
</div>
<div class="tip">{{ $t('shortcutKey.tip') }}</div>
</div>
</Sidebar>
</template>
@ -115,5 +116,12 @@ export default {
}
}
}
.tip {
font-size: 14px;
color: #909090;
margin-top: 20px;
margin-bottom: 12px;
}
}
</style>