sizeSetting.ts 762 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import type { DropMenu } from '../components/Dropdown'
  2. import type { AppSizeType, SizeSetting } from '@/types/config'
  3. // 'small' | 'middle' | 'large'
  4. export const APPSIZE: { [key: string]: AppSizeType } = {
  5. SMALL: 'small',
  6. MIDDLE: 'middle',
  7. LARGE: 'large',
  8. }
  9. export const sizeSetting: SizeSetting = {
  10. // 是否显示尺寸选择器
  11. showPicker: true,
  12. // 当前尺寸
  13. size: APPSIZE.MIDDLE,
  14. // 默认尺寸
  15. fallback: APPSIZE.MIDDLE,
  16. // 允许的尺寸
  17. availableSizes: [APPSIZE.SMALL, APPSIZE.MIDDLE, APPSIZE.LARGE],
  18. }
  19. // 尺寸列表
  20. export const sizeList: DropMenu[] = [
  21. {
  22. text: '默认',
  23. event: APPSIZE.MIDDLE,
  24. },
  25. {
  26. text: '小型',
  27. event: APPSIZE.SMALL,
  28. },
  29. {
  30. text: '大型',
  31. event: APPSIZE.LARGE,
  32. },
  33. ]