From 8152fab1853a2f5178d451a0de57ef1675ed43a2 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: Mon, 3 Jun 2024 09:25:35 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E6=96=B0=E5=BB=BA=E5=92=8C?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E6=8F=90=E7=A4=BA=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/lang/en_us.js | 4 +++- web/src/lang/zh_cn.js | 4 +++- web/src/pages/Edit/components/Toolbar.vue | 28 ++++++++++++++++------- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index fd245f27..5fe245fa 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -277,7 +277,9 @@ export default { fileOpenFailed: 'File open failed', defaultFileName: 'Mind map', creatingTip: 'Creating file', - directory: 'Directory' + directory: 'Directory', + newFileTip: 'Please export the currently edited file before creating a new one, otherwise the content will be lost', + openFileTip: 'Please export the currently edited file before opening it, otherwise the content will be lost' }, edit: { newFeatureNoticeTitle: 'New feature reminder', diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index e478aa1c..80ceae02 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -273,7 +273,9 @@ export default { fileOpenFailed: '文件打开失败', defaultFileName: '思维导图', creatingTip: '正在创建文件', - directory: '目录' + directory: '目录', + newFileTip: '新建文件前请先导出当前编辑的文件,否则内容会丢失', + openFileTip: '打开文件前请先导出当前编辑的文件,否则内容会丢' }, edit: { newFeatureNoticeTitle: '新特性提醒', diff --git a/web/src/pages/Edit/components/Toolbar.vue b/web/src/pages/Edit/components/Toolbar.vue index 15a3a55d..70e2d5bf 100644 --- a/web/src/pages/Edit/components/Toolbar.vue +++ b/web/src/pages/Edit/components/Toolbar.vue @@ -30,14 +30,26 @@ {{ $t('toolbar.directory') }} -
- - {{ $t('toolbar.newFile') }} -
-
- - {{ $t('toolbar.openFile') }} -
+ +
+ + {{ $t('toolbar.newFile') }} +
+
+ +
+ + {{ $t('toolbar.openFile') }} +
+
{{ $t('toolbar.saveAs') }}