init:Vuex初始化

This commit is contained in:
talktao 2022-03-18 22:30:12 +08:00
parent 350d5aa91f
commit 2150565c85

29
src/store/index.ts Normal file
View File

@ -0,0 +1,29 @@
import { createStore } from "vuex";
const store = createStore({
state: {
isLoading: false,
userNmae: "vue3.0开发H5模板"
},
getters: {
},
mutations: {
changeIsLoading(state, val) {
state.isLoading = val;
},
getUserNmae(state,data) {
state.userNmae = data
}
},
actions: {
},
modules: {},
});
export default store;