🔨 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

@@ -21,7 +21,7 @@ export default {
}
},
created () {
if (this.type === this.$db.get('picBed.current').value()) {
if (this.type === this.$db.get('picBed.current')) {
this.value = true
}
},

View File

@@ -83,7 +83,7 @@ export default {
deep: true,
handler (val) {
this.ruleForm = Object.assign({}, {})
const config = this.$db.read().get(`picBed.${this.id}`).value()
const config = this.$db.get(`picBed.${this.id}`)
if (val.length > 0) {
this.configList = cloneDeep(val).map(item => {
let defaultValue = item.default !== undefined

View File

@@ -18,7 +18,7 @@ export default {
}
},
created () {
this.$db.read().get('settings.shortKey')
this.$db.get('settings.shortKey')
},
data () {
return {