From 62005141132da1e9761598fa3e4b35b4dab38a89 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 21 Dec 2019 02:06:02 +0100 Subject: Implemented VueX and a basic UIStore with the fullscreen mutation Some renaming --- viewer/src/plugins/vuex.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 viewer/src/plugins/vuex.ts (limited to 'viewer/src/plugins/vuex.ts') diff --git a/viewer/src/plugins/vuex.ts b/viewer/src/plugins/vuex.ts new file mode 100644 index 0000000..9b2fa46 --- /dev/null +++ b/viewer/src/plugins/vuex.ts @@ -0,0 +1,23 @@ +import Vue from 'vue' +import Vuex from 'vuex' +import { extractVuexModule } from "vuex-class-component"; +import { createProxy } from "vuex-class-component"; +import UIStore from '@/store/uiStore'; + +Vue.use(Vuex) + +const store = new Vuex.Store({ + modules: { + ...extractVuexModule(UIStore) + } +}); + +Vue.use((vue) => vue.prototype.$uiStore = createProxy(store, UIStore)); + +declare module 'vue/types/vue' { + interface Vue { + $uiStore: UIStore + } +} + +export default store; -- cgit v1.2.3