mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 11:18:54 +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;
|
||||
|
||||
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' {
|
||||
interface RouteMeta {
|
||||
'keep-alive'?: boolean;
|
||||
@ -40,25 +62,6 @@ declare module '@fesjs/fes' {
|
||||
| false;
|
||||
}
|
||||
interface PluginRuntimeConfig {
|
||||
layout?: {
|
||||
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;
|
||||
};
|
||||
layout?: LayoutRuntimeConfig | ((layoutRuntimeConfig: LayoutRuntimeConfig, { initialState }: { initialState: any }) => LayoutRuntimeConfig);
|
||||
}
|
||||
}
|
||||
|
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 {
|
||||
base: string;
|
||||
mode: string;
|
||||
routes: RouteRecordRaw[];
|
||||
createHistory: createMemoryHistory | createWebHashHistory | createWebHistory;
|
||||
}
|
||||
|
||||
@ -32,7 +33,7 @@ declare module '@fesjs/fes' {
|
||||
interface PluginRuntimeConfig {
|
||||
beforeRender?: BeforeRenderConfig;
|
||||
patchRoutes?: ({ routes }: { routes: RouteRecordRaw[] }) => void;
|
||||
modifyRoute?: ({ base, mode, createHistory }: Route) => Route;
|
||||
modifyRoute?: ({ base, mode, routes, createHistory }: Route) => Route;
|
||||
modifyClientRenderOpts?: (option: ClientRenderOption) => ClientRenderOption;
|
||||
rootContainer?: (component: DefineComponent, option: { routes: RouteRecordRaw[]; plugin: Plugin }) => Component;
|
||||
onAppCreated?: ({ app, routes }: { app: App; routes: RouteRecordRaw[] }) => void;
|
||||
|
Loading…
x
Reference in New Issue
Block a user