71 lines
1.5 KiB
TypeScript
71 lines
1.5 KiB
TypeScript
export type LayoutType = 'vertical';
|
||
|
||
// 仿豆包折叠逻辑
|
||
export type CollapseType =
|
||
| 'alwaysCollapsed' // 始终折叠
|
||
| 'followSystem' // 跟随系统视口宽度
|
||
| 'alwaysExpanded' // 始终打开
|
||
| 'narrowExpandWideCollapse'; // 系统视口 宽小则张,宽大则收
|
||
|
||
export interface DesignConfigState {
|
||
// 系统主题
|
||
darkMode: 'light' | 'dark' | 'inverted';
|
||
// 系统主题色
|
||
themeColor: string;
|
||
// 系统内置风格
|
||
themeColorList: string[];
|
||
// 是否开启路由动画
|
||
isPageAnimate: boolean;
|
||
// 路由动画类型
|
||
pageAnimateType: string;
|
||
// 布局模式 (纵向:vertical | ... | 自己定义)
|
||
layout: LayoutType;
|
||
// 折叠类型
|
||
collapseType: CollapseType;
|
||
// 是否折叠菜单
|
||
isCollapse: boolean;
|
||
}
|
||
|
||
export const themeColorList: string[] = [
|
||
'#5d9dfe',
|
||
'#2d8cf0',
|
||
'#0960bd',
|
||
'#0084f4',
|
||
'#009688',
|
||
'#536dfe',
|
||
'#ff5c93',
|
||
'#ee4f12',
|
||
'#0096c7',
|
||
'#9c27b0',
|
||
'#ff9800',
|
||
'#FF3D68',
|
||
'#00C1D4',
|
||
'#18a058',
|
||
'#78DEC7',
|
||
'#1768AC',
|
||
'#FB9300',
|
||
'#FC5404',
|
||
'#8675ff',
|
||
];
|
||
|
||
const design: DesignConfigState = {
|
||
// 深色主题
|
||
darkMode: 'light',
|
||
// 系统主题色
|
||
themeColor: '#F7B51C',
|
||
// 系统内置主题色列表
|
||
themeColorList,
|
||
// 是否开启路由动画
|
||
isPageAnimate: false,
|
||
// 路由动画类型
|
||
pageAnimateType: 'zoom-fade',
|
||
// 布局模式 (纵向:vertical | ... | 自己定义)
|
||
layout: 'vertical',
|
||
// 折叠类型
|
||
collapseType: 'followSystem',
|
||
// 是否折叠菜单
|
||
isCollapse: false,
|
||
};
|
||
|
||
export default design;
|