Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
import React from "react";
import { ConfigProvider, Modal } from "antd";
import zhCN from "antd/lib/locale/zh_CN";
import moment from "moment";
import "moment/locale/zh-cn";
import "antd/dist/antd.css";
import "./index.css";
moment.locale("zh-cn");
const App = () => {
const handleClick = () => {
Modal.confirm({
title: "第一次是中文的,点击取消后就变成了英文按钮",
});
};
return (
<ConfigProvider locale={zhCN}>
<div style={{ width: 400, margin: "100px auto" }}>
<div style={{ marginTop: 16 }}>
<button onClick={handleClick}>按钮</button>
</div>
</div>
</ConfigProvider>
);
};
export default App;
What is expected?
期望 Modal.confirm 的 两个按钮均为中文
What is actually happening?
第一次为取消,确认,点击取消后,再次唤起Modal, 变成了cancel 和 ok
Environment | Info |
---|---|
antd | 4.8.2 |
React | 17.0.1 |
System | macOS 10.14.6 |
Browser | chrome 86.0.4240.183 |
Metadata
Assignees
Labels
No labels