From c8d5a34640f4f7a5f5c8484a4d77d6a5b3716ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Thu, 5 Sep 2024 09:40:41 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E6=94=AF=E6=8C=81=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=92=8C=E5=AF=BC=E5=87=BAFreeMind=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/config/en.js | 6 +++ web/src/config/zh.js | 6 +++ web/src/lang/en_us.js | 4 +- web/src/lang/zh_cn.js | 4 +- web/src/pages/Edit/components/Edit.vue | 3 ++ web/src/pages/Edit/components/Export.vue | 20 +++++++++- web/src/pages/Edit/components/Import.vue | 49 ++++++++++++++++++++---- 7 files changed, 80 insertions(+), 12 deletions(-) diff --git a/web/src/config/en.js b/web/src/config/en.js index 8ab141a5..a98fdd32 100644 --- a/web/src/config/en.js +++ b/web/src/config/en.js @@ -495,6 +495,12 @@ export const downTypeList = [ type: 'txt', icon: 'iconTXT', desc: 'Plain text file' + }, + { + name: 'FreeMind', + type: 'mm', + icon: 'iconTXT', + desc: 'FreeMind software format' } ] diff --git a/web/src/config/zh.js b/web/src/config/zh.js index 9b24c5c1..bf91eda4 100644 --- a/web/src/config/zh.js +++ b/web/src/config/zh.js @@ -589,6 +589,12 @@ export const downTypeList = [ type: 'txt', icon: 'iconTXT', desc: '纯文本文件' + }, + { + name: 'FreeMind', + type: 'mm', + icon: 'iconTXT', + desc: 'FreeMind软件格式' } ] diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index f4f4917e..dbb9aef1 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -157,8 +157,8 @@ export default { import: { title: 'Import', selectFile: 'Select file', - supportFile: 'Support .smm、.json、.xmind、.xlsx、.md file', - enableFileTip: 'Please select .smm、.json、.xmind、.xlsx、.md file', + supportFile: 'Support .smm、.json、.xmind、.xlsx、.md、 .mm file', + enableFileTip: 'Please select .smm、.json、.xmind、.xlsx、.md、 .mm file', maxFileNum: 'At most one file can be selected', notSelectTip: 'Please select the file to import', fileContentError: 'The file content is incorrect', diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index e7b71a59..bfb4be35 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -155,8 +155,8 @@ export default { import: { title: '导入', selectFile: '选取文件', - supportFile: '支持.smm、.json、.xmind、.xlsx、.md文件', - enableFileTip: '请选择.smm、.json、.xmind、.xlsx、.md文件', + supportFile: '支持.smm、.json、.xmind、.xlsx、.md、 .mm文件', + enableFileTip: '请选择.smm、.json、.xmind、.xlsx、.md、 .mm文件', maxFileNum: '最多只能选择一个文件', notSelectTip: '请选择要导入的文件', fileContentError: '文件内容有误', diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index ef9d9ec0..7d61efd9 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -79,6 +79,8 @@ import OuterFrame from 'simple-mind-map/src/plugins/OuterFrame.js' // import Notation from 'simple-mind-map-plugin-notation' // 编号插件,该插件为付费插件,详情请查看开发文档 // import Numbers from 'simple-mind-map-plugin-numbers' +// Freemind软件格式导入导出插件,该插件为付费插件,详情请查看开发文档 +import Freemind from 'simple-mind-map-plugin-freemind' import OutlineSidebar from './OutlineSidebar' import Style from './Style' import BaseStyle from './BaseStyle' @@ -135,6 +137,7 @@ MindMap.usePlugin(MiniMap) .usePlugin(RainbowLines) .usePlugin(Demonstrate) .usePlugin(OuterFrame) + .usePlugin(Freemind) // .usePlugin(Cooperate) // 协同插件 // 注册自定义主题 diff --git a/web/src/pages/Edit/components/Export.vue b/web/src/pages/Edit/components/Export.vue index aa96e22c..db769a7c 100644 --- a/web/src/pages/Edit/components/Export.vue +++ b/web/src/pages/Edit/components/Export.vue @@ -8,7 +8,7 @@ element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" :width="isMobile ? '90%' : '50%'" - :top="isMobile? '20px' : '15vh'" + :top="isMobile ? '20px' : '15vh'" >