持久化设置保存的地址和内容

const Store = require('electron-store')
const settingsStore = new Store({name:'Settings'})

let savedLocation =  settingsStore.get('saveFileLocation')
if(savedLocation){
   ...
}  
settingsStore.set('saveFileLocation',savedLocation)
const savedLocation = settingsStore.get('saveFileLocation') || remote.app.getPath('documents')
posted @ 2022-02-06 15:26  13522679763-任国强  阅读(31)  评论(0)    收藏  举报