refactor(projects): remove enum

This commit is contained in:
Soybean
2023-02-23 08:38:03 +08:00
parent 44b544745d
commit 21d5214247
31 changed files with 323 additions and 240 deletions

View File

@ -1,4 +1,9 @@
import { EnumThemeAnimateMode, EnumThemeHorizontalMenuPosition, EnumThemeLayoutMode, EnumThemeTabMode } from '@/enum';
import {
themeLayoutModeOptions,
themeTabModeOptions,
themeHorizontalMenuPositionOptions,
themeAnimateModeOptions
} from '@/constants';
import jsonSetting from './theme.json';
const themeColorList = [
@ -34,12 +39,7 @@ const defaultThemeSetting: Theme.Setting = {
layout: {
minWidth: 900,
mode: 'vertical',
modeList: [
{ value: 'vertical', label: EnumThemeLayoutMode.vertical },
{ value: 'vertical-mix', label: EnumThemeLayoutMode['vertical-mix'] },
{ value: 'horizontal', label: EnumThemeLayoutMode.horizontal },
{ value: 'horizontal-mix', label: EnumThemeLayoutMode['horizontal-mix'] }
]
modeList: themeLayoutModeOptions
},
themeColor: themeColorList[0],
themeColorList,
@ -64,10 +64,7 @@ const defaultThemeSetting: Theme.Setting = {
visible: true,
height: 44,
mode: 'chrome',
modeList: [
{ value: 'chrome', label: EnumThemeTabMode.chrome },
{ value: 'button', label: EnumThemeTabMode.button }
],
modeList: themeTabModeOptions,
isCache: true
},
sider: {
@ -80,11 +77,7 @@ const defaultThemeSetting: Theme.Setting = {
},
menu: {
horizontalPosition: 'flex-start',
horizontalPositionList: [
{ value: 'flex-start', label: EnumThemeHorizontalMenuPosition['flex-start'] },
{ value: 'center', label: EnumThemeHorizontalMenuPosition.center },
{ value: 'flex-end', label: EnumThemeHorizontalMenuPosition['flex-end'] }
]
horizontalPositionList: themeHorizontalMenuPositionOptions
},
footer: {
fixed: false,
@ -94,14 +87,7 @@ const defaultThemeSetting: Theme.Setting = {
page: {
animate: true,
animateMode: 'fade-slide',
animateModeList: [
{ value: 'fade-slide', label: EnumThemeAnimateMode['fade-slide'] },
{ value: 'fade', label: EnumThemeAnimateMode.fade },
{ value: 'fade-bottom', label: EnumThemeAnimateMode['fade-bottom'] },
{ value: 'fade-scale', label: EnumThemeAnimateMode['fade-scale'] },
{ value: 'zoom-fade', label: EnumThemeAnimateMode['zoom-fade'] },
{ value: 'zoom-out', label: EnumThemeAnimateMode['zoom-out'] }
]
animateModeList: themeAnimateModeOptions
}
};