docs: fix moment locale faq (#23895)

close #23891
This commit is contained in:
偏右 2020-05-06 12:03:46 +08:00 committed by GitHub
parent aa3413b086
commit fdf0f2e585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -55,7 +55,12 @@ Some components use dynamic style to support wave effect. You can config `csp` p
#### Does the locale problem still exist in DatePicker even if ConfigProvider `locale` is used?
Please make sure you set moment locale by `moment.locale('zh-cn')` or that you don't have two different versions of moment.
Please make sure you set moment locale or that you don't have two different versions of moment.
```js
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
```
#### Modal throw error when setting `getPopupContainer`?

View File

@ -56,7 +56,12 @@ return (
#### 为什么我使用了 ConfigProvider `locale`,时间类组件的国际化还有问题?
请检查是否正确设置了 `moment.locale('zh-cn')`。或者是否有两个版本的 moment 共存。
请检查是否正确设置了 moment 语言包,或者是否有两个版本的 moment 共存。
```js
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
```
#### 配置 `getPopupContainer` 导致 Modal 报错?

View File

@ -103,7 +103,7 @@
"copy-to-clipboard": "^3.2.0",
"css-animation": "^1.5.0",
"lodash": "^4.17.13",
"moment": "~2.25.1",
"moment": "~2.25.3",
"omit.js": "^1.0.2",
"prop-types": "^15.7.2",
"raf": "^3.4.1",