mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
📝 antd/lib/xxx => antd/es/xxx again
This commit is contained in:
parent
887aa4c347
commit
83a768787e
@ -2060,13 +2060,13 @@ We provide a [migration tool](https://github.com/ant-design/antd-migration-helpe
|
||||
- Improved global reset style, if you encounter style problem after upgrading, you can try import our v2 compatible style.
|
||||
|
||||
```javascript
|
||||
import 'antd/lib/style/v2-compatible-reset';
|
||||
import 'antd/es/style/v2-compatible-reset';
|
||||
```
|
||||
|
||||
Or use less
|
||||
|
||||
```less
|
||||
@import '~antd/lib/style/v2-compatible-reset.less';
|
||||
@import '~antd/es/style/v2-compatible-reset.less';
|
||||
```
|
||||
|
||||
- Since we changed default locale to en_US, LocalProvider is not required any more for English users.
|
||||
|
@ -2063,20 +2063,20 @@ timeline: true
|
||||
- 优化了全局的重置样式,如果升级后你的全局样式有问题,可以引入我们提供的 2.x 兼容样式。
|
||||
|
||||
```javascript
|
||||
import 'antd/lib/style/v2-compatible-reset';
|
||||
import 'antd/es/style/v2-compatible-reset';
|
||||
```
|
||||
|
||||
或者在 less 里引入
|
||||
|
||||
```less
|
||||
@import '~antd/lib/style/v2-compatible-reset.less';
|
||||
@import '~antd/es/style/v2-compatible-reset.less';
|
||||
```
|
||||
|
||||
- 由于默认语言改为英文,如果你需要显示中文,现在需要配置 `LocalProvider`。
|
||||
|
||||
```javascript
|
||||
import { LocaleProvider } from 'antd';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
|
||||
ReactDOM.render(
|
||||
<LocaleProvider locale={zhCN}>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import { Icon as AntdIcon, Badge } from 'antd';
|
||||
import { ThemeType, IconProps } from 'antd/lib/icon';
|
||||
import { ThemeType, IconProps } from 'antd/es/icon';
|
||||
import classNames from 'classnames';
|
||||
|
||||
const Icon: React.SFC<IconProps> = AntdIcon;
|
||||
|
@ -2,13 +2,13 @@ import * as React from 'react';
|
||||
import manifest from '@ant-design/icons/lib/manifest';
|
||||
import { ThemeType as ThemeFolderType } from '@ant-design/icons/lib/types';
|
||||
import { Radio, Icon, Input } from 'antd';
|
||||
import { RadioChangeEvent } from 'antd/lib/radio/interface';
|
||||
import { RadioChangeEvent } from 'antd/es/radio/interface';
|
||||
import { injectIntl, InjectedIntlProps } from 'react-intl';
|
||||
import debounce from 'lodash/debounce';
|
||||
import Category from './Category';
|
||||
import { FilledIcon, OutlinedIcon, TwoToneIcon } from './themeIcons';
|
||||
import { categories, Categories, CategoriesKeys } from './fields';
|
||||
import { ThemeType } from 'antd/lib/icon';
|
||||
import { ThemeType } from 'antd/es/icon';
|
||||
|
||||
interface IconDisplayProps extends InjectedIntlProps {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { CustomIconComponentProps } from 'antd/lib/icon';
|
||||
import { CustomIconComponentProps } from 'antd/es/icon';
|
||||
|
||||
export const FilledIcon: React.SFC<CustomIconComponentProps> = props => {
|
||||
const path =
|
||||
|
@ -7,7 +7,7 @@ import 'moment/locale/zh-cn';
|
||||
import { ConfigProvider } from 'antd';
|
||||
import LogRocket from 'logrocket';
|
||||
import setupLogRocketReact from 'logrocket-react';
|
||||
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import Header from './Header';
|
||||
import enLocale from '../../en-US';
|
||||
import cnLocale from '../../zh-CN';
|
||||
|
Loading…
Reference in New Issue
Block a user