New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antdp/config

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antdp/config

路由配置

1.8.20
Source
npm
Version published
Weekly downloads
5
-89.13%
Maintainers
1
Weekly downloads
 
Created
Source

@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', 
}

Keywords

config

FAQs

Package last updated on 24 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts