This commit is contained in:
AceDataCloud committed 2021-08-28 00:28:15 +08:00
1 parent 7b98c36a1e
commit 504097d407
4 files changed
+33 -22

No files matched your search

+2 -1
View File
@@ -2,5 +2,6 @@ import { createApp } from 'vue';
import App from './App.vue';
import './style.css';
import router from './router/index';
import store from './store/index';
createApp(App).use(router).mount('#app');
createApp(App).use(router).use(store).mount('#app');
+21
View File
@@ -0,0 +1,21 @@
import { createApp } from 'vue';
import { createStore } from 'vuex';
interface IState {
count: number;
}
const store = createStore({
state(): IState {
return {
count: 0
};
},
mutations: {
increment(state: IState) {
state.count++;
}
}
});
export default store;