1 | import { PageInstance } from '@tarojs/runtime';
|
2 | import type { PageConfig, RouterAnimate } from '@tarojs/taro';
|
3 | import type { Route, SpaRouterConfig } from '../../types/router';
|
4 | export default class PageHandler {
|
5 | protected config: SpaRouterConfig;
|
6 | protected readonly defaultAnimation: RouterAnimate;
|
7 | protected unloadTimer: ReturnType<typeof setTimeout> | null;
|
8 | protected hideTimer: ReturnType<typeof setTimeout> | null;
|
9 | protected lastHidePage: HTMLElement | null;
|
10 | protected lastUnloadPage: PageInstance | null;
|
11 | homePage: string;
|
12 | constructor(config: SpaRouterConfig);
|
13 | get appId(): string;
|
14 | get router(): import("../../types/router").Router;
|
15 | get routerMode(): "hash" | "browser" | "multi";
|
16 | get customRoutes(): Record<string, string | string[]>;
|
17 | get routes(): Route[];
|
18 | get tabBarList(): import("@tarojs/taro").TabBarItem[];
|
19 | get PullDownRefresh(): any;
|
20 | get animation(): boolean | RouterAnimate;
|
21 | get animationDelay(): number;
|
22 | get animationDuration(): number;
|
23 | set pathname(p: string);
|
24 | get pathname(): string;
|
25 | get basename(): string;
|
26 | get pageConfig(): Route | undefined;
|
27 | get isTabBar(): boolean;
|
28 | getHomePage(): string;
|
29 | isSamePage(page?: PageInstance | null): boolean;
|
30 | get search(): string;
|
31 | getQuery(stamp?: number, search?: string, options?: Record<string, unknown>): {
|
32 | [x: string]: unknown;
|
33 | };
|
34 | mount(): void;
|
35 | onReady(page: PageInstance, onLoad?: boolean): void;
|
36 | load(page: PageInstance, pageConfig?: Route, stacksIndex?: number): void;
|
37 | unload(page?: PageInstance | null, delta?: number, top?: boolean): void;
|
38 | show(page?: PageInstance | null, pageConfig?: Route, stacksIndex?: number): void;
|
39 | hide(page?: PageInstance | null): void;
|
40 | addAnimation(pageEl?: HTMLElement | null, first?: boolean): void;
|
41 | getPageContainer(page?: PageInstance | null): HTMLElement | null;
|
42 | bindPageEvents(page: PageInstance, pageEl?: HTMLElement | null, config?: Partial<PageConfig>): void;
|
43 | }
|