自前ルーティング (#6759)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2020-10-25 01:21:41 +09:00
committed by GitHub
parent d4da5a1eea
commit 254cfaea28
59 changed files with 625 additions and 220 deletions

View File

@ -5,6 +5,7 @@ import { store } from '@/store';
import { apiUrl } from '@/config';
import MkPostFormDialog from '@/components/post-form-dialog.vue';
import MkWaitingDialog from '@/components/waiting-dialog.vue';
import { resolve } from '@/router';
const ua = navigator.userAgent.toLowerCase();
export const isMobile = /mobile|iphone|ipad|android/.test(ua);
@ -162,7 +163,8 @@ export function popup(component: Component | typeof import('*.vue'), props: Reco
};
}
export function pageWindow(url: string, component: Component | typeof import('*.vue'), props: Record<string, any>) {
export function pageWindow(url: string) {
const { component, props } = resolve(url);
popup(defineAsyncComponent(() => import('@/components/page-window.vue')), {
initialUrl: url,
initialComponent: markRaw(component),