afc163
5 years ago
No known key found for this signature in database
GPG Key ID: 5F00908D72002306
11 changed files with
13 additions and
13 deletions
components/config-provider/demo/locale.md
components/date-picker/index.en-US.md
components/date-picker/index.zh-CN.md
components/form/index.en-US.md
components/form/index.zh-CN.md
components/locale-provider/demo/all.md
components/locale-provider/demo/basic.md
components/locale-provider/index.en-US.md
components/locale-provider/index.zh-CN.md
components/table/index.en-US.md
components/table/index.zh-CN.md
@ -28,7 +28,7 @@ import {
Transfer,
Radio,
} from 'antd';
import zhCN from 'antd/lib /locale/zh_CN';
import zhCN from 'antd/es /locale/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
@ -26,7 +26,7 @@ The default locale is en-US, if you need to use other languages, recommend to us
If there are special needs (only modifying single component language), Please use the property: local. Example: [default ](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json ).
```jsx
import locale from 'antd/lib /date-picker/locale/zh_CN';
import locale from 'antd/es /date-picker/locale/zh_CN';
< DatePicker locale = {locale} / > ;
```
@ -27,7 +27,7 @@ subtitle: 日期选择框
如有特殊需求(仅修改单一组件的语言),请使用 locale 参数,参考:[默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json)。
```jsx
import locale from 'antd/lib /date-picker/locale/zh_CN';
import locale from 'antd/es /date-picker/locale/zh_CN';
< DatePicker locale = {locale} / > ;
```
@ -227,7 +227,7 @@ See more advanced usage at [async-validator](https://github.com/yiminghe/async-v
```tsx
import { Form } from 'antd';
import { FormComponentProps } from 'antd/lib /form';
import { FormComponentProps } from 'antd/es /form';
interface UserFormProps extends FormComponentProps {
age: number;
@ -229,7 +229,7 @@ validateFields(['field1', 'field2'], options, (errors, values) => {
```tsx
import { Form } from 'antd';
import { FormComponentProps } from 'antd/lib /form';
import { FormComponentProps } from 'antd/es /form';
interface UserFormProps extends FormComponentProps {
age: number;
@ -28,7 +28,7 @@ import {
Transfer,
Radio,
} from 'antd';
import zhCN from 'antd/lib /locale-provider/zh_CN';
import zhCN from 'antd/es /locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
@ -15,7 +15,7 @@ Wrap your app with `LocaleProvider`, and apply the corresponding language packag
```jsx
import { Pagination, LocaleProvider } from 'antd';
import zhCN from 'antd/lib /locale-provider/zh_CN';
import zhCN from 'antd/es /locale-provider/zh_CN';
const App = () => (
< div >
@ -13,7 +13,7 @@ title: LocaleProvider (Deprecated)
```jsx
import { LocaleProvider } from 'antd';
import fr_FR from 'antd/lib /locale-provider/fr_FR';
import fr_FR from 'antd/es /locale-provider/fr_FR';
import moment from 'moment';
import 'moment/locale/fr';
@ -47,7 +47,7 @@ This component aims to provide localization of the built-in text. If you want to
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| locale | language package setting, you can find the packages in [antd/lib/locale-provider ](http://unpkg.com/antd/lib /locale-provider/ ) | object | - | |
| locale | language package setting, you can find the packages in [antd/es/locale-provider ](http://unpkg.com/antd/es /locale-provider/ ) | object | - | |
## FAQ
@ -14,7 +14,7 @@ LocaleProvider 使用 React 的 [context](https://facebook.github.io/react/docs/
```jsx
import { LocaleProvider } from 'antd';
import zh_CN from 'antd/lib /locale-provider/zh_CN';
import zh_CN from 'antd/es /locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
@ -48,7 +48,7 @@ return <LocaleProvider locale={locales.en_US}><App /></LocaleProvider>;
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| locale | 语言包配置,语言包可到 [antd/lib/locale-provider ](http://unpkg.com/antd/lib /locale-provider/ ) 目录下寻找 | object | - | |
| locale | 语言包配置,语言包可到 [antd/es/locale-provider ](http://unpkg.com/antd/es /locale-provider/ ) 目录下寻找 | object | - | |
## FAQ
@ -190,7 +190,7 @@ Properties for row selection.
```tsx
import { Table } from 'antd';
import { ColumnProps } from 'antd/lib /table';
import { ColumnProps } from 'antd/es /table';
interface User {
key: number,
@ -195,7 +195,7 @@ const columns = [
```tsx
import { Table } from 'antd';
import { ColumnProps } from 'antd/lib /table';
import { ColumnProps } from 'antd/es /table';
interface User {
key: number;