From a216c966b16d12530d3c828d2564e4bae7d3f3c6 Mon Sep 17 00:00:00 2001 From: xg <490599161@qq.com> Date: Sat, 11 Jul 2020 17:24:56 +0800 Subject: [PATCH] no message --- src/renderer/views/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/views/index.vue b/src/renderer/views/index.vue index 9486106..2cf8423 100644 --- a/src/renderer/views/index.vue +++ b/src/renderer/views/index.vue @@ -56,6 +56,8 @@ const fs = require('fs') import { ipcRenderer, shell, clipboard } from 'electron' const { dialog } = require('electron').remote +const { remote } = require('electron') +let configDir = remote.app.getPath('userData') export default { data() { return { @@ -112,8 +114,10 @@ export default { doExport() { ipcRenderer.send('do-export', this.useDefault ? '' : this.name) ipcRenderer.on('asynchronous-export', (event, arg) => { + let folderName = configDir + arg.substr(0, arg.lastIndexOf('.')) dialog.showSaveDialog( { + defaultPath: folderName + '.zip', title: '保存文件', buttonLabel: '导出', filters: [{ name: 'Custom File Type', extensions: ['zip'] }]