This commit is contained in:
Hunlongyu
2019-12-06 10:58:38 +08:00
parent 84ac91a3d1
commit a29275ca73
9 changed files with 188 additions and 12 deletions

View File

@@ -1,16 +1,31 @@
<template>
<Row>
<Button type="primary" @click="switchTheme('light')">light</Button>
<Button type="primary" @click="switchTheme('dark')">Dark</Button>
<Button type="primary" @click="changeTheme('light')">light</Button>
<Button type="primary" @click="changeTheme('dark')">Dark</Button>
<Button type="primary" @click="add()">Add</Button>
</Row>
</template>
<script>
import { mapActions } from 'vuex'
import { collection } from '@/plugin/localforage/'
export default {
name: 'settings',
methods: {
switchTheme (e) {
this.$store.commit('SET_THEME', e)
...mapActions([
'changeTheme'
]),
add () {
// let data = {
// name: '冰雪奇缘',
// detail: '',
// category: '动画片',
// time: '20191206 12:12:45'
// }
collection.all().then(e => {
console.log(e)
})
}
}
},
created () {}
}
</script>