mirror of
https://github.com/ant-design/ant-design.git
synced 2025-07-26 00:26:53 +08:00
feat: add Button danger
This commit is contained in:
parent
3a6c76ecc3
commit
37a85366f3
@ -27,13 +27,29 @@ exports[`renders ./components/button/demo/basic.md correctly 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-danger"
|
class="ant-btn ant-btn-primary ant-btn-dangerous"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
Danger
|
Danger
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger default
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-link"
|
class="ant-btn ant-btn-link"
|
||||||
type="button"
|
type="button"
|
||||||
@ -72,13 +88,29 @@ exports[`renders ./components/button/demo/block.md correctly 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-danger ant-btn-block"
|
class="ant-btn ant-btn-primary ant-btn-block ant-btn-dangerous"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
Danger
|
Danger
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-block ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Default
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-block ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-link ant-btn-block"
|
class="ant-btn ant-btn-link ant-btn-block"
|
||||||
type="button"
|
type="button"
|
||||||
@ -163,6 +195,42 @@ exports[`renders ./components/button/demo/disabled.md correctly 1`] = `
|
|||||||
Link(disabled)
|
Link(disabled)
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<br />
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-dangerous"
|
||||||
|
disabled=""
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link(disabled)
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<br />
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Default
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-dangerous"
|
||||||
|
disabled=""
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Default(disabled)
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
<div
|
<div
|
||||||
style="padding:8px 8px 0 8px;background:rgb(190, 200, 200)"
|
style="padding:8px 8px 0 8px;background:rgb(190, 200, 200)"
|
||||||
>
|
>
|
||||||
@ -208,13 +276,29 @@ exports[`renders ./components/button/demo/ghost.md correctly 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-danger ant-btn-background-ghost"
|
class="ant-btn ant-btn-primary ant-btn-background-ghost ant-btn-dangerous"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
danger
|
danger
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-background-ghost ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Default
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-background-ghost ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-link ant-btn-background-ghost"
|
class="ant-btn ant-btn-link ant-btn-background-ghost"
|
||||||
type="button"
|
type="button"
|
||||||
@ -670,14 +754,31 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
|
|||||||
Dashed
|
Dashed
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<br />
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-danger ant-btn-lg"
|
class="ant-btn ant-btn-primary ant-btn-lg ant-btn-dangerous"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
Danger
|
Danger
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-lg ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Default
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="ant-btn ant-btn-link ant-btn-lg ant-btn-dangerous"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Danger Link
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-link ant-btn-lg"
|
class="ant-btn ant-btn-link ant-btn-lg"
|
||||||
type="button"
|
type="button"
|
||||||
@ -818,66 +919,5 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
|
|||||||
Download
|
Download
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<br />
|
|
||||||
<div
|
|
||||||
class="ant-btn-group ant-btn-group-lg"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="ant-btn ant-btn-primary"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
aria-label="left"
|
|
||||||
class="anticon anticon-left"
|
|
||||||
role="img"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
class=""
|
|
||||||
data-icon="left"
|
|
||||||
fill="currentColor"
|
|
||||||
focusable="false"
|
|
||||||
height="1em"
|
|
||||||
viewBox="64 64 896 896"
|
|
||||||
width="1em"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
Backward
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="ant-btn ant-btn-primary"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
Forward
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
aria-label="right"
|
|
||||||
class="anticon anticon-right"
|
|
||||||
role="img"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
class=""
|
|
||||||
data-icon="right"
|
|
||||||
fill="currentColor"
|
|
||||||
focusable="false"
|
|
||||||
height="1em"
|
|
||||||
viewBox="64 64 896 896"
|
|
||||||
width="1em"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -9,6 +9,7 @@ import omit from 'omit.js';
|
|||||||
import Group from './button-group';
|
import Group from './button-group';
|
||||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||||
import Wave from '../_util/wave';
|
import Wave from '../_util/wave';
|
||||||
|
import warning from '../_util/warning';
|
||||||
import { Omit, tuple } from '../_util/type';
|
import { Omit, tuple } from '../_util/type';
|
||||||
|
|
||||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||||
@ -65,16 +66,7 @@ function spaceChildren(children: React.ReactNode, needInserted: boolean) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ButtonTypes = tuple(
|
const ButtonTypes = tuple('default', 'primary', 'ghost', 'dashed', 'danger', 'link');
|
||||||
'default',
|
|
||||||
'primary',
|
|
||||||
'ghost',
|
|
||||||
'dashed',
|
|
||||||
'danger',
|
|
||||||
'danger-link',
|
|
||||||
'danger-default',
|
|
||||||
'link',
|
|
||||||
);
|
|
||||||
export type ButtonType = typeof ButtonTypes[number];
|
export type ButtonType = typeof ButtonTypes[number];
|
||||||
const ButtonShapes = tuple('circle', 'circle-outline', 'round');
|
const ButtonShapes = tuple('circle', 'circle-outline', 'round');
|
||||||
export type ButtonShape = typeof ButtonShapes[number];
|
export type ButtonShape = typeof ButtonShapes[number];
|
||||||
@ -92,6 +84,7 @@ export interface BaseButtonProps {
|
|||||||
prefixCls?: string;
|
prefixCls?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
ghost?: boolean;
|
ghost?: boolean;
|
||||||
|
danger?: boolean;
|
||||||
block?: boolean;
|
block?: boolean;
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
@ -158,6 +151,11 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.fixTwoCNChar();
|
this.fixTwoCNChar();
|
||||||
|
warning(
|
||||||
|
!('type' in this.props && this.props.type === 'danger'),
|
||||||
|
'Button',
|
||||||
|
'`type="danger"` is deprecated, please use `danger` instead.',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps: ButtonProps) {
|
componentDidUpdate(prevProps: ButtonProps) {
|
||||||
@ -227,6 +225,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
|||||||
const {
|
const {
|
||||||
prefixCls: customizePrefixCls,
|
prefixCls: customizePrefixCls,
|
||||||
type,
|
type,
|
||||||
|
danger,
|
||||||
shape,
|
shape,
|
||||||
size,
|
size,
|
||||||
className,
|
className,
|
||||||
@ -266,6 +265,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
|||||||
[`${prefixCls}-background-ghost`]: ghost,
|
[`${prefixCls}-background-ghost`]: ghost,
|
||||||
[`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && autoInsertSpace,
|
[`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && autoInsertSpace,
|
||||||
[`${prefixCls}-block`]: block,
|
[`${prefixCls}-block`]: block,
|
||||||
|
[`${prefixCls}-dangerous`]: !!danger,
|
||||||
});
|
});
|
||||||
|
|
||||||
const iconNode = loading ? <Loading /> : icon || null;
|
const iconNode = loading ? <Loading /> : icon || null;
|
||||||
@ -305,7 +305,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
|||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (type === 'link' || type === 'danger-link') {
|
if (type === 'link') {
|
||||||
return buttonNode;
|
return buttonNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,13 @@ ReactDOM.render(
|
|||||||
<Button type="primary">Primary</Button>
|
<Button type="primary">Primary</Button>
|
||||||
<Button>Default</Button>
|
<Button>Default</Button>
|
||||||
<Button type="dashed">Dashed</Button>
|
<Button type="dashed">Dashed</Button>
|
||||||
<Button type="danger">Danger</Button>
|
<Button type="primary" danger>
|
||||||
<Button type="danger-default">Danger default</Button>
|
Danger
|
||||||
<Button type="danger-link">Danger Link</Button>
|
</Button>
|
||||||
|
<Button danger>Danger default</Button>
|
||||||
|
<Button type="link" danger>
|
||||||
|
Danger Link
|
||||||
|
</Button>
|
||||||
<Button type="link">Link</Button>
|
<Button type="link">Link</Button>
|
||||||
</div>,
|
</div>,
|
||||||
mountNode,
|
mountNode,
|
||||||
|
@ -25,13 +25,13 @@ ReactDOM.render(
|
|||||||
<Button type="dashed" block>
|
<Button type="dashed" block>
|
||||||
Dashed
|
Dashed
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger" block>
|
<Button type="primary" danger block>
|
||||||
Danger
|
Danger
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-default" block>
|
<Button danger block>
|
||||||
Danger Default
|
Danger Default
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-link" block>
|
<Button type="link" danger block>
|
||||||
Danger Link
|
Danger Link
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" block>
|
<Button type="link" block>
|
||||||
|
@ -36,13 +36,15 @@ ReactDOM.render(
|
|||||||
Link(disabled)
|
Link(disabled)
|
||||||
</Button>
|
</Button>
|
||||||
<br />
|
<br />
|
||||||
<Button type="danger-link">Danger Link</Button>
|
<Button type="link" danger>
|
||||||
<Button type="danger-link" disabled>
|
Danger Link
|
||||||
|
</Button>
|
||||||
|
<Button type="link" danger disabled>
|
||||||
Danger Link(disabled)
|
Danger Link(disabled)
|
||||||
</Button>
|
</Button>
|
||||||
<br />
|
<br />
|
||||||
<Button type="danger-default">Danger Default</Button>
|
<Button danger>Danger Default</Button>
|
||||||
<Button type="danger-default" disabled>
|
<Button danger disabled>
|
||||||
Danger Default(disabled)
|
Danger Default(disabled)
|
||||||
</Button>
|
</Button>
|
||||||
<div style={{ padding: '8px 8px 0 8px', background: 'rgb(190, 200, 200)' }}>
|
<div style={{ padding: '8px 8px 0 8px', background: 'rgb(190, 200, 200)' }}>
|
||||||
|
@ -22,13 +22,13 @@ ReactDOM.render(
|
|||||||
Primary
|
Primary
|
||||||
</Button>
|
</Button>
|
||||||
<Button ghost>Default</Button>
|
<Button ghost>Default</Button>
|
||||||
<Button type="danger" ghost>
|
<Button type="primary" danger ghost>
|
||||||
danger
|
danger
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-default" ghost>
|
<Button danger ghost>
|
||||||
Danger Default
|
Danger Default
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-link" ghost>
|
<Button type="link" danger ghost>
|
||||||
Danger Link
|
Danger Link
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" ghost>
|
<Button type="link" ghost>
|
||||||
|
@ -49,13 +49,13 @@ class ButtonSize extends React.Component {
|
|||||||
Dashed
|
Dashed
|
||||||
</Button>
|
</Button>
|
||||||
<br />
|
<br />
|
||||||
<Button type="danger" size={size}>
|
<Button type="primary" danger size={size}>
|
||||||
Danger
|
Danger
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-default" size={size}>
|
<Button danger size={size}>
|
||||||
Danger Default
|
Danger Default
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="danger-link" size={size}>
|
<Button danger type="link" size={size}>
|
||||||
Danger Link
|
Danger Link
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" size={size}>
|
<Button type="link" size={size}>
|
||||||
|
@ -25,9 +25,10 @@ To get a customized button, just set `type`/`shape`/`size`/`loading`/`disabled`.
|
|||||||
| shape | can be set to `circle`, `round` or omitted | string | - | |
|
| shape | can be set to `circle`, `round` or omitted | string | - | |
|
||||||
| size | can be set to `small` `large` or omitted | string | `default` | |
|
| size | can be set to `small` `large` or omitted | string | `default` | |
|
||||||
| target | same as target attribute of a, works when href is specified | string | - | |
|
| target | same as target attribute of a, works when href is specified | string | - | |
|
||||||
| type | can be set to `primary` `ghost` `dashed` `danger` `link` or omitted (meaning `default`) | string | `default` | |
|
| type | can be set to `primary` `ghost` `dashed` `link` or omitted (meaning `default`) | string | `default` | |
|
||||||
| onClick | set the handler to handle `click` event | (event) => void | - | |
|
| onClick | set the handler to handle `click` event | (event) => void | - | |
|
||||||
| block | option to fit button width to its parent width | boolean | `false` | |
|
| block | option to fit button width to its parent width | boolean | `false` | |
|
||||||
|
| danger | set the danger status of button | boolean | `false` | |
|
||||||
|
|
||||||
It accepts all props which native buttons support.
|
It accepts all props which native buttons support.
|
||||||
|
|
||||||
|
@ -28,9 +28,10 @@ subtitle: 按钮
|
|||||||
| shape | 设置按钮形状,可选值为 `circle`、 `round` 或者不设 | string | - | |
|
| shape | 设置按钮形状,可选值为 `circle`、 `round` 或者不设 | string | - | |
|
||||||
| size | 设置按钮大小,可选值为 `small` `large` 或者不设 | string | `default` | |
|
| size | 设置按钮大小,可选值为 `small` `large` 或者不设 | string | `default` | |
|
||||||
| target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - | |
|
| target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - | |
|
||||||
| type | 设置按钮类型,可选值为 `primary` `dashed` `danger` `link` 或者不设 | string | - | |
|
| type | 设置按钮类型,可选值为 `primary` `dashed` `link` 或者不设 | string | - | |
|
||||||
| onClick | 点击按钮时的回调 | (event) => void | - | |
|
| onClick | 点击按钮时的回调 | (event) => void | - | |
|
||||||
| block | 将按钮宽度调整为其父宽度的选项 | boolean | `false` | |
|
| block | 将按钮宽度调整为其父宽度的选项 | boolean | `false` | |
|
||||||
|
| danger | 设置危险按钮 | boolean | `false` | |
|
||||||
|
|
||||||
支持原生 button 的其他所有属性。
|
支持原生 button 的其他所有属性。
|
||||||
|
|
||||||
|
@ -63,20 +63,26 @@
|
|||||||
.btn-dashed;
|
.btn-dashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// type="danger" will deprecated
|
||||||
|
// use danger instead
|
||||||
&-danger {
|
&-danger {
|
||||||
.btn-danger;
|
.btn-danger;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-danger-default {
|
&-link {
|
||||||
|
.btn-link;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-dangerous {
|
||||||
.btn-danger-default;
|
.btn-danger-default;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-danger-link {
|
&-dangerous&-primary {
|
||||||
.btn-danger-link;
|
.btn-danger;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-link {
|
&-dangerous&-link {
|
||||||
.btn-link;
|
.btn-danger-link;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-icon-only {
|
&-icon-only {
|
||||||
@ -183,12 +189,6 @@
|
|||||||
color: @component-background;
|
color: @component-background;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-background-ghost&-danger-link {
|
|
||||||
.button-variant-ghost(@error-color; transparent);
|
|
||||||
|
|
||||||
color: @component-background;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-two-chinese-chars::first-letter {
|
&-two-chinese-chars::first-letter {
|
||||||
letter-spacing: 0.34em;
|
letter-spacing: 0.34em;
|
||||||
}
|
}
|
||||||
|
@ -384,13 +384,11 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite John Brown
|
Invite John Brown
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
@ -432,13 +430,11 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite Jim Green
|
Invite Jim Green
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
@ -485,13 +481,11 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite Joe Black
|
Invite Joe Black
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
@ -2460,20 +2454,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -2554,20 +2539,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -2648,20 +2624,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -2742,20 +2709,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -2836,20 +2794,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -2930,20 +2879,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -3024,20 +2964,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -3118,20 +3049,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -3212,20 +3134,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -3306,20 +3219,11 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
Action 一 John Brown
|
style="margin-right:16px"
|
||||||
</a>
|
>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
>
|
>
|
||||||
@ -8775,13 +8679,11 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite Brown
|
Invite Brown
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
@ -8826,13 +8728,11 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite Green
|
Invite Green
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
@ -8882,13 +8782,11 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = `
|
|||||||
class="ant-table-cell"
|
class="ant-table-cell"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<a>
|
<a
|
||||||
|
style="margin-right:16px"
|
||||||
|
>
|
||||||
Invite Black
|
Invite Black
|
||||||
</a>
|
</a>
|
||||||
<div
|
|
||||||
class="ant-divider ant-divider-vertical"
|
|
||||||
role="separator"
|
|
||||||
/>
|
|
||||||
<a>
|
<a>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
|
@ -39,7 +39,6 @@ const columns = [
|
|||||||
key: 'action',
|
key: 'action',
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span>
|
<span>
|
||||||
<a style={{ marginRight: 16 }}>Action 一 {record.name}</a>
|
|
||||||
<a style={{ marginRight: 16 }}>Delete</a>
|
<a style={{ marginRight: 16 }}>Delete</a>
|
||||||
<a className="ant-dropdown-link">
|
<a className="ant-dropdown-link">
|
||||||
More actions <Down />
|
More actions <Down />
|
||||||
|
Loading…
Reference in New Issue
Block a user