From a7ae888a903fcd060f5288ba0c1e47862eacc701 Mon Sep 17 00:00:00 2001 From: Amumu Date: Mon, 26 Oct 2020 11:57:37 +0800 Subject: [PATCH] docs: docs upgrade (#27367) --- components/config-provider/demo/locale.md | 4 ++-- components/config-provider/index.en-US.md | 2 +- components/config-provider/index.zh-CN.md | 2 +- components/date-picker/index.en-US.md | 2 +- components/date-picker/index.zh-CN.md | 2 +- components/locale/ku_IQ.tsx | 2 +- docs/react/getting-started.zh-CN.md | 2 +- docs/react/i18n.en-US.md | 2 +- docs/react/i18n.zh-CN.md | 2 +- site/theme/template/Layout/index.jsx | 3 +-- 10 files changed, 11 insertions(+), 12 deletions(-) diff --git a/components/config-provider/demo/locale.md b/components/config-provider/demo/locale.md index e53a982a67..0ae2a3d27a 100644 --- a/components/config-provider/demo/locale.md +++ b/components/config-provider/demo/locale.md @@ -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'; diff --git a/components/config-provider/index.en-US.md b/components/config-provider/index.en-US.md index 2b9e150a32..8456aa545e 100644 --- a/components/config-provider/index.en-US.md +++ b/components/config-provider/index.en-US.md @@ -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 | - | | diff --git a/components/config-provider/index.zh-CN.md b/components/config-provider/index.zh-CN.md index 107acdafef..272341ed9b 100644 --- a/components/config-provider/index.zh-CN.md +++ b/components/config-provider/index.zh-CN.md @@ -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 | - | | diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index 8055495435..4c36123177 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -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'; diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index 93b8686b9f..d101ea1233 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -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'; diff --git a/components/locale/ku_IQ.tsx b/components/locale/ku_IQ.tsx index d39d8ec706..ee02af1e4c 100755 --- a/components/locale/ku_IQ.tsx +++ b/components/locale/ku_IQ.tsx @@ -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 diff --git a/docs/react/getting-started.zh-CN.md b/docs/react/getting-started.zh-CN.md index e5182da475..bf6ec2890a 100755 --- a/docs/react/getting-started.zh-CN.md +++ b/docs/react/getting-started.zh-CN.md @@ -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'; diff --git a/docs/react/i18n.en-US.md b/docs/react/i18n.en-US.md index c08d2492aa..c00e0be2a0 100644 --- a/docs/react/i18n.en-US.md +++ b/docs/react/i18n.en-US.md @@ -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 ( diff --git a/docs/react/i18n.zh-CN.md b/docs/react/i18n.zh-CN.md index 64a9a6d37c..814c565914 100644 --- a/docs/react/i18n.zh-CN.md +++ b/docs/react/i18n.zh-CN.md @@ -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 ( diff --git a/site/theme/template/Layout/index.jsx b/site/theme/template/Layout/index.jsx index 719c984dca..eb976b67e6 100644 --- a/site/theme/template/Layout/index.jsx +++ b/site/theme/template/Layout/index.jsx @@ -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';