Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

新版 @umijs/plugin-access 插件建议 #621

Open
kaoding opened this issue Apr 18, 2022 · 3 comments
Open

新版 @umijs/plugin-access 插件建议 #621

kaoding opened this issue Apr 18, 2022 · 3 comments

Comments

@kaoding
Copy link
Contributor

kaoding commented Apr 18, 2022

不需要单独新建文件access.ts,采用统一放在 app.ts 里,和其它插件配置一样,采用固定导出函数的方式,如:

export const access: AccessConfig =  ({ initialState }) => {
  return { canAdmin: true};
};
@sorrycc
Copy link
Member

sorrycc commented Apr 24, 2022

给个 pr?同时兼容两种方式的使用。

@kaoding
Copy link
Contributor Author

kaoding commented Apr 24, 2022

水平不行,自己写不出来。

@noshower
Copy link
Contributor

@kaoding 把我逗笑了,太真实

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants