defaultSettings.ts 1.3 KB
Newer Older
何乐's avatar
何乐 committed
1 2 3
import { MenuTheme } from 'antd/es/menu';

export type ContentWidth = 'Fluid' | 'Fixed';
陈小聪's avatar
陈小聪 committed
4 5

export interface DefaultSettings {
何乐's avatar
何乐 committed
6 7 8 9 10 11 12
  /**
   * theme for nav menu
   */
  navTheme: MenuTheme;
  /**
   * primary color of ant design
   */
陈小聪's avatar
陈小聪 committed
13
  primaryColor: string;
何乐's avatar
何乐 committed
14 15 16 17 18 19 20 21 22 23 24
  /**
   * nav menu position: `sidemenu` or `topmenu`
   */
  layout: 'sidemenu' | 'topmenu';
  /**
   * layout of content: `Fluid` or `Fixed`, only works when layout is topmenu
   */
  contentWidth: ContentWidth;
  /**
   * sticky header
   */
陈小聪's avatar
陈小聪 committed
25
  fixedHeader: boolean;
何乐's avatar
何乐 committed
26 27 28
  /**
   * auto hide header
   */
陈小聪's avatar
陈小聪 committed
29
  autoHideHeader: boolean;
何乐's avatar
何乐 committed
30 31 32
  /**
   * sticky siderbar
   */
陈小聪's avatar
陈小聪 committed
33 34 35 36
  fixSiderbar: boolean;
  menu: { disableLocal: boolean };
  title: string;
  pwa: boolean;
陈帅's avatar
陈帅 committed
37 38 39 40
  // Your custom iconfont Symbol script Url
  // eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
  // 注意:如果需要图标多色,Iconfont 图标项目里要进行批量去色处理
  // Usage: https://github.com/ant-design/ant-design-pro/pull/3517
陈小聪's avatar
陈小聪 committed
41 42 43 44 45
  iconfontUrl: string;
  colorWeak: boolean;
}

export default {
何乐's avatar
何乐 committed
46 47 48 49 50 51 52
  navTheme: 'dark',
  primaryColor: '#1890FF',
  layout: 'sidemenu',
  contentWidth: 'Fluid',
  fixedHeader: false,
  autoHideHeader: false,
  fixSiderbar: false,
陈小聪's avatar
陈小聪 committed
53
  colorWeak: false,
Yu's avatar
Yu committed
54 55 56
  menu: {
    disableLocal: false,
  },
陈帅's avatar
陈帅 committed
57
  title: 'Ant Design Pro',
Yu's avatar
Yu committed
58 59
  pwa: true,
  iconfontUrl: '',
陈小聪's avatar
陈小聪 committed
60
} as DefaultSettings;