mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-15 03:32:11 +08:00
57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import {Component, VNode, Ref } from 'vue';
|
|
import { Router, NavigationGuard } from 'vue-router';
|
|
|
|
interface Menu {
|
|
name: string;
|
|
path: string;
|
|
match: string[];
|
|
title: string;
|
|
icon: string | Component;
|
|
children?: Menu[]
|
|
}
|
|
|
|
export interface LayoutBuildConfig {
|
|
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[];
|
|
menuProps: {
|
|
expandedKeys: string[];
|
|
defaultExpandAll: boolean;
|
|
accordion: boolean;
|
|
};
|
|
};
|
|
}
|
|
|
|
|
|
|
|
export interface LayoutRuntimeConfig {
|
|
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[],
|
|
noFoundHandler: (param: { router: Router } & NavigationGuard) => void;
|
|
unAccessHandler: (param: { router: Router } & NavigationGuard) => void;
|
|
};
|
|
}
|