2.1.8 • Published 2 years ago

umi-plugin-extract-auth v2.1.8

Weekly downloads
1
License
-
Repository
github
Last release
2 years ago

umi-plugin-extract-auth

参考文档

NPM version NPM downloads

Install

# or yarn
$ npm install
$ npm run build --watch
$ npm run start

Usage

Install

pnpm add --D umi-plugin-extract-auth

Configure in .umirc.js,

export default {
    ...
    extractAuth: {
        routerPath: 'config/routes',
        appKey: '',
        apiPrefix:''
    },
    ...
  }

Options

属性说明类型默认值
routerPath路由配置位置stringconfig
routeFilterRules过滤未配置权限页面string[]"exception", "error", "404", "403", "500"
appKey应用 KEYstring
apiPrefix权限接口前缀string''
unifiedAuthorityManage是否接入统一权限管理booleanfalse

注意

  • apiPrefix 字段在 v1.4.0 之后版本有效;
  • unifiedAuthorityManage 字段在 v1.5.4 之后版本有效;

自动提取菜单配置

{
  // 忽略根据 component 对应文件的自动权限提取
  "ignoreComponentPathAuthority": true,
  // 该路由不设置权限
  "authority": false,
}

LICENSE

MIT

2.1.6

2 years ago

2.1.5

2 years ago

2.1.8

2 years ago

0.0.2

4 years ago

0.0.1

4 years ago