1.8.24 • Published 6 months ago

@antdp/config v1.8.24

Weekly downloads
9
License
ISC
Repository
github
Last release
6 months ago

@antdp/config

npm npm download

将 umi 配置包裹一层

Installation

npm i @antdp/config --save-dev

Basic Usage

import config from '@antdp/config';
import router from './router.json';
import proxy from './proxy';

export default config(router, {
  proxy,
});

Interface

import { IConfig, IRoute } from 'umi';

export interface Options extends Omit<IConfig, 'routes'> {
  routes: IRoute;
}

export interface Config {
  (routes?: IRoute, optiosn?: Options): IConfig;
}

declare var config: Config;
export default config;

Define

  • ANTD_IS_TABS 是否显示 Tab 选项卡,默认显示 true
  • ANTD_IS_IFRAME_RENDER 是否使用 iframe 展示内容
  • ANTD_IS_BREADCRUMB 是否开启父子路由面包屑
  • ANTD_AUTH_CONF 是否开启权限验证 默认值false不启用 参数:
    • auth_menu 储存菜单路由权限---本地keys 默认值authMenu
    • auth_btn 储存按钮路径权限---本地keys 默认值 authBtn
    • auth_check_url 判断路径是否有权限的字段 默认值menuUrl,如果字段设置为undefinedauth_menuauth_btn储存形式为 ["/web"],反之储存形式为[{menuUrl:"/web"}],
  • ANTD_MENU_IS_SHOW 是否显示 左侧菜单
  • ANTD_HEAD_IS_SHOW 是否显示 head头部
  • ANTD_MENU_TOP_LEFT 父级菜单展示顶部 ,子集菜单展示侧边
  • ANTD_TITLE_TOP 标题 放在 头部 ,菜单放在头部下面

Locale

继承于umi @umijs/plugin-locale

  • default 当检测不到具体语言时,展示 default 中指定的语言。 默认值zh-CN
  • antd:开启后,支持 antd 国际化 默认值true,
  • title:标题国际化 默认值true,
  • baseNavigator:开启浏览器语言检测。 默认值true,
  • baseSeparator: 国家(lang) 与 语言(language) 之间的分割符。 默认值-返回的语言及目录文件为 zh-CN、en-US、sk 等。,

favicon

export default {
  // 配置 favicon 地址(href 属性)
  favicon: '/assets/favicon.ico', 
}
1.8.20

7 months ago

1.8.21

6 months ago

1.8.22

6 months ago

1.8.23

6 months ago

1.8.24

6 months ago

1.8.17

10 months ago

1.8.18

10 months ago

1.8.19

9 months ago

1.8.16

12 months ago

1.8.15

1 year ago

1.8.14

1 year ago

1.8.13

1 year ago

1.8.12

1 year ago

1.8.11

1 year ago

1.8.9

1 year ago

1.8.10

1 year ago

1.8.8

1 year ago

1.8.7

1 year ago

1.8.6

1 year ago

1.8.2

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.19

1 year ago

1.6.17

1 year ago

1.6.16

1 year ago

1.6.18

1 year ago

1.6.15

1 year ago

1.6.14

1 year ago

1.6.11

1 year ago

1.6.13

1 year ago

1.6.4

1 year ago

1.6.10

1 year ago

1.6.9

1 year ago

1.6.8

1 year ago

1.6.7

1 year ago

1.6.6

1 year ago

1.6.5

1 year ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.0

1 year ago

1.5.4

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.12

2 years ago

1.3.11

2 years ago

1.3.10

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.6

2 years ago

1.2.0

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.19

2 years ago

1.1.20

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.13

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.10

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago