From 2150565c85a8ed7e728a3479936f1012789ea882 Mon Sep 17 00:00:00 2001 From: talktao Date: Fri, 18 Mar 2022 22:30:12 +0800 Subject: [PATCH] =?UTF-8?q?init=EF=BC=9AVuex=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/store/index.ts diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..4488e74 --- /dev/null +++ b/src/store/index.ts @@ -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;