We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import { App, Modal } from "antd"; const { modal } = App.useApp(); modal.confirm({ title: "确认模态框" }); Modal.confirm({ title: "确认模态框" });
确认按钮的问题不一样
确认按钮的文字均为 "确定"
useApp 导出的 modal.confirm 确认按钮文字为 "知道了"
库直接导出的 Modal.confirm 确认按钮文字为 "确定"
ConfigProvider 的 locale={zhCN}
The text was updated successfully, but these errors were encountered:
看了下源码,源代码中okText默认了两种 okText || (mergedOkCancel ? mergedLocale?.okText : mergedLocale?.justOkText okText 是确定,justOkText 是知道了 应该是有意这样设计的
okText || (mergedOkCancel ? mergedLocale?.okText : mergedLocale?.justOkText
okText
确定
justOkText
知道了
Sorry, something went wrong.
好的,谢谢,但是这样设计的话,可能容易造成误解,因为同一个组件,都用静态方法调用,参数都一样,但是主按钮的文案却不同
当然是个 BUG ,知道了应该是在没有取消按钮的情况下才会出现
这样的话确实说得通了
@Huaxink @sushi-su 我同步了一下modal组件中的逻辑,你们可以看一下 #39884
Successfully merging a pull request may close this issue.
Reproduction link
Steps to reproduce
确认按钮的问题不一样
What is expected?
确认按钮的文字均为 "确定"
What is actually happening?
useApp 导出的 modal.confirm 确认按钮文字为 "知道了"
库直接导出的 Modal.confirm 确认按钮文字为 "确定"
ConfigProvider 的 locale={zhCN}
The text was updated successfully, but these errors were encountered: