defaultSettings.ts 1.24 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 41
  /**
   * your iconfont Symbol Scrip Url
   * eg:`//at.alicdn.com/t/font_1039637_btcrd5co4w.js`
   * 注意:如果需要图标多色,Iconfont图标项目里要进行批量去色处理
   */
陈小聪's avatar
陈小聪 committed
42 43 44 45 46
  iconfontUrl: string;
  colorWeak: boolean;
}

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