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

指令式调用Dialog组件,国际化配置不对按钮默认值生效 #6826

Closed
Psiphonc opened this issue Feb 11, 2025 · 1 comment
Closed
Labels

Comments

@Psiphonc
Copy link

Version of antd-mobile

5.36.1

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

Image
import { ConfigProvider, Dialog } from "antd-mobile";
import enUS from 'antd-mobile/es/locales/en-US'

return (
  <ConfigProvider locale={enUS}>
    <Button onClick={() => {
        Dialog.confirm({ content: 'English' })
      }} >
     Show Dialog
    </Button>
  </ConfigProvider>
)

Relevant log output

@Psiphonc Psiphonc added the bug label Feb 11, 2025
@zombieJ
Copy link
Member

zombieJ commented Feb 11, 2025

静态方法不会消费 context,如果有相关须有参考文档建议对 Dialog 进行封装。

ref https://mobile.ant.design/zh/components/dialog#dialogconfirm

@zombieJ zombieJ closed this as completed Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants