mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
fix: 修复 ts 类型声明问题
This commit is contained in:
parent
95ba5e5592
commit
6f914a755e
43
packages/fes-plugin-layout/types.d.ts
vendored
43
packages/fes-plugin-layout/types.d.ts
vendored
@ -11,6 +11,28 @@ interface Menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const Page: Component;
|
export const Page: Component;
|
||||||
|
|
||||||
|
interface LayoutRuntimeConfig {
|
||||||
|
footer?: string;
|
||||||
|
theme?: 'dark' | 'light';
|
||||||
|
navigation?: 'side' | 'top' | 'mixin' | 'left-right';
|
||||||
|
title?: string;
|
||||||
|
isFixedHeader?: boolean;
|
||||||
|
isFixedSidebar?: boolean;
|
||||||
|
logo?: string;
|
||||||
|
multiTabs?: boolean;
|
||||||
|
sideWidth?: number;
|
||||||
|
menus?: Menu[] | (() => Ref<Menu[]> | Menu[]);
|
||||||
|
menuProps?: {
|
||||||
|
expandedKeys?: string[];
|
||||||
|
defaultExpandAll?: boolean;
|
||||||
|
accordion?: boolean;
|
||||||
|
};
|
||||||
|
renderCustom?: () => VNode | VNode[];
|
||||||
|
noFoundHandler?: (param: { router: Router } & NavigationGuard) => void;
|
||||||
|
unAccessHandler?: (param: { router: Router } & NavigationGuard) => void;
|
||||||
|
}
|
||||||
|
|
||||||
declare module '@fesjs/fes' {
|
declare module '@fesjs/fes' {
|
||||||
interface RouteMeta {
|
interface RouteMeta {
|
||||||
'keep-alive'?: boolean;
|
'keep-alive'?: boolean;
|
||||||
@ -40,25 +62,6 @@ declare module '@fesjs/fes' {
|
|||||||
| false;
|
| false;
|
||||||
}
|
}
|
||||||
interface PluginRuntimeConfig {
|
interface PluginRuntimeConfig {
|
||||||
layout?: {
|
layout?: LayoutRuntimeConfig | ((layoutRuntimeConfig: LayoutRuntimeConfig, { initialState }: { initialState: any }) => LayoutRuntimeConfig);
|
||||||
footer?: string;
|
|
||||||
theme?: 'dark' | 'light';
|
|
||||||
navigation?: 'side' | 'top' | 'mixin' | 'left-right';
|
|
||||||
title?: string;
|
|
||||||
isFixedHeader?: boolean;
|
|
||||||
isFixedSidebar?: boolean;
|
|
||||||
logo?: string;
|
|
||||||
multiTabs?: boolean;
|
|
||||||
sideWidth?: number;
|
|
||||||
menus?: Menu[] | (() => Ref<Menu[]> | Menu[]);
|
|
||||||
menuProps?: {
|
|
||||||
expandedKeys?: string[];
|
|
||||||
defaultExpandAll?: boolean;
|
|
||||||
accordion?: boolean;
|
|
||||||
};
|
|
||||||
renderCustom?: () => VNode | VNode[];
|
|
||||||
noFoundHandler?: (param: { router: Router } & NavigationGuard) => void;
|
|
||||||
unAccessHandler?: (param: { router: Router } & NavigationGuard) => void;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
packages/fes-preset-built-in/types.d.ts
vendored
3
packages/fes-preset-built-in/types.d.ts
vendored
@ -21,6 +21,7 @@ type RenderFunc = () => Promise<App>;
|
|||||||
interface Route {
|
interface Route {
|
||||||
base: string;
|
base: string;
|
||||||
mode: string;
|
mode: string;
|
||||||
|
routes: RouteRecordRaw[];
|
||||||
createHistory: createMemoryHistory | createWebHashHistory | createWebHistory;
|
createHistory: createMemoryHistory | createWebHashHistory | createWebHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ declare module '@fesjs/fes' {
|
|||||||
interface PluginRuntimeConfig {
|
interface PluginRuntimeConfig {
|
||||||
beforeRender?: BeforeRenderConfig;
|
beforeRender?: BeforeRenderConfig;
|
||||||
patchRoutes?: ({ routes }: { routes: RouteRecordRaw[] }) => void;
|
patchRoutes?: ({ routes }: { routes: RouteRecordRaw[] }) => void;
|
||||||
modifyRoute?: ({ base, mode, createHistory }: Route) => Route;
|
modifyRoute?: ({ base, mode, routes, createHistory }: Route) => Route;
|
||||||
modifyClientRenderOpts?: (option: ClientRenderOption) => ClientRenderOption;
|
modifyClientRenderOpts?: (option: ClientRenderOption) => ClientRenderOption;
|
||||||
rootContainer?: (component: DefineComponent, option: { routes: RouteRecordRaw[]; plugin: Plugin }) => Component;
|
rootContainer?: (component: DefineComponent, option: { routes: RouteRecordRaw[]; plugin: Plugin }) => Component;
|
||||||
onAppCreated?: ({ app, routes }: { app: App; routes: RouteRecordRaw[] }) => void;
|
onAppCreated?: ({ app, routes }: { app: App; routes: RouteRecordRaw[] }) => void;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user