正在显示
3 个修改的文件
包含
14 行增加
和
7 行删除
src/renderer/store/getters.js
0 → 100644
| ... | @@ -5,10 +5,12 @@ import { createPersistedState, createSharedMutations } from 'vuex-electron' | ... | @@ -5,10 +5,12 @@ import { createPersistedState, createSharedMutations } from 'vuex-electron' |
| 5 | 5 | ||
| 6 | import modules from './modules' | 6 | import modules from './modules' |
| 7 | 7 | ||
| 8 | +import getters from './getters' | ||
| 8 | Vue.use(Vuex) | 9 | Vue.use(Vuex) |
| 9 | 10 | ||
| 10 | export default new Vuex.Store({ | 11 | export default new Vuex.Store({ |
| 11 | modules, | 12 | modules, |
| 13 | + getters, | ||
| 12 | plugins: [ | 14 | plugins: [ |
| 13 | createPersistedState(), | 15 | createPersistedState(), |
| 14 | createSharedMutations() | 16 | createSharedMutations() | ... | ... |
| 1 | // 记录的数值 | 1 | // 记录的数值 |
| 2 | -const state = { | 2 | +const Counter = { |
| 3 | + state: { | ||
| 3 | 4 | ||
| 4 | -} | 5 | + }, |
| 5 | 6 | ||
| 6 | -const mutations = { | 7 | + mutations: { |
| 7 | 8 | ||
| 8 | -} | 9 | + }, |
| 9 | 10 | ||
| 10 | -const actions = { | 11 | + actions: { |
| 11 | 12 | ||
| 13 | + } | ||
| 12 | } | 14 | } |
| 13 | - | ||
| 14 | export default { | 15 | export default { |
| 15 | - state | 16 | + Counter |
| 16 | } | 17 | } | ... | ... |
-
请 注册 或 登录 后发表评论