|
|
@@ -12,42 +12,18 @@ export function useSettingsConfig() {
|
|
|
|
|
|
// 标签页风格选项
|
|
|
const tabStyleOptions = computed(() => [
|
|
|
- {
|
|
|
- value: 'tab-default',
|
|
|
- label: t('setting.tabStyle.default')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'tab-card',
|
|
|
- label: t('setting.tabStyle.card')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'tab-google',
|
|
|
- label: t('setting.tabStyle.google')
|
|
|
- }
|
|
|
+ { value: 'tab-default', label: t('setting.tabStyle.default') },
|
|
|
+ { value: 'tab-card', label: t('setting.tabStyle.card') },
|
|
|
+ { value: 'tab-google', label: t('setting.tabStyle.google') }
|
|
|
])
|
|
|
|
|
|
// 页面切换动画选项
|
|
|
const pageTransitionOptions = computed(() => [
|
|
|
- {
|
|
|
- value: '',
|
|
|
- label: t('setting.transition.list.none')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'fade',
|
|
|
- label: t('setting.transition.list.fade')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'slide-left',
|
|
|
- label: t('setting.transition.list.slideLeft')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'slide-bottom',
|
|
|
- label: t('setting.transition.list.slideBottom')
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'slide-top',
|
|
|
- label: t('setting.transition.list.slideTop')
|
|
|
- }
|
|
|
+ { value: '', label: t('setting.transition.list.none') },
|
|
|
+ { value: 'fade', label: t('setting.transition.list.fade') },
|
|
|
+ { value: 'slide-left', label: t('setting.transition.list.slideLeft') },
|
|
|
+ { value: 'slide-bottom', label: t('setting.transition.list.slideBottom') },
|
|
|
+ { value: 'slide-top', label: t('setting.transition.list.slideTop') }
|
|
|
])
|
|
|
|
|
|
// 圆角大小选项
|
|
|
@@ -61,40 +37,22 @@ export function useSettingsConfig() {
|
|
|
|
|
|
// 容器宽度选项
|
|
|
const containerWidthOptions = computed(() => [
|
|
|
- {
|
|
|
- value: ContainerWidthEnum.FULL,
|
|
|
- label: t('setting.container.list[0]'),
|
|
|
- icon: ''
|
|
|
- },
|
|
|
- {
|
|
|
- value: ContainerWidthEnum.BOXED,
|
|
|
- label: t('setting.container.list[1]'),
|
|
|
- icon: ''
|
|
|
- }
|
|
|
+ { value: ContainerWidthEnum.FULL, label: t('setting.container.list[0]'), icon: '' },
|
|
|
+ { value: ContainerWidthEnum.BOXED, label: t('setting.container.list[1]'), icon: '' }
|
|
|
])
|
|
|
|
|
|
// 盒子样式选项
|
|
|
const boxStyleOptions = computed(() => [
|
|
|
- {
|
|
|
- value: 'border-mode',
|
|
|
- label: t('setting.box.list[0]'),
|
|
|
- type: 'border-mode' as const
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'shadow-mode',
|
|
|
- label: t('setting.box.list[1]'),
|
|
|
- type: 'shadow-mode' as const
|
|
|
- }
|
|
|
+ { value: 'border-mode', label: t('setting.box.list[0]'), type: 'border-mode' as const },
|
|
|
+ { value: 'shadow-mode', label: t('setting.box.list[1]'), type: 'shadow-mode' as const }
|
|
|
])
|
|
|
|
|
|
// 从配置文件获取的选项
|
|
|
const configOptions = {
|
|
|
// 主题色彩选项
|
|
|
mainColors: AppConfig.systemMainColor,
|
|
|
-
|
|
|
// 主题风格选项
|
|
|
themeList: AppConfig.settingThemeList,
|
|
|
-
|
|
|
// 菜单布局选项
|
|
|
menuLayoutList: AppConfig.menuLayoutList
|
|
|
}
|
|
|
@@ -103,77 +61,16 @@ export function useSettingsConfig() {
|
|
|
const basicSettingsConfig = computed(() => {
|
|
|
// 定义所有基础设置项
|
|
|
const allSettings = [
|
|
|
- {
|
|
|
- key: 'showWorkTab',
|
|
|
- label: t('setting.basics.list.multiTab'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'workTab',
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'uniqueOpened',
|
|
|
- label: t('setting.basics.list.accordion'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'uniqueOpened',
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showMenuButton',
|
|
|
- label: t('setting.basics.list.collapseSidebar'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'menuButton',
|
|
|
- headerBarKey: 'menuButton' as const
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showFastEnter',
|
|
|
- label: t('setting.basics.list.fastEnter'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'fastEnter',
|
|
|
- headerBarKey: 'fastEnter' as const
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showRefreshButton',
|
|
|
- label: t('setting.basics.list.reloadPage'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'refreshButton',
|
|
|
- headerBarKey: 'refreshButton' as const
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showCrumbs',
|
|
|
- label: t('setting.basics.list.breadcrumb'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'crumbs',
|
|
|
- mobileHide: true,
|
|
|
- headerBarKey: 'breadcrumb' as const
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showLanguage',
|
|
|
- label: t('setting.basics.list.language'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'language',
|
|
|
- headerBarKey: 'language' as const
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'showNprogress',
|
|
|
- label: t('setting.basics.list.progressBar'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'nprogress',
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'colorWeak',
|
|
|
- label: t('setting.basics.list.weakMode'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'colorWeak',
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'watermarkVisible',
|
|
|
- label: t('setting.basics.list.watermark'),
|
|
|
- type: 'switch' as const,
|
|
|
- handler: 'watermark',
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
+ { key: 'showWorkTab', label: t('setting.basics.list.multiTab'), type: 'switch' as const, handler: 'workTab', headerBarKey: null },
|
|
|
+ // { key: 'uniqueOpened', label: t('setting.basics.list.accordion'), type: 'switch' as const, handler: 'uniqueOpened', headerBarKey: null },
|
|
|
+ // { key: 'showMenuButton', label: t('setting.basics.list.collapseSidebar'), type: 'switch' as const, handler: 'menuButton', headerBarKey: 'menuButton' as const },
|
|
|
+ // { key: 'showFastEnter', label: t('setting.basics.list.fastEnter'), type: 'switch' as const, handler: 'fastEnter', headerBarKey: 'fastEnter' as const },
|
|
|
+ { key: 'showRefreshButton', label: t('setting.basics.list.reloadPage'), type: 'switch' as const, handler: 'refreshButton', headerBarKey: 'refreshButton' as const },
|
|
|
+ // { key: 'showCrumbs', label: t('setting.basics.list.breadcrumb'), type: 'switch' as const, handler: 'crumbs', mobileHide: true, headerBarKey: 'breadcrumb' as const },
|
|
|
+ // { key: 'showLanguage', label: t('setting.basics.list.language'), type: 'switch' as const, handler: 'language', headerBarKey: 'language' as const },
|
|
|
+ { key: 'showNprogress', label: t('setting.basics.list.progressBar'), type: 'switch' as const, handler: 'nprogress', headerBarKey: null },
|
|
|
+ { key: 'colorWeak', label: t('setting.basics.list.weakMode'), type: 'switch' as const, handler: 'colorWeak', headerBarKey: null },
|
|
|
+ // { key: 'watermarkVisible', label: t('setting.basics.list.watermark'), type: 'switch' as const, handler: 'watermark', headerBarKey: null },
|
|
|
{
|
|
|
key: 'menuOpenWidth',
|
|
|
label: t('setting.basics.list.menuWidth'),
|
|
|
@@ -184,17 +81,9 @@ export function useSettingsConfig() {
|
|
|
step: 10,
|
|
|
style: { width: '120px' },
|
|
|
controlsPosition: 'right' as const,
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'tabStyle',
|
|
|
- label: t('setting.basics.list.tabStyle'),
|
|
|
- type: 'select' as const,
|
|
|
- handler: 'tabStyle',
|
|
|
- options: tabStyleOptions.value,
|
|
|
- style: { width: '120px' },
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
+ headerBarKey: null
|
|
|
},
|
|
|
+ { key: 'tabStyle', label: t('setting.basics.list.tabStyle'), type: 'select' as const, handler: 'tabStyle', options: tabStyleOptions.value, style: { width: '120px' }, headerBarKey: null },
|
|
|
{
|
|
|
key: 'pageTransition',
|
|
|
label: t('setting.basics.list.pageTransition'),
|
|
|
@@ -202,7 +91,7 @@ export function useSettingsConfig() {
|
|
|
handler: 'pageTransition',
|
|
|
options: pageTransitionOptions.value,
|
|
|
style: { width: '120px' },
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
+ headerBarKey: null
|
|
|
},
|
|
|
{
|
|
|
key: 'customRadius',
|
|
|
@@ -211,10 +100,9 @@ export function useSettingsConfig() {
|
|
|
handler: 'customRadius',
|
|
|
options: customRadiusOptions,
|
|
|
style: { width: '120px' },
|
|
|
- headerBarKey: null // 不依赖headerBar配置
|
|
|
+ headerBarKey: null
|
|
|
}
|
|
|
]
|
|
|
-
|
|
|
// 根据 headerBarConfig 过滤设置项
|
|
|
return (
|
|
|
allSettings
|