107 lines
2.3 KiB
TypeScript
107 lines
2.3 KiB
TypeScript
import type { Preferences } from './types'
|
||
|
||
/**
|
||
* 偏好设置默认值。
|
||
*
|
||
* 取值对照 vue-vben-admin 的 @core/preferences/config.ts,改动处:
|
||
* - app.name → G3Soft ERP
|
||
* - theme.colorPrimary → g3soft 主色
|
||
* - theme.mode → light(vben 默认 dark,业务系统默认浅色更常见)
|
||
* - logo.text → G3Soft
|
||
* 其余保持与 vben 一致,便于日后对照。
|
||
*/
|
||
export const defaultPreferences: Preferences = {
|
||
app: {
|
||
name: 'G3Soft ERP',
|
||
layout: 'sidebar-nav',
|
||
contentPadding: 16,
|
||
dynamicTitle: true,
|
||
enablePreferences: true,
|
||
zIndex: 200,
|
||
},
|
||
|
||
theme: {
|
||
colorPrimary: '212 100% 45%',
|
||
colorSuccess: '144 57% 58%',
|
||
colorWarning: '42 84% 61%',
|
||
colorDestructive: '348 100% 61%',
|
||
mode: 'light',
|
||
radius: 0.5,
|
||
fontSize: 14,
|
||
semiDarkHeader: false,
|
||
semiDarkSidebar: false,
|
||
colorGrayMode: false,
|
||
colorWeakMode: false,
|
||
},
|
||
|
||
sidebar: {
|
||
enable: true,
|
||
width: 224,
|
||
collapseWidth: 60,
|
||
collapsed: false,
|
||
collapsedShowTitle: false,
|
||
collapsedButton: true,
|
||
accordion: true,
|
||
autoActivateChild: false,
|
||
expandOnHover: true,
|
||
draggable: true,
|
||
// 双列菜单默认值取自 vben 的 config.ts(mixedWidth 80 / extraCollapse false /
|
||
// extraCollapsedWidth 60)。第二列展开时复用上面的 width(224),与 vben 一致
|
||
// (vben 没有独立的 extraWidth 偏好,就是直接用 sidebar.width)。
|
||
mixedWidth: 80,
|
||
extraCollapse: false,
|
||
extraCollapsedWidth: 60,
|
||
theme: 'light',
|
||
},
|
||
|
||
header: {
|
||
enable: true,
|
||
height: 50,
|
||
mode: 'fixed',
|
||
menuAlign: 'start',
|
||
showFullscreen: true,
|
||
showLanguage: true,
|
||
showNotification: true,
|
||
theme: 'light',
|
||
},
|
||
|
||
logo: {
|
||
enable: true,
|
||
text: 'G3Soft ERP',
|
||
showText: true,
|
||
},
|
||
|
||
navigation: {
|
||
styleType: 'rounded',
|
||
showTitle: false,
|
||
},
|
||
|
||
breadcrumb: {
|
||
enable: true,
|
||
hideOnlyOne: false,
|
||
showHome: false,
|
||
showIcon: true,
|
||
styleType: 'normal',
|
||
},
|
||
|
||
tabbar: {
|
||
enable: true,
|
||
height: 38,
|
||
styleType: 'chrome',
|
||
showIcon: true,
|
||
showRefresh: true,
|
||
showFullscreen: true,
|
||
middleClickToClose: false,
|
||
wheelable: true,
|
||
persist: true,
|
||
maxCount: 0,
|
||
keepAlive: false,
|
||
},
|
||
|
||
transition: {
|
||
enable: true,
|
||
name: 'fade-slide',
|
||
progress: true,
|
||
},
|
||
}
|