Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
xdmjun committed Jul 11, 2020
1 parent 89ea4ca commit a216c96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderer/views/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'] }]
Expand Down

0 comments on commit a216c96

Please sign in to comment.