workflow: use pinia replace vuex and fix some bug

This commit is contained in:
xiaoxian521
2021-05-28 16:51:49 +08:00
parent a26f711d83
commit d9132ffa64
19 changed files with 264 additions and 223 deletions

View File

@@ -1,12 +1,9 @@
import { createStore } from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import type { App } from "vue";
import { createPinia } from "pinia";
const store = createPinia();
export default createStore({
getters,
modules: {
app,
settings
}
})
export function setupStore(app: App<Element>) {
app.use(store);
}
export { store };