This commit is contained in:
Rizky 2024-01-27 04:54:50 +07:00
parent d1e57f469c
commit 6538c67789
2 changed files with 7 additions and 1 deletions

View File

@ -45,6 +45,12 @@ export const Vi: FC<{
w.isMobile = mode === "mobile";
w.isDesktop = mode === "desktop";
w.preload = (urls: string[]) => {
for (const url of urls) {
vi.page.navs[page_id].add(url);
}
};
vi.page.cur.id = page_id;
vi.on_status_changes = on_status_changed;

View File

@ -14,7 +14,7 @@ export const baseTypings = `
const isLayout: boolean;
const isMobile: boolean;
const isDesktop: boolean;
const preload: (pathname: string) => void;
const preload: (urls: string[]) => void;
const apiHeaders: Record<string, any>;
const navigate: (url: string) => void;
const params: any;