mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 15:15:02 +00:00
Initial port to vue 3
This commit is contained in:
parent
e1966534d5
commit
454981fa1f
14 changed files with 1906 additions and 1804 deletions
|
@ -1,14 +1,11 @@
|
|||
import Vue from "vue";
|
||||
import Vuex, { Store } from "vuex";
|
||||
|
||||
Vue.use(Vuex);
|
||||
import { createStore, Store } from "vuex";
|
||||
|
||||
import { AuthStore } from "./auth";
|
||||
import { DocsStore } from "./docs";
|
||||
import { GuildStore } from "./guilds";
|
||||
import { RootState } from "./types";
|
||||
|
||||
export const RootStore = new Vuex.Store<RootState>({
|
||||
export const RootStore = createStore({
|
||||
modules: {
|
||||
auth: AuthStore,
|
||||
guilds: GuildStore,
|
||||
|
@ -17,16 +14,8 @@ export const RootStore = new Vuex.Store<RootState>({
|
|||
});
|
||||
|
||||
// Set up typings so Vue/our components know about the state's types
|
||||
declare module "vue/types/options" {
|
||||
interface ComponentOptions<V extends Vue> {
|
||||
// @ts-ignore
|
||||
store?: Store<RootState>;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
interface Vue {
|
||||
// @ts-ignore
|
||||
declare module "vue" {
|
||||
interface ComponentCustomProperties {
|
||||
$store: Store<RootState>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue