parent
8cc4f16d93
commit
9287db0544
6 changed files with 320 additions and 387 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@ |
||||
// 用于创建vue中核心 store
|
||||
// 引入Vue
|
||||
import Vue from "vue"; |
||||
// 引入vuex
|
||||
import Vuex from 'vuex' |
||||
|
||||
// 应用Vuex插件
|
||||
Vue.use(Vuex) |
||||
|
||||
// 准备actions-用于响应组件中的动作
|
||||
const actions = {} |
||||
//准备mutations-用于操作数据
|
||||
const mutations = {} |
||||
//准备state-用于存储数据
|
||||
const state = {} |
||||
|
||||
// 创建并导出store
|
||||
export default new Vuex.Store({ |
||||
actions, |
||||
mutations, |
||||
state, |
||||
}) |
Loading…
Reference in new issue