diff --git a/index.html b/index.html
index 6529e4ca..3cb789fb 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
一个简单的web思维导图实现
\ No newline at end of file
+一个简单的web思维导图实现
\ No newline at end of file
diff --git a/web/src/pages/Edit/components/Toolbar.vue b/web/src/pages/Edit/components/Toolbar.vue
index 85183fd6..c87736a7 100644
--- a/web/src/pages/Edit/components/Toolbar.vue
+++ b/web/src/pages/Edit/components/Toolbar.vue
@@ -260,9 +260,9 @@ export default {
let [ _fileHandle ] = await window.showOpenFilePicker({
types: [
{
- description: 'file',
+ description: '',
accept: {
- 'application/*': ['.json', '.smm']
+ 'application/json': ['.smm']
}
},
],
@@ -280,7 +280,10 @@ export default {
this.readFile();
} catch (error) {
console.log(error);
- this.$message.warning('你的浏览器可能不支持哦');
+ if (error.toString().includes('aborted')) {
+ return
+ }
+ this.$message.warning('你的浏览器可能不支持,建议使用最新版本的Chrome浏览器');
}
},
@@ -379,9 +382,10 @@ export default {
try {
let _fileHandle = await window.showSaveFilePicker({
types: [{
- description: 'file',
- accept: {'application/*': ['.json', '.smm']},
+ description: '',
+ accept: {'application/json': ['.smm']},
}],
+ suggestedName: '思维导图'
});
if (!_fileHandle) {
return;
@@ -400,7 +404,10 @@ export default {
loading.close();
} catch (error) {
console.log(error);
- this.$message.warning('你的浏览器可能不支持哦');
+ if (error.toString().includes('aborted')) {
+ return
+ }
+ this.$message.warning('你的浏览器可能不支持,建议使用最新版本的Chrome浏览器');
}
},
}