🔨 Refactor: db class

This commit is contained in:
PiEgg
2019-09-11 19:30:08 +08:00
parent 1274893154
commit 554cc0dbf8
30 changed files with 214 additions and 162 deletions

View File

@@ -2,12 +2,12 @@ export default {
name: '',
data () {
return {
defaultPicBed: this.$db.read().get('picBed.current').value()
defaultPicBed: this.$db.get('picBed.current')
}
},
methods: {
setDefaultPicBed (type) {
this.$db.read().set('picBed.current', type).write()
this.$db.set('picBed.current', type)
this.defaultPicBed = type
const successNotification = new window.Notification('设置默认图床', {
body: '设置成功'