This commit is contained in:
syuilo
2020-09-06 12:30:27 +09:00
parent 256307f1a9
commit e33f2398f5
270 changed files with 1173 additions and 961 deletions

20
src/client/os.ts Normal file
View File

@@ -0,0 +1,20 @@
import { defineAsyncComponent } from 'vue';
import { store } from './store';
export function api(endpoint: string, data: Record<string, any> = {}, token?: string | null | undefined) {
return store.dispatch('api', { endpoint, data, token });
}
export function dialog(props: Record<string, any>) {
return store.dispatch('showDialog', {
component: defineAsyncComponent(() => import('@/components/dialog.vue')),
props
});
}
export function menu(props: Record<string, any>) {
return store.dispatch('showDialog', {
component: defineAsyncComponent(() => import('@/components/menu.vue')),
props
});
}