wip
This commit is contained in:
20
src/client/os.ts
Normal file
20
src/client/os.ts
Normal 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
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user