mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
merge master
This commit is contained in:
commit
874ed98e31
@ -2,5 +2,8 @@ codecov:
|
||||
branch: master
|
||||
|
||||
coverage:
|
||||
precision: 1
|
||||
round: down
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
# Fail the status if coverage drops by >= 0.1%
|
||||
threshold: 0.1
|
||||
|
33
.github/PULL_REQUEST_TEMPLATE/collaborator.md
vendored
Normal file
33
.github/PULL_REQUEST_TEMPLATE/collaborator.md
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
### This is a ...
|
||||
|
||||
- [ ] New feature
|
||||
- [ ] Other
|
||||
|
||||
### What's the background?
|
||||
|
||||
> 1. Describe the source of requirement.
|
||||
> 2. Resolve what problem.
|
||||
> 3. Related issue link.
|
||||
|
||||
### API Realization
|
||||
|
||||
> 1. Basic thought of solution and other optional proposal.
|
||||
> 2. List final API realization and usage sample.
|
||||
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
|
||||
|
||||
### What's the affect?
|
||||
|
||||
> 1. Does this PR affect user? Which part will be affected?
|
||||
> 2. What will say in changelog?
|
||||
> 3. Does this PR contains potential break change or other risk?
|
||||
|
||||
### Self Check before Merge
|
||||
|
||||
- [ ] Doc is ready or not need
|
||||
- [ ] Demo is provided or not need
|
||||
- [ ] TypeScript definition is ready or not need
|
||||
- [ ] Changelog provided
|
||||
|
||||
### Additional Plan?
|
||||
|
||||
> If this PR related with other PR or following info. You can type here.
|
@ -110,4 +110,6 @@ Read our [contributing guide](https://ant.design/docs/react/contributing) and le
|
||||
|
||||
We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)
|
||||
|
||||
If you are collaborator. Please follow our [Pull Request principle](https://github.com/ant-design/ant-design/wiki/PR-principle) to create Pull Request by [collaborator template](https://github.com/ant-design/ant-design/compare?expand=1&template=collaborator.md).
|
||||
|
||||
[](https://issuehunt.io/repos/34526884)
|
||||
|
@ -84,7 +84,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
|
||||
return this.getNumberedDispayCount();
|
||||
}
|
||||
|
||||
getScollNumberTitle() {
|
||||
getScrollNumberTitle() {
|
||||
const { title, count } = this.props;
|
||||
if (title) {
|
||||
return title;
|
||||
@ -145,7 +145,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
|
||||
className={scrollNumberCls}
|
||||
count={displayCount}
|
||||
displayComponent={this.renderDispayComponent()} // <Badge status="success" count={<Icon type="xxx" />}></Badge>
|
||||
title={this.getScollNumberTitle()}
|
||||
title={this.getScrollNumberTitle()}
|
||||
style={this.getStyleWithOffset()}
|
||||
key="scrollNumber"
|
||||
/>
|
||||
|
@ -951,7 +951,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -965,12 +965,12 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -982,7 +982,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1115,7 +1115,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -1134,12 +1134,12 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1151,7 +1151,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
|
@ -6723,12 +6723,12 @@ exports[`ConfigProvider components Drawer configProvider 1`] = `
|
||||
class="config-drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="config-drawer-close"
|
||||
<div
|
||||
class="config-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="config-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="config-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -6747,8 +6747,8 @@ exports[`ConfigProvider components Drawer configProvider 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="config-drawer-body"
|
||||
/>
|
||||
@ -6780,12 +6780,12 @@ exports[`ConfigProvider components Drawer normal 1`] = `
|
||||
class="ant-drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -6804,8 +6804,8 @@ exports[`ConfigProvider components Drawer normal 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
/>
|
||||
@ -6837,12 +6837,12 @@ exports[`ConfigProvider components Drawer prefixCls 1`] = `
|
||||
class="prefix-Drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="prefix-Drawer-close"
|
||||
<div
|
||||
class="prefix-Drawer-header"
|
||||
>
|
||||
<span
|
||||
class="prefix-Drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="prefix-Drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -6861,8 +6861,8 @@ exports[`ConfigProvider components Drawer prefixCls 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="prefix-Drawer-body"
|
||||
/>
|
||||
@ -11883,7 +11883,7 @@ exports[`ConfigProvider components Tabs configProvider 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -11897,19 +11897,19 @@ exports[`ConfigProvider components Tabs configProvider 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -12008,7 +12008,7 @@ exports[`ConfigProvider components Tabs normal 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -12022,19 +12022,19 @@ exports[`ConfigProvider components Tabs normal 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -12133,7 +12133,7 @@ exports[`ConfigProvider components Tabs prefixCls 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -12147,19 +12147,19 @@ exports[`ConfigProvider components Tabs prefixCls 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@ export interface PickerProps {
|
||||
getCalendarContainer?: (triggerNode: Element) => HTMLElement;
|
||||
open?: boolean;
|
||||
onOpenChange?: (status: boolean) => void;
|
||||
disabledDate?: (current: moment.Moment) => boolean;
|
||||
disabledDate?: (current: moment.Moment | undefined) => boolean;
|
||||
renderExtraFooter?: () => React.ReactNode;
|
||||
dateRender?: (current: moment.Moment, today: moment.Moment) => React.ReactNode;
|
||||
}
|
||||
@ -37,7 +37,7 @@ export interface DatePickerProps extends PickerProps, SinglePickerProps {
|
||||
showToday?: boolean;
|
||||
open?: boolean;
|
||||
disabledTime?: (
|
||||
current: moment.Moment,
|
||||
current: moment.Moment | undefined,
|
||||
) => {
|
||||
disabledHours?: () => number[];
|
||||
disabledMinutes?: () => number[];
|
||||
@ -75,7 +75,7 @@ export interface RangePickerProps extends PickerProps {
|
||||
placeholder?: [string, string];
|
||||
mode?: string | string[];
|
||||
disabledTime?: (
|
||||
current: moment.Moment,
|
||||
current: moment.Moment | undefined,
|
||||
type: string,
|
||||
) => {
|
||||
disabledHours?: () => number[];
|
||||
|
@ -21,12 +21,12 @@ exports[`Drawer className is test_drawer 1`] = `
|
||||
class="ant-drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -45,8 +45,8 @@ exports[`Drawer className is test_drawer 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
@ -113,12 +113,12 @@ exports[`Drawer destroyOnClose is true 1`] = `
|
||||
class="ant-drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -137,8 +137,8 @@ exports[`Drawer destroyOnClose is true 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
@ -180,13 +180,9 @@ exports[`Drawer have a title 1`] = `
|
||||
>
|
||||
Test Title
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -205,8 +201,8 @@ exports[`Drawer have a title 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
@ -240,12 +236,12 @@ exports[`Drawer render correctly 1`] = `
|
||||
class="ant-drawer-wrapper-body"
|
||||
style="overflow:auto;height:100%"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -264,8 +260,8 @@ exports[`Drawer render correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
@ -298,12 +294,12 @@ exports[`Drawer render top drawer 1`] = `
|
||||
<div
|
||||
class="ant-drawer-wrapper-body"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -322,8 +318,8 @@ exports[`Drawer render top drawer 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
|
@ -30,12 +30,12 @@ exports[`Drawer render correctly 1`] = `
|
||||
class="ant-drawer-wrapper-body"
|
||||
style="overflow: auto; height: 100%;"
|
||||
>
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
<div
|
||||
class="ant-drawer-header"
|
||||
>
|
||||
<span
|
||||
class="ant-drawer-close-x"
|
||||
<button
|
||||
aria-label="Close"
|
||||
class="ant-drawer-close"
|
||||
>
|
||||
<i
|
||||
class="anticon anticon-close"
|
||||
@ -54,8 +54,8 @@ exports[`Drawer render correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-drawer-body"
|
||||
>
|
||||
|
@ -154,13 +154,37 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
|
||||
};
|
||||
};
|
||||
|
||||
renderHeader(prefixCls: string) {
|
||||
const { title, closable } = this.props;
|
||||
if (!title && !closable) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className={`${prefixCls}-header`}>
|
||||
{title && <div className={`${prefixCls}-title`}>{title}</div>}
|
||||
{this.renderCloseIcon(prefixCls)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
renderCloseIcon(prefixCls: string) {
|
||||
const { closable } = this.props;
|
||||
return (
|
||||
closable && (
|
||||
<button onClick={this.close} aria-label="Close" className={`${prefixCls}-close`}>
|
||||
<Icon type="close" />
|
||||
</button>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// render drawer body dom
|
||||
renderBody = (prefixCls: string) => {
|
||||
if (this.destoryClose && !this.props.visible) {
|
||||
const { placement, visible } = this.props;
|
||||
if (this.destoryClose && !visible) {
|
||||
return null;
|
||||
}
|
||||
this.destoryClose = false;
|
||||
const { placement } = this.props;
|
||||
|
||||
const containerStyle: React.CSSProperties =
|
||||
placement === 'left' || placement === 'right'
|
||||
@ -177,28 +201,6 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
|
||||
containerStyle.opacity = 0;
|
||||
containerStyle.transition = 'opacity .3s';
|
||||
}
|
||||
const { title, closable } = this.props;
|
||||
|
||||
// is have header dom
|
||||
let header;
|
||||
if (title) {
|
||||
header = (
|
||||
<div className={`${prefixCls}-header`}>
|
||||
<div className={`${prefixCls}-title`}>{title}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
// is have closer button
|
||||
let closer;
|
||||
if (closable) {
|
||||
closer = (
|
||||
<button onClick={this.close} aria-label="Close" className={`${prefixCls}-close`}>
|
||||
<span className={`${prefixCls}-close-x`}>
|
||||
<Icon type="close" />
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
@ -206,8 +208,7 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
|
||||
style={containerStyle}
|
||||
onTransitionEnd={this.onDestoryTransitionEnd}
|
||||
>
|
||||
{header}
|
||||
{closer}
|
||||
{this.renderHeader(prefixCls)}
|
||||
<div className={`${prefixCls}-body`}>{this.props.children}</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -122,24 +122,20 @@
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
transition: color @animation-duration-slow;
|
||||
color: @text-color-secondary;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
|
||||
&-x {
|
||||
display: block;
|
||||
font-style: normal;
|
||||
text-align: center;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: @font-size-lg;
|
||||
}
|
||||
display: block;
|
||||
font-style: normal;
|
||||
text-align: center;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: @font-size-lg;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
@ -154,6 +150,7 @@
|
||||
background: @component-background;
|
||||
color: @text-color;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-body {
|
||||
|
@ -22,7 +22,7 @@ type OverlayFunc = () => React.ReactNode;
|
||||
export interface DropDownProps {
|
||||
trigger?: ('click' | 'hover' | 'contextMenu')[];
|
||||
overlay: React.ReactNode | OverlayFunc;
|
||||
onVisibleChange?: (visible?: boolean) => void;
|
||||
onVisibleChange?: (visible: boolean) => void;
|
||||
visible?: boolean;
|
||||
disabled?: boolean;
|
||||
align?: Object;
|
||||
|
@ -17,7 +17,7 @@ export interface InputNumberProps
|
||||
step?: number | string;
|
||||
defaultValue?: number;
|
||||
tabIndex?: number;
|
||||
onChange?: (value: number | string | undefined) => void;
|
||||
onChange?: (value: number | undefined) => void;
|
||||
disabled?: boolean;
|
||||
size?: 'large' | 'small' | 'default';
|
||||
formatter?: (value: number | string | undefined) => string;
|
||||
|
@ -18,7 +18,7 @@ export interface PopconfirmProps extends AbstractTooltipProps {
|
||||
okButtonProps?: NativeButtonProps;
|
||||
cancelButtonProps?: NativeButtonProps;
|
||||
icon?: React.ReactNode;
|
||||
onVisibleChange?: (visible?: boolean, e?: React.MouseEvent<any>) => void;
|
||||
onVisibleChange?: (visible: boolean, e?: React.MouseEvent<any>) => void;
|
||||
}
|
||||
|
||||
export interface PopconfirmState {
|
||||
|
@ -123,18 +123,17 @@
|
||||
}
|
||||
|
||||
&-circle &-text {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: @progress-text-color;
|
||||
white-space: normal;
|
||||
padding: 0 6px;
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
font-size: 14 / 12em;
|
||||
|
@ -1,13 +1,12 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export interface FilterDropdownMenuWrapperProps {
|
||||
onClick?: React.MouseEventHandler<any>;
|
||||
children?: any;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default (props: FilterDropdownMenuWrapperProps) => (
|
||||
<div className={props.className} onClick={props.onClick}>
|
||||
<div className={props.className} onClick={e => e.stopPropagation()}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
|
@ -87,11 +87,13 @@ Same as `onRow` `onHeaderRow` `onCell` `onHeaderCell`
|
||||
|
||||
```jsx
|
||||
<Table
|
||||
onRow={(record) => {
|
||||
onRow={(record, rowIndex) => {
|
||||
return {
|
||||
onClick: () => {}, // click row
|
||||
onMouseEnter: () => {}, // mouse enter row
|
||||
onXxxx...
|
||||
onClick: (event) => {}, // click row
|
||||
onDoubleClick: (event) => {}, // double click row
|
||||
onContextMenu: (event) => {} // right button click row
|
||||
onMouseEnter: (event) => {} // mouse enter row
|
||||
onMouseLeave: (event) => {} // mouse leave row
|
||||
};
|
||||
}}
|
||||
onHeaderRow={(column) => {
|
||||
|
@ -94,9 +94,11 @@ const columns = [{
|
||||
<Table
|
||||
onRow={(record) => {
|
||||
return {
|
||||
onClick: () => {}, // 点击行
|
||||
onMouseEnter: () => {}, // 鼠标移入行
|
||||
onXxxx...
|
||||
onClick: (event) => {}, // 点击行
|
||||
onDoubleClick: (event) => {},
|
||||
onContextMenu: (event) => {},
|
||||
onMouseEnter: (event) => {}, // 鼠标移入行
|
||||
onMouseLeave: (event) => {}
|
||||
};
|
||||
}}
|
||||
onHeaderRow={(column) => {
|
||||
|
@ -152,6 +152,9 @@
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-column-sorters {
|
||||
> *:not(.@{table-prefix-cls}-column-sorter) {
|
||||
position: relative;
|
||||
}
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
|
@ -109,7 +109,7 @@ exports[`renders ./components/tabs/demo/basic.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -123,13 +123,13 @@ exports[`renders ./components/tabs/demo/basic.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab Pane 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -146,7 +146,7 @@ exports[`renders ./components/tabs/demo/basic.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -261,7 +261,7 @@ exports[`renders ./components/tabs/demo/card.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -274,13 +274,13 @@ exports[`renders ./components/tabs/demo/card.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab Pane 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -297,7 +297,7 @@ exports[`renders ./components/tabs/demo/card.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -415,7 +415,7 @@ exports[`renders ./components/tabs/demo/card-top.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -428,7 +428,7 @@ exports[`renders ./components/tabs/demo/card-top.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<p>
|
||||
@ -442,7 +442,7 @@ exports[`renders ./components/tabs/demo/card-top.md correctly 1`] = `
|
||||
</p>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -459,7 +459,7 @@ exports[`renders ./components/tabs/demo/card-top.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -618,7 +618,7 @@ exports[`renders ./components/tabs/demo/custom-add-trigger.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -631,13 +631,13 @@ exports[`renders ./components/tabs/demo/custom-add-trigger.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab Pane 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -649,7 +649,7 @@ exports[`renders ./components/tabs/demo/custom-add-trigger.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -770,7 +770,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -785,13 +785,13 @@ exports[`renders ./components/tabs/demo/custom-tab-bar.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab Pane 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -808,7 +808,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -924,7 +924,7 @@ exports[`renders ./components/tabs/demo/disabled.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -938,13 +938,13 @@ exports[`renders ./components/tabs/demo/disabled.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -961,7 +961,7 @@ exports[`renders ./components/tabs/demo/disabled.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1142,7 +1142,7 @@ exports[`renders ./components/tabs/demo/editable-card.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -1155,13 +1155,13 @@ exports[`renders ./components/tabs/demo/editable-card.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1178,7 +1178,7 @@ exports[`renders ./components/tabs/demo/editable-card.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1306,7 +1306,7 @@ exports[`renders ./components/tabs/demo/extra.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -1320,13 +1320,13 @@ exports[`renders ./components/tabs/demo/extra.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1343,7 +1343,7 @@ exports[`renders ./components/tabs/demo/extra.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1488,7 +1488,7 @@ exports[`renders ./components/tabs/demo/icon.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -1507,20 +1507,20 @@ exports[`renders ./components/tabs/demo/icon.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Tab 2
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -1796,7 +1796,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -1810,7 +1810,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -2058,7 +2058,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -2077,13 +2077,13 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
TTTT 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2180,13 +2180,13 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2198,7 +2198,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2369,7 +2369,7 @@ exports[`renders ./components/tabs/demo/position.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -2383,13 +2383,13 @@ exports[`renders ./components/tabs/demo/position.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of Tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2406,7 +2406,7 @@ exports[`renders ./components/tabs/demo/position.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2586,7 +2586,7 @@ exports[`renders ./components/tabs/demo/size.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -2600,13 +2600,13 @@ exports[`renders ./components/tabs/demo/size.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2623,7 +2623,7 @@ exports[`renders ./components/tabs/demo/size.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2849,7 +2849,7 @@ exports[`renders ./components/tabs/demo/slide.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -2863,13 +2863,13 @@ exports[`renders ./components/tabs/demo/slide.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
Content of tab 1
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -2926,7 +2926,7 @@ exports[`renders ./components/tabs/demo/slide.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@ exports[`Tabs renderTabBar custom-tab-bar 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -23,20 +23,20 @@ exports[`Tabs renderTabBar custom-tab-bar 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
foo
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
@ -140,7 +140,7 @@ exports[`Tabs tabPosition remove card 1`] = `
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
<div
|
||||
@ -154,20 +154,20 @@ exports[`Tabs tabPosition remove card 1`] = `
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
foo
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
role="presentation"
|
||||
style="width:0;height:0;overflow:hidden"
|
||||
style="width:0;height:0;overflow:hidden;position:absolute"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
|
@ -133,15 +133,11 @@ export interface TreeProps {
|
||||
onRightClick?: (options: AntTreeNodeMouseEvent) => void;
|
||||
/** 设置节点可拖拽(IE>8)*/
|
||||
draggable?: boolean;
|
||||
/** 开始拖拽时调用 */
|
||||
onDragStart?: (options: AntTreeNodeMouseEvent) => void;
|
||||
/** dragenter 触发时调用 */
|
||||
onDragEnter?: (options: AntTreeNodeMouseEvent) => void;
|
||||
/** dragover 触发时调用 */
|
||||
onDragOver?: (options: AntTreeNodeMouseEvent) => void;
|
||||
/** dragleave 触发时调用 */
|
||||
onDragLeave?: (options: AntTreeNodeMouseEvent) => void;
|
||||
/** drop 触发时调用 */
|
||||
onDragEnd?: (options: AntTreeNodeMouseEvent) => void;
|
||||
onDrop?: (options: AntTreeNodeDropEvent) => void;
|
||||
style?: React.CSSProperties;
|
||||
showIcon?: boolean;
|
||||
|
@ -7,7 +7,7 @@ import Tooltip from '../tooltip';
|
||||
import Progress from '../progress';
|
||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||
|
||||
const imageTypes: string[] = ['image', 'webp', 'png', 'svg', 'gif', 'jpg', 'jpeg', 'bmp'];
|
||||
const imageTypes: string[] = ['image', 'webp', 'png', 'svg', 'gif', 'jpg', 'jpeg', 'bmp', 'dpg'];
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
|
||||
const previewFile = (file: File | Blob, callback: Function) => {
|
||||
if (file.type && !imageTypes.includes(file.type)) {
|
||||
@ -33,7 +33,7 @@ const isImageUrl = (file: UploadFile): boolean => {
|
||||
}
|
||||
const url: string = (file.thumbUrl || file.url) as string;
|
||||
const extension = extname(url);
|
||||
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|bmp)$/i.test(extension)) {
|
||||
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|bmp|dpg)$/i.test(extension)) {
|
||||
return true;
|
||||
} else if (/^data:/.test(url)) {
|
||||
// other file types of base64
|
||||
|
@ -155,7 +155,7 @@
|
||||
"react-document-title": "^2.0.3",
|
||||
"react-dom": "^16.5.2",
|
||||
"react-github-button": "^0.1.11",
|
||||
"react-highlight-words": "^0.14.0",
|
||||
"react-highlight-words": "^0.15.0",
|
||||
"react-infinite-scroller": "^1.2.1",
|
||||
"react-intl": "^2.7.0",
|
||||
"react-resizable": "^1.7.5",
|
||||
|
@ -241,7 +241,6 @@ svg {
|
||||
padding: 48px 56px;
|
||||
.product-block {
|
||||
margin-bottom: 24px;
|
||||
cursor: pointer;
|
||||
color: @home-text-color;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@ -309,10 +308,11 @@ svg {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
h4 {
|
||||
color: @home-bg-color;
|
||||
}
|
||||
}
|
||||
|
||||
a.product-block:hover {
|
||||
h4 {
|
||||
color: @home-bg-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,10 +81,11 @@ export default class MainContent extends Component {
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { location } = this.props;
|
||||
if (!prevProps || prevProps.location.pathname !== location.pathname) {
|
||||
const { location: prevLocation = {} } = prevProps || {};
|
||||
if (!prevProps || prevLocation.pathname !== location.pathname) {
|
||||
this.bindScroller();
|
||||
}
|
||||
if (!window.location.hash && prevProps && prevProps.location.pathname !== location.pathname) {
|
||||
if (!window.location.hash && prevLocation.pathname !== location.pathname) {
|
||||
document.documentElement.scrollTop = 0;
|
||||
}
|
||||
setTimeout(() => {
|
||||
|
@ -152,8 +152,14 @@ export default function Page2({ isMobile, locale }) {
|
||||
</span>,
|
||||
];
|
||||
const content = isMobile && !i ? componentButton : moreContent;
|
||||
const BlockElement = item.link ? 'a' : 'div';
|
||||
return (
|
||||
<a className="product-block" key={item.name} href={item.link} style={{ display: 'block' }}>
|
||||
<BlockElement
|
||||
className="product-block"
|
||||
key={item.name}
|
||||
href={item.link}
|
||||
style={{ display: 'block' }}
|
||||
>
|
||||
<Row>
|
||||
<Col
|
||||
xs={8}
|
||||
@ -169,7 +175,7 @@ export default function Page2({ isMobile, locale }) {
|
||||
{content}
|
||||
</Col>
|
||||
</Row>
|
||||
</a>
|
||||
</BlockElement>
|
||||
);
|
||||
});
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user