umi-next icon indicating copy to clipboard operation
umi-next copied to clipboard

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

Open kaoding opened this issue 2 years ago • 3 comments

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

export const access: AccessConfig =  ({ initialState }) => {
  return { canAdmin: true};
};

kaoding avatar Apr 18 '22 01:04 kaoding

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

sorrycc avatar Apr 24 '22 10:04 sorrycc

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

kaoding avatar Apr 24 '22 15:04 kaoding

@kaoding 把我逗笑了,太真实

noshower avatar Apr 27 '22 01:04 noshower