Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@umijs/plugin-locale createIntl支持额外参数 #379

Open
NexxLuo opened this issue Apr 15, 2020 · 2 comments
Open

@umijs/plugin-locale createIntl支持额外参数 #379

NexxLuo opened this issue Apr 15, 2020 · 2 comments

Comments

@NexxLuo
Copy link

NexxLuo commented Apr 15, 2020

What happens?

react-intl createIntl支持以下属性:

image

目前locale插件中的createIntl方法不支持自定义传入额外参数
image

由于想自定义react-intl的错误消息输出,需要自定义onError函数。
目前无法实现

  • Umi Version: 3.1.0
@ycjcl868
Copy link
Contributor

这个可以配置在 runtime app.ts 里,后续加上

@ycjcl868
Copy link
Contributor

ycjcl868 commented Apr 15, 2020

可以来个 PR

// app.ts

export const locale = {
   createIntl: {
     // ...
   }
}

@xiaohuoni xiaohuoni transferred this issue from umijs/umi Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants