mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
update Icon api
This commit is contained in:
parent
8aaddaca84
commit
f275f3090a
@ -9,7 +9,6 @@ exports[`Icon \`component\` prop can access to svg defs if has children 1`] = `
|
||||
class=""
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="1em"
|
||||
>
|
||||
<defs>
|
||||
@ -145,7 +144,7 @@ exports[`Icon should support svg react component 1`] = `
|
||||
class=""
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
viewBox="0 0 24 24"
|
||||
width="1em"
|
||||
>
|
||||
<title>
|
||||
@ -170,7 +169,6 @@ exports[`Icon.create() should support iconfont.cn 1`] = `
|
||||
class=""
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="1em"
|
||||
>
|
||||
<use
|
||||
@ -186,7 +184,6 @@ exports[`Icon.create() should support iconfont.cn 1`] = `
|
||||
class=""
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="1em"
|
||||
>
|
||||
<use
|
||||
@ -202,7 +199,6 @@ exports[`Icon.create() should support iconfont.cn 1`] = `
|
||||
class=""
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="1em"
|
||||
>
|
||||
<use
|
||||
|
@ -7,7 +7,7 @@ title:
|
||||
|
||||
## zh-CN
|
||||
|
||||
利用 `Icon` 组件封装一个可复用的自定义图标。可以将 `svg` 图标的路径信息作为 `children` 传入至组件,也可以进一步通过 `component` 属性传入一个组件来渲染最终的图标,以满足特定的需求。
|
||||
利用 `Icon` 组件封装一个可复用的自定义图标。可以将 `svg` 图标的路径信息作为 `children` 传入至组件,也可以进一步通过 `component` 属性传入一个组件来渲染最终的图标,以满足特定的需求。这个例子中使用了 `@svgr/webpack` 来将 `svg` 图标转化为 `React` 组件。
|
||||
|
||||
## en-US
|
||||
|
||||
@ -21,11 +21,11 @@ import AntDesignSvg from './assets/ant-design.svg';
|
||||
// which convert `*.svg` file into react component.
|
||||
|
||||
const HeartIcon = props => (
|
||||
<Icon component={HeartSvg} viewBox="0 0 1024 1024" {...props} />
|
||||
<Icon component={HeartSvg} {...props} />
|
||||
);
|
||||
|
||||
const AntDesignIcon = props => (
|
||||
<Icon component={AntDesignSvg} viewBox="0 0 200 200" {...props} />
|
||||
<Icon component={AntDesignSvg} {...props} />
|
||||
);
|
||||
|
||||
const SvgDefinitions = () => (
|
||||
|
@ -12,9 +12,10 @@ export interface CustomIconComponentProps {
|
||||
width: string | number;
|
||||
height: string | number;
|
||||
fill: string;
|
||||
viewBox: string;
|
||||
viewBox?: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
['aria-hidden']?: string;
|
||||
}
|
||||
|
||||
export interface IconProps {
|
||||
@ -37,15 +38,16 @@ export interface IconProps {
|
||||
const Icon: React.SFC<IconProps> = (props) => {
|
||||
const {
|
||||
// affect outter <i>...</i>
|
||||
tag = 'i',
|
||||
tag: Tag = 'i',
|
||||
title,
|
||||
className = '',
|
||||
onClick,
|
||||
style,
|
||||
|
||||
// affect inner <svg>...</svg>
|
||||
type,
|
||||
component,
|
||||
viewBox = '0 0 1024 1024',
|
||||
component: Component,
|
||||
viewBox,
|
||||
spin,
|
||||
flip,
|
||||
svgClassName,
|
||||
@ -57,18 +59,10 @@ const Icon: React.SFC<IconProps> = (props) => {
|
||||
} = props;
|
||||
|
||||
warning(
|
||||
Boolean(type || component || children),
|
||||
Boolean(type || Component || children),
|
||||
'Icon should have `type` prop or `component` prop or `children`.',
|
||||
);
|
||||
|
||||
if (component || children) {
|
||||
warning(
|
||||
Boolean(viewBox),
|
||||
'Make sure that you provide correct `viewBox`' +
|
||||
' prop (default `0 0 1024 1024`) to Icon.',
|
||||
);
|
||||
}
|
||||
|
||||
const classString = classNames(
|
||||
{ [`anticon`]: true, [`anticon-${type}`]: Boolean(type) },
|
||||
className,
|
||||
@ -85,57 +79,60 @@ const Icon: React.SFC<IconProps> = (props) => {
|
||||
);
|
||||
|
||||
// component > children > type
|
||||
if (component) {
|
||||
const innerSvgProps = {
|
||||
if (Component) {
|
||||
const innerSvgProps: CustomIconComponentProps = {
|
||||
...svgBaseProps,
|
||||
viewBox,
|
||||
className: svgClassString,
|
||||
style: computedSvgStyle,
|
||||
viewBox,
|
||||
};
|
||||
return React.createElement(
|
||||
tag,
|
||||
{ className: classString, style, onClick },
|
||||
React.createElement(
|
||||
component,
|
||||
innerSvgProps,
|
||||
children,
|
||||
),
|
||||
if (!viewBox) {
|
||||
delete innerSvgProps.viewBox;
|
||||
}
|
||||
|
||||
return (
|
||||
<Tag className={classString} title={title} style={style} onClick={onClick}>
|
||||
<Component {...innerSvgProps} >
|
||||
{children}
|
||||
</Component>
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
|
||||
if (children) {
|
||||
const innerSvgProps = {
|
||||
warning(
|
||||
Boolean(viewBox),
|
||||
'Make sure that you provide correct `viewBox`' +
|
||||
' prop (default `0 0 1024 1024`) to Icon.',
|
||||
);
|
||||
const innerSvgProps: CustomIconComponentProps = {
|
||||
...svgBaseProps,
|
||||
viewBox,
|
||||
className: svgClassString,
|
||||
style: computedSvgStyle,
|
||||
};
|
||||
return React.createElement(
|
||||
tag,
|
||||
{ className: classString, style, onClick },
|
||||
React.createElement(
|
||||
'svg',
|
||||
innerSvgProps,
|
||||
children,
|
||||
),
|
||||
return (
|
||||
<Tag className={classString} title={title} style={style} onClick={onClick}>
|
||||
<svg {...innerSvgProps} viewBox={viewBox}>
|
||||
{children}
|
||||
</svg>
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
|
||||
if (type) {
|
||||
return React.createElement(
|
||||
tag,
|
||||
{ className: classString, style, onClick },
|
||||
<ReactIcon
|
||||
className={svgClassString}
|
||||
type={type}
|
||||
style={computedSvgStyle}
|
||||
/>,
|
||||
return (
|
||||
<Tag className={classString} title={title} style={style} onClick={onClick}>
|
||||
<ReactIcon
|
||||
className={svgClassString}
|
||||
type={type}
|
||||
style={computedSvgStyle}
|
||||
/>
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
|
||||
return React.createElement(
|
||||
tag,
|
||||
{ className: classString, style, onClick },
|
||||
return (
|
||||
<Tag className={classString} title={title} style={style} onClick={onClick} />
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -23,28 +23,28 @@ toc: false
|
||||
|
||||
> Click the icon and copy the code。
|
||||
|
||||
### Directional Icons
|
||||
### 方向性图标
|
||||
|
||||
```__react
|
||||
import IconSet from 'site/theme/template/IconSet';
|
||||
ReactDOM.render(<IconSet className="icons" catigory="direction" />, mountNode);
|
||||
```
|
||||
|
||||
### Suggested Icons
|
||||
### 提示建议性图标
|
||||
|
||||
```__react
|
||||
import IconSet from 'site/theme/template/IconSet';
|
||||
ReactDOM.render(<IconSet className="icons" catigory="suggestion" />, mountNode);
|
||||
```
|
||||
|
||||
### Application Icons
|
||||
### 网站通用图标
|
||||
|
||||
```__react
|
||||
import IconSet from 'site/theme/template/IconSet';
|
||||
ReactDOM.render(<IconSet className="icons" catigory="other" />, mountNode);
|
||||
```
|
||||
|
||||
### Brand and Logos
|
||||
### 品牌与标识
|
||||
|
||||
```__react
|
||||
import IconSet from 'site/theme/template/IconSet';
|
||||
@ -57,14 +57,16 @@ ReactDOM.render(<IconSet className="icons" catigory="logo" />, mountNode);
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| type | 图标类型,应符合图标的命名规范 | string | - |
|
||||
| type | 图标类型,遵循图标的命名规范 | string | - |
|
||||
| rotate | 设置图标顺时针旋转的角度,使用角度制 | number | - |
|
||||
| flip | 翻转图标,可进行水平、垂直翻转 | 'horizontal' \| 'vertical' \| 'both' | - |
|
||||
| tag | 设置图标容器的标签 | string | 'i' |
|
||||
| style | 设置图标的样式,例如 `fontSize` 和 `color` | CSSProperties | - |
|
||||
| svgStyle | 设置图标本身`<svg>`标签的样式,会覆盖`flip`和`rotate`的效果 | CSSProperties | - |
|
||||
| svgClassName | 设置图标本身`<svg>`标签的额外类名 | string | - |
|
||||
| svgClassName | 为图标本身`<svg>`标签设置额外的类名 | string | - |
|
||||
| spin | 是否有旋转动画 | boolean | false |
|
||||
| viewBox | 设置自定义图标[视图容器盒](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/viewBox)的大小,对自定义图标有效,**对 Ant Design 内置图标无效** | string | '0 0 1024 1024' |
|
||||
| component | 控制如何渲染图标,通常是一个渲染为 `<svg>` 标签的 `React` 组件,**会使 `type` 属性失效** | ComponentType<CustomIconComponentProps\> | - |
|
||||
|
||||
所有的图标都会以 `<svg>` 标签渲染,可以使用 `style` 和 `className` 设置图标的大小和单色图标的颜色。例如:
|
||||
|
||||
@ -72,30 +74,24 @@ ReactDOM.render(<IconSet className="icons" catigory="logo" />, mountNode);
|
||||
<Icon type="message" style={{ fontSize: '16px', color: '#08c' }} />
|
||||
```
|
||||
|
||||
### Icon.CustomIcon
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| svgType | 图标类型,可以是图标符号的 `id` 或者是一个包含图标符号信息的对象 | string \| SpriteSvgIcon | - |
|
||||
| viewBox | 设置图标[视图容器盒](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/viewBox)的大小 | string | '0 0 1024 1024' |
|
||||
| component | 控制如何渲染图标,通常是一个渲染为 `<svg>` 标签的 `React` 组件 | ComponentType<CustomIconComponentProps\> | - |
|
||||
| rotate | 设置图标顺时针旋转的角度,使用角度制 | number | - |
|
||||
| flip | 翻转图标,可进行水平、垂直翻转 | 'horizontal' \| 'vertical' \| 'both' | - |
|
||||
| tag | 设置图标容器的标签 | string | 'i' |
|
||||
| style | 设置图标的样式,例如 `fontSize` 和 `color` | CSSProperties | - |
|
||||
| svgStyle | 设置图标本身`<svg>`标签的样式,会覆盖`flip`和`rotate`的效果 | CSSProperties | - |
|
||||
| svgClassName | 设置图标本身`<svg>`标签的额外类名 | string | - |
|
||||
| spin | 是否有旋转动画 | boolean | false |
|
||||
|
||||
如果您使用 `webpack`,可以通过配置 [svg-sprite-loader](https://github.com/kisenka/svg-sprite-loader) 来简化图标符号的导入
|
||||
如果您使用 `webpack`,可以通过配置 [@svgr/webpack](https://www.npmjs.com/package/@svgr/webpack) 来将 `svg` 图标作为 `React` 组件导入
|
||||
|
||||
```js
|
||||
// webpack.config.js
|
||||
{
|
||||
test: /\.svg$/,
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: [
|
||||
{ loader: 'svg-sprite-loader' },
|
||||
]
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
loader: '@svgr/webpack',
|
||||
options: {
|
||||
babel: false,
|
||||
icon: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
@ -106,30 +102,15 @@ ReactDOM.render(<IconSet className="icons" catigory="logo" />, mountNode);
|
||||
import { Icon } from 'antd';
|
||||
import MessageSvg from 'path/to/message.svg'; // path to your '*.svg' file.
|
||||
|
||||
const DemoIcon = (props) => {
|
||||
return <Icon.CustomIcon {...props} viewBox="0 0 1024 1024" />
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<DemoIcon svgType={MessageSvg} />,
|
||||
<Icon component={MessageSvg} />,
|
||||
mountNode
|
||||
);
|
||||
```
|
||||
|
||||
#### SpriteSvgIcon
|
||||
|
||||
`Icon.CustomIcon` 中的 `svgType` 可传入的 `SpriteSvgIcon` 对象的部分属性如下:
|
||||
|
||||
| 字段 | 说明 | 类型 | 只读值 |
|
||||
| --- | --- | --- | --- |
|
||||
| id | 符号名称 | string | - |
|
||||
| viewBox | 图标[视图容器盒](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/viewBox)的大小 | string | - |
|
||||
|
||||
更多属性请参阅 [svg-sprite-loader 文档](https://github.com/kisenka/svg-sprite-loader#runtime-configuration) 中的说明
|
||||
|
||||
#### CustomIconComponentProps
|
||||
|
||||
`Icon.CustomIcon` 中的 `component` 组件属性如下:
|
||||
`Icon` 中的 `component` 组件属性如下:
|
||||
|
||||
| 字段 | 说明 | 类型 | 只读值 |
|
||||
| --- | --- | --- | --- |
|
||||
|
@ -1701,6 +1701,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -7142,6 +7142,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="الفلاتر"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -11986,6 +11987,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Филтриране"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -16830,6 +16832,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtrar Menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -21674,6 +21677,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtr"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -26518,6 +26522,7 @@ exports[`Locale Provider should display the text as de 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter-Menü"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -31362,6 +31367,7 @@ exports[`Locale Provider should display the text as el 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Μενού φίλτρων"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -36206,6 +36212,7 @@ exports[`Locale Provider should display the text as en 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -41050,6 +41057,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -45894,6 +45902,7 @@ exports[`Locale Provider should display the text as es 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtrar menú"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -50738,6 +50747,7 @@ exports[`Locale Provider should display the text as et 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtri menüü"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -55582,6 +55592,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="منوی فیلتر"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -60426,6 +60437,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Suodatus valikko"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -65270,6 +65282,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtrer"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -70114,6 +70127,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtrer"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -74958,6 +74972,7 @@ exports[`Locale Provider should display the text as is 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Afmarkanir"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -79802,6 +79817,7 @@ exports[`Locale Provider should display the text as it 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Menu Filtro"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -84646,6 +84662,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="メニューをフィルター"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -89490,6 +89507,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="필터 메뉴"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -94334,6 +94352,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Menuê peldanka"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -99178,6 +99197,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtermeny"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -104022,6 +104042,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filteren"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -108866,6 +108887,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="FilterMenu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -113710,6 +113732,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Menu filtra"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -118554,6 +118577,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtro"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -123398,6 +123422,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtro"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -128242,6 +128267,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Фильтр"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -133086,6 +133112,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -137930,6 +137957,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -142774,6 +142802,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -147618,6 +147647,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filtermeny"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -152462,6 +152492,7 @@ exports[`Locale Provider should display the text as th 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="ตัวกรอง"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -157306,6 +157337,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Menü Filtrele"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -162150,6 +162182,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Фільтрувати"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -166994,6 +167027,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Bộ "
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -171838,6 +171872,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="筛选"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -176682,6 +176717,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="篩選器"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -98,6 +98,7 @@ exports[`Table.filter renders filter correctly 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -69,6 +69,7 @@ exports[`renders ./components/table/demo/ajax.md correctly 1`] = `
|
||||
Gender
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -950,6 +951,7 @@ exports[`renders ./components/table/demo/custom-filter-panel.md correctly 1`] =
|
||||
<i
|
||||
class="anticon anticon-smile-o ant-table-filter-icon ant-dropdown-trigger"
|
||||
style="color:#aaa"
|
||||
title="Filter menu"
|
||||
/>
|
||||
</span>
|
||||
</th>
|
||||
@ -967,6 +969,7 @@ exports[`renders ./components/table/demo/custom-filter-panel.md correctly 1`] =
|
||||
Address
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -7249,6 +7252,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -7939,6 +7943,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = `
|
||||
Name
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -8434,6 +8439,7 @@ exports[`renders ./components/table/demo/head.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -8509,6 +8515,7 @@ exports[`renders ./components/table/demo/head.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -9402,6 +9409,7 @@ exports[`renders ./components/table/demo/reset-filter.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -9477,6 +9485,7 @@ exports[`renders ./components/table/demo/reset-filter.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-filter ant-dropdown-trigger"
|
||||
title="Filter menu"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -59,6 +59,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -84,6 +85,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -109,6 +111,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -176,6 +179,7 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -236,6 +240,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
|
||||
</a>
|
||||
<i
|
||||
class="anticon anticon-delete"
|
||||
title="Remove file"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -313,6 +318,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -346,6 +352,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -393,6 +400,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -426,6 +434,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -47,6 +47,7 @@ exports[`Upload List handle error 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
<div
|
||||
class="ant-upload-list-item-progress fade-leave"
|
||||
@ -122,6 +123,7 @@ exports[`Upload List should be uploading when upload a file 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
<div
|
||||
class="ant-upload-list-item-progress"
|
||||
@ -197,6 +199,7 @@ exports[`Upload List should be uploading when upload a file 2`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
<div
|
||||
class="ant-upload-list-item-progress fade-leave"
|
||||
@ -304,6 +307,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -337,6 +341,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -391,6 +396,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -445,6 +451,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -478,6 +485,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -511,6 +519,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -544,6 +553,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -577,6 +587,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -610,6 +621,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -643,6 +655,7 @@ exports[`Upload List should non-image format file preview 1`] = `
|
||||
</div>
|
||||
<i
|
||||
class="anticon anticon-cross"
|
||||
title="Remove file"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -167,7 +167,7 @@ module.exports = {
|
||||
loader: '@svgr/webpack',
|
||||
options: {
|
||||
babel: false,
|
||||
ref: true,
|
||||
icon: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user