mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
docs: docs upgrade (#27367)
This commit is contained in:
parent
a2890517a6
commit
a7ae888a90
@ -28,8 +28,8 @@ import {
|
||||
Transfer,
|
||||
Radio,
|
||||
} from 'antd';
|
||||
import enUS from 'antd/es/locale/en_US';
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import enUS from 'antd/lib/locale/en_US';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
import moment from 'moment';
|
||||
import 'moment/locale/zh-cn';
|
||||
|
||||
|
@ -47,7 +47,7 @@ Some components use dynamic style to support wave effect. You can config `csp` p
|
||||
| getPopupContainer | To set the container of the popup element. The default is to create a `div` element in `body` | function(triggerNode) | () => document.body | |
|
||||
| getTargetContainer | Config Affix, Anchor scroll target container | () => HTMLElement | () => window | 4.2.0 |
|
||||
| input | Set Input common props | { autoComplete?: string } | - | 4.2.0 |
|
||||
| locale | Language package setting, you can find the packages in [antd/es/locale](http://unpkg.com/antd/es/locale/) | object | - | |
|
||||
| locale | Language package setting, you can find the packages in [antd/lib/locale](http://unpkg.com/antd/lib/locale/) | object | - | |
|
||||
| pageHeader | Unify the ghost of PageHeader, ref [PageHeader](/components/page-header) | { ghost: boolean } | true | |
|
||||
| prefixCls | Set prefix className (cooperated with [@ant-prefix](https://github.com/ant-design/ant-design/blob/2c6c789e3a9356f96c47aea0083f5a15538315cf/components/style/themes/default.less#L7)) | string | `ant` | |
|
||||
| renderEmpty | Set empty content of components. Ref [Empty](/components/empty/) | function(componentName: string): ReactNode | - | |
|
||||
|
@ -48,7 +48,7 @@ export default () => (
|
||||
| getPopupContainer | 弹出框(Select, Tooltip, Menu 等等)渲染父节点,默认渲染到 body 上。 | function(triggerNode) | () => document.body | |
|
||||
| getTargetContainer | 配置 Affix、Anchor 滚动监听容器。 | () => HTMLElement | () => window | 4.2.0 |
|
||||
| input | 设置 Input 组件的通用属性 | { autoComplete?: string } | - | 4.2.0 |
|
||||
| locale | 语言包配置,语言包可到 [antd/es/locale](http://unpkg.com/antd/es/locale/) 目录下寻找 | object | - | |
|
||||
| locale | 语言包配置,语言包可到 [antd/lib/locale](http://unpkg.com/antd/lib/locale/) 目录下寻找 | object | - | |
|
||||
| pageHeader | 统一设置 PageHeader 的 ghost,参考 [PageHeader](/components/page-header) | { ghost: boolean } | true | |
|
||||
| prefixCls | 设置统一样式前缀。注意:需要配合 `less` 变量 [@ant-prefix](https://github.com/ant-design/ant-design/blob/2c6c789e3a9356f96c47aea0083f5a15538315cf/components/style/themes/default.less#L7) 使用 | string | `ant` | |
|
||||
| renderEmpty | 自定义组件空状态。参考 [空状态](/components/empty/) | function(componentName: string): ReactNode | - | |
|
||||
|
@ -39,7 +39,7 @@ import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||
// The default locale is en-US, if you want to use other locale, just set locale in entry file globally.
|
||||
import moment from 'moment';
|
||||
import 'moment/locale/zh-cn';
|
||||
import locale from 'antd/es/locale/zh_CN';
|
||||
import locale from 'antd/lib/locale/zh_CN';
|
||||
|
||||
<ConfigProvider locale={locale}>
|
||||
<DatePicker defaultValue={moment('2015-01-01', 'YYYY-MM-DD')} />
|
||||
|
@ -40,7 +40,7 @@ import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||
// 默认语言为 en-US,如果你需要设置其他语言,推荐在入口文件全局设置 locale
|
||||
import moment from 'moment';
|
||||
import 'moment/locale/zh-cn';
|
||||
import locale from 'antd/es/locale/zh_CN';
|
||||
import locale from 'antd/lib/locale/zh_CN';
|
||||
|
||||
<ConfigProvider locale={locale}>
|
||||
<DatePicker defaultValue={moment('2015-01-01', 'YYYY-MM-DD')} />
|
||||
|
@ -4,7 +4,7 @@ import TimePicker from '../time-picker/locale/kmr_IQ';
|
||||
import Calendar from '../calendar/locale/kmr_IQ';
|
||||
import { Locale } from '../locale-provider';
|
||||
|
||||
// please use antd/es/locale/kmr_IQ instead
|
||||
// please use antd/lib/locale/kmr_IQ instead
|
||||
// keep this file for compatibility
|
||||
// https://github.com/ant-design/ant-design/issues/25778
|
||||
|
||||
|
@ -34,7 +34,7 @@ import React, { useState } from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { ConfigProvider, DatePicker, message } from 'antd';
|
||||
// 由于 antd 组件的默认文案是英文,所以需要修改为中文
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
import moment from 'moment';
|
||||
import 'moment/locale/zh-cn';
|
||||
import 'antd/dist/antd.css';
|
||||
|
@ -11,7 +11,7 @@ The default language of `antd@2.x` is currently English. If you wish to use othe
|
||||
|
||||
```jsx
|
||||
import { ConfigProvider } from 'antd';
|
||||
import frFR from 'antd/es/locale/fr_FR';
|
||||
import frFR from 'antd/lib/locale/fr_FR';
|
||||
|
||||
return (
|
||||
<ConfigProvider locale={frFR}>
|
||||
|
@ -10,7 +10,7 @@ title: 国际化
|
||||
antd 提供了一个 React 组件 [ConfigProvider](/components/config-provider) 用于全局配置国际化文案。
|
||||
|
||||
```jsx
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
|
||||
return (
|
||||
<ConfigProvider locale={zhCN}>
|
||||
|
@ -11,8 +11,7 @@ import { ConfigProvider } from 'antd';
|
||||
import LogRocket from 'logrocket';
|
||||
import setupLogRocketReact from 'logrocket-react';
|
||||
import { browserHistory } from 'bisheng/router';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
import Header from './Header';
|
||||
import SiteContext from './SiteContext';
|
||||
import enLocale from '../../en-US';
|
||||
|
Loading…
Reference in New Issue
Block a user