Chore/fix master conflict (#14126)

* adjust table fixed column z-index (#14036)

fix #13930

* 📝 Add instruction for one column without width left in fixed table

* Add full PR template link in template (#14061)

* add full tmpl link

* adjust

* simplify it

* add cn link

* Fix Affix flickering when scrolling

* update

* fix: top border disappeared under some ie9

* fix calendar month range display (#14049)

* Fix tslint warning

* Correct typescript usage (#14074)

* 🐛 Fix steps style under IE9

close #14001

* 🐛 tweak style for not affecting vertical steps

* 📝 enhance upload documentation

* Input.Group with TimePicker disappear icon: https://codepen.io/mraiguo/pen/QzvvvE?editors=0010

* 🐛 Fix disabled button style in DatePicker panel

https://user-images.githubusercontent.com/507615/50693143-17505400-1071-11e9-9114-b150bef8f7f6.png

* 📝 site: fix BackTop been covered by footer

close #14093

* Update PULL_REQUEST_TEMPLATE.md

* Update pr_cn.md

* 🐛 Fix nested Timeline last item missing line (#14110)

close #14108

* init Spin should also support delay trigger (#14105)

fix #14100

* Update table docs

* bugfix

* Format

* update snapshot

* test: fix spin test
This commit is contained in:
Junbin Huang 2019-01-06 13:25:59 +08:00 committed by GitHub
parent 1cf1a4862e
commit d78c0f2707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 363 additions and 251 deletions

View File

@ -1,22 +1,42 @@
First of all, thank you for your contribution! :-) First of all, thank you for your contribution! 😄
Please makes sure that these checkboxes are checked before submitting your pull request, thank you! Please makes sure that these form are filled before submitting your pull request, thank you!
* [ ] Make sure that you propose pull request to right branch: bugfix for `master`, feature for branch `feature`. [[中文版](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)]
* [ ] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd).
* [ ] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style.
* [ ] Rebase before creating a pull request to keep commit history clear.
* [ ] Add some descriptions and refer relative issues for you pull request.
Extra checklist: ### This is a ...
**if** *isBugFix* **:** - [ ] New feature
- [ ] Bug fix
- [ ] Site / document update
- [ ] Branch merge
- [ ] Other (about what?)
* [ ] Make sure that you add at least one unit test for the bug which you had fixed. ### What's the background?
> 1. Describe the source of requirement.
> 2. Resolve what problem.
> 3. Related issue link.
### API Realization (Optional if not new feature)
> 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 effect? (Optional if not new feature)
**elif** *isNewFeature* **:** > 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?
* [ ] Update API docs for the component. ### Self Check before Merge
* [ ] Update/Add demo to demonstrate new feature.
* [ ] Update TypeScript definition for the component. - [ ] Doc is updated/provided or not needed
* [ ] Add unit tests for the feature. - [ ] Demo is updated/provided or not needed
- [ ] TypeScript definition is updated/provided or not needed
- [ ] Changelog provided
### Additional Plan? (Optional if not new feature)
> If this PR related with other PR or following info. You can type here.

View File

@ -1,33 +0,0 @@
### 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.

42
.github/PULL_REQUEST_TEMPLATE/pr_cn.md vendored Normal file
View File

@ -0,0 +1,42 @@
首先,感谢你的贡献!😄
请确保填写以下 pull request 的信息,谢谢!~
[[English Version](?expand=1)]
### 这个变动的性质是
- [ ] 新特性提交
- [ ] 日常 bug 修复
- [ ] 站点、文档改进
- [ ] 分支合
- [ ] 其他改动(是关于什么的改动?)
### 需求背景
> 1. 描述相关需求的来源。
> 2. 要解决的问题。
> 3. 相关的 issue 讨论链接。
### 实现方案和 API
> 1. 基本的解决思路和其他可选方案。
> 2. 列出最终的 API 实现和用法。
> 3. 涉及UI/交互变动需要有截图或 GIF。
### 对用户的影响和可能的风险
> 1. 这个改动对用户端是否有影响?影响的方面有哪些?
> 2. 预期的 changelog 要怎么写?
> 3. 是否有可能隐含的 break change 和其他风险?
### 请求合并前的自查清单
- [ ] 文档已补充或无须补充
- [ ] 代码演示已提供或无须提供
- [ ] TypeScript 定义已补充或无须补充
- [ ] Changelog 已提供或无须提供
### 后续计划
> 如果这个提交后面还有相关的其他提交和跟进信息,可以写在这里。

View File

@ -28,7 +28,7 @@ export default function wrapperRaf(callback: () => void, delayFrames: number = 1
return myId; return myId;
} }
wrapperRaf.cancel = function(id: number) { wrapperRaf.cancel = function(pid: number) {
raf.cancel(ids[id]); raf.cancel(ids[pid]);
delete ids[id]; delete ids[pid];
}; };

View File

@ -98,6 +98,7 @@ export default class Affix extends React.Component<AffixProps, AffixState> {
if (shallowequal(affixStyle, originalAffixStyle)) { if (shallowequal(affixStyle, originalAffixStyle)) {
return; return;
} }
this.setState({ affixStyle: affixStyle as React.CSSProperties }, () => { this.setState({ affixStyle: affixStyle as React.CSSProperties }, () => {
const affixed = !!this.state.affixStyle; const affixed = !!this.state.affixStyle;
if ((affixStyle && !originalAffixStyle) || (!affixStyle && originalAffixStyle)) { if ((affixStyle && !originalAffixStyle) || (!affixStyle && originalAffixStyle)) {
@ -163,7 +164,8 @@ export default class Affix extends React.Component<AffixProps, AffixState> {
const targetRect = getTargetRect(targetNode); const targetRect = getTargetRect(targetNode);
const targetInnerHeight = const targetInnerHeight =
(targetNode as Window).innerHeight || (targetNode as HTMLElement).clientHeight; (targetNode as Window).innerHeight || (targetNode as HTMLElement).clientHeight;
if (scrollTop > elemOffset.top - (offsetTop as number) && offsetMode.top) { // ref: https://github.com/ant-design/ant-design/issues/13662
if (scrollTop >= elemOffset.top - (offsetTop as number) && offsetMode.top) {
// Fixed Top // Fixed Top
const width = elemOffset.width; const width = elemOffset.width;
const top = targetRect.top + (offsetTop as number); const top = targetRect.top + (offsetTop as number);
@ -178,7 +180,8 @@ export default class Affix extends React.Component<AffixProps, AffixState> {
height: elemSize.height, height: elemSize.height,
}); });
} else if ( } else if (
scrollTop < elemOffset.top + elemSize.height + (offsetBottom as number) - targetInnerHeight && scrollTop <=
elemOffset.top + elemSize.height + (offsetBottom as number) - targetInnerHeight &&
offsetMode.bottom offsetMode.bottom
) { ) {
// Fixed Bottom // Fixed Bottom

View File

@ -7,7 +7,7 @@ exports[`renders ./components/auto-complete/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -83,7 +83,7 @@ exports[`renders ./components/auto-complete/demo/certain-category.md correctly 1
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -181,7 +181,7 @@ exports[`renders ./components/auto-complete/demo/custom.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -246,7 +246,7 @@ exports[`renders ./components/auto-complete/demo/non-case-sensitive.md correctly
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -318,7 +318,7 @@ exports[`renders ./components/auto-complete/demo/options.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -394,7 +394,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -24,7 +24,7 @@
font-weight: @badge-font-weight; font-weight: @badge-font-weight;
white-space: nowrap; white-space: nowrap;
box-shadow: 0 0 0 1px @shadow-color-inverse; box-shadow: 0 0 0 1px @shadow-color-inverse;
z-index: 10; z-index: @zindex-badge;
a, a,
a:hover { a:hover {
color: @badge-text-color; color: @badge-text-color;
@ -40,8 +40,8 @@
width: @badge-dot-size; width: @badge-dot-size;
border-radius: 100%; border-radius: 100%;
background: @highlight-color; background: @highlight-color;
z-index: 10;
box-shadow: 0 0 0 1px @shadow-color-inverse; box-shadow: 0 0 0 1px @shadow-color-inverse;
z-index: @zindex-badge;
} }
&-count, &-count,

View File

@ -8,6 +8,7 @@
} }
.button-disabled() { .button-disabled() {
&-disabled,
&.disabled, &.disabled,
&[disabled] { &[disabled] {
&, &,
@ -54,7 +55,6 @@
` `
); );
} }
&:active, &:active,
&.active { &.active {
.button-color( .button-color(
@ -62,52 +62,41 @@
` `
); );
} }
.button-disabled(); .button-disabled();
} }
.button-variant-danger(@color; @background; @border) { .button-variant-danger(@color; @background; @border) {
.button-color(@color; @background; @border); .button-color(@color; @background; @border);
&:hover { &:hover {
.button-color( .button-color(
@btn-primary-color; ~`colorPalette('@{color}', 5) `; ~`colorPalette('@{color}', 5) ` @btn-primary-color; ~`colorPalette('@{color}', 5) `; ~`colorPalette('@{color}', 5) `
); );
} }
&:focus { &:focus {
.button-color( .button-color(
~`colorPalette('@{color}', 5) `; @component-background; ~`colorPalette('@{color}', 5) ` ~`colorPalette('@{color}', 5) `; @component-background; ~`colorPalette('@{color}', 5) `
); );
} }
&:active, &:active,
&.active { &.active {
.button-color( .button-color(
@btn-primary-color; ~`colorPalette('@{color}', 7) `; ~`colorPalette('@{color}', 7) ` @btn-primary-color; ~`colorPalette('@{color}', 7) `; ~`colorPalette('@{color}', 7) `
); );
} }
.button-disabled(); .button-disabled();
} }
.button-variant-ghost(@color) { .button-variant-ghost(@color) {
.button-color(@color; transparent; @color); .button-color(@color; transparent; @color);
text-shadow: none; text-shadow: none;
&:hover, &:hover,
&:focus { &:focus {
.button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `); .button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `);
} }
&:active, &:active,
&.active { &.active {
.button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `); .button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `);
} }
.button-disabled(); .button-disabled();
} }
.button-color(@color; @background; @border) { .button-color(@color; @background; @border) {
color: @color; color: @color;
background-color: @background; background-color: @background;
@ -127,33 +116,28 @@
} }
} }
} }
.button-group-base(@btnClassName) { .button-group-base(@btnClassName) {
position: relative; position: relative;
display: inline-block; display: inline-block;
> .@{btnClassName}, > .@{btnClassName},
> span > .@{btnClassName} { > span > .@{btnClassName} {
position: relative; position: relative;
&:hover, &:hover,
&:focus, &:focus,
&:active, &:active,
&.active { &.active {
z-index: 2; z-index: 2;
} }
&:disabled { &:disabled {
z-index: 0; z-index: 0;
} }
} }
// size // size
&-lg > .@{btnClassName}, &-lg > .@{btnClassName},
&-lg > span > .@{btnClassName} { &-lg > span > .@{btnClassName} {
.button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; 0); .button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; 0);
line-height: @btn-height-lg - 2px; line-height: @btn-height-lg - 2px;
} }
&-sm > .@{btnClassName}, &-sm > .@{btnClassName},
&-sm > span > .@{btnClassName} { &-sm > span > .@{btnClassName} {
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; 0); .button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; 0);
@ -163,7 +147,6 @@
} }
} }
} }
// Base styles of buttons // Base styles of buttons
// -------------------------------------------------- // --------------------------------------------------
.btn() { .btn() {
@ -180,26 +163,21 @@
transition: all 0.3s @ease-in-out; transition: all 0.3s @ease-in-out;
position: relative; position: relative;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
> .@{iconfont-css-prefix} { > .@{iconfont-css-prefix} {
line-height: 1; line-height: 1;
} }
&, &,
&:active, &:active,
&:focus { &:focus {
outline: 0; outline: 0;
} }
&:not([disabled]):hover { &:not([disabled]):hover {
text-decoration: none; text-decoration: none;
} }
&:not([disabled]):active { &:not([disabled]):active {
outline: 0; outline: 0;
box-shadow: none; box-shadow: none;
} }
&.disabled, &.disabled,
&[disabled] { &[disabled] {
cursor: not-allowed; cursor: not-allowed;
@ -207,21 +185,17 @@
pointer-events: none; pointer-events: none;
} }
} }
&-lg { &-lg {
.button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; @btn-border-radius-base); .button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; @btn-border-radius-base);
} }
&-sm { &-sm {
.button-size(@btn-height-sm; @btn-padding-sm; @btn-font-size-sm; @btn-border-radius-sm); .button-size(@btn-height-sm; @btn-padding-sm; @btn-font-size-sm; @btn-border-radius-sm);
} }
} }
// primary button style // primary button style
.btn-primary() { .btn-primary() {
.button-variant-primary(@btn-primary-color; @btn-primary-bg); .button-variant-primary(@btn-primary-color; @btn-primary-bg);
} }
// default button style // default button style
.btn-default() { .btn-default() {
.button-variant-other(@btn-default-color; @btn-default-bg; @btn-default-border); .button-variant-other(@btn-default-color; @btn-default-bg; @btn-default-border);
@ -233,44 +207,36 @@
text-decoration: none; text-decoration: none;
} }
} }
// ghost button style // ghost button style
.btn-ghost() { .btn-ghost() {
.button-variant-other(@btn-ghost-color, @btn-ghost-bg, @btn-ghost-border); .button-variant-other(@btn-ghost-color, @btn-ghost-bg, @btn-ghost-border);
} }
// dashed button style // dashed button style
.btn-dashed() { .btn-dashed() {
.button-variant-other(@btn-default-color, @btn-default-bg, @btn-default-border); .button-variant-other(@btn-default-color, @btn-default-bg, @btn-default-border);
border-style: dashed; border-style: dashed;
} }
// danger button style // danger button style
.btn-danger() { .btn-danger() {
.button-variant-danger(@btn-danger-color, @btn-danger-bg, @btn-danger-border); .button-variant-danger(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
} }
// circle button: the content only contains icon // circle button: the content only contains icon
.btn-circle(@btnClassName: btn) { .btn-circle(@btnClassName: btn) {
.square(@btn-circle-size); .square(@btn-circle-size);
.button-size(@btn-circle-size; 0; @font-size-base + 2px; 50%); .button-size(@btn-circle-size; 0; @font-size-base + 2px; 50%);
&.@{btnClassName}-lg { &.@{btnClassName}-lg {
.square(@btn-circle-size-lg); .square(@btn-circle-size-lg);
.button-size(@btn-circle-size-lg; 0; @btn-font-size-lg + 2px; 50%); .button-size(@btn-circle-size-lg; 0; @btn-font-size-lg + 2px; 50%);
} }
&.@{btnClassName}-sm { &.@{btnClassName}-sm {
.square(@btn-circle-size-sm); .square(@btn-circle-size-sm);
.button-size(@btn-circle-size-sm; 0; @font-size-base; 50%); .button-size(@btn-circle-size-sm; 0; @font-size-base; 50%);
} }
} }
// Horizontal button groups styl // Horizontal button groups styl
// -------------------------------------------------- // --------------------------------------------------
.btn-group(@btnClassName: btn) { .btn-group(@btnClassName: btn) {
.button-group-base(@btnClassName); .button-group-base(@btnClassName);
.@{btnClassName} + .@{btnClassName}, .@{btnClassName} + .@{btnClassName},
.@{btnClassName} + &, .@{btnClassName} + &,
span + .@{btnClassName}, span + .@{btnClassName},
@ -280,15 +246,12 @@
& + & { & + & {
margin-left: -1px; margin-left: -1px;
} }
.@{btnClassName}-primary + .@{btnClassName}:not(.@{btnClassName}-primary):not([disabled]) { .@{btnClassName}-primary + .@{btnClassName}:not(.@{btnClassName}-primary):not([disabled]) {
border-left-color: transparent; border-left-color: transparent;
} }
.@{btnClassName} { .@{btnClassName} {
border-radius: 0; border-radius: 0;
} }
> .@{btnClassName}:first-child, > .@{btnClassName}:first-child,
> span:first-child > .@{btnClassName} { > span:first-child > .@{btnClassName} {
margin-left: 0; margin-left: 0;
@ -299,19 +262,16 @@
> span:only-child > .@{btnClassName} { > span:only-child > .@{btnClassName} {
border-radius: @btn-border-radius-base; border-radius: @btn-border-radius-base;
} }
> .@{btnClassName}:first-child:not(:last-child), > .@{btnClassName}:first-child:not(:last-child),
> span:first-child:not(:last-child) > .@{btnClassName} { > span:first-child:not(:last-child) > .@{btnClassName} {
border-bottom-left-radius: @btn-border-radius-base; border-bottom-left-radius: @btn-border-radius-base;
border-top-left-radius: @btn-border-radius-base; border-top-left-radius: @btn-border-radius-base;
} }
> .@{btnClassName}:last-child:not(:first-child), > .@{btnClassName}:last-child:not(:first-child),
> span:last-child:not(:first-child) > .@{btnClassName} { > span:last-child:not(:first-child) > .@{btnClassName} {
border-bottom-right-radius: @btn-border-radius-base; border-bottom-right-radius: @btn-border-radius-base;
border-top-right-radius: @btn-border-radius-base; border-top-right-radius: @btn-border-radius-base;
} }
&-sm { &-sm {
> .@{btnClassName}:only-child { > .@{btnClassName}:only-child {
border-radius: @btn-border-radius-sm; border-radius: @btn-border-radius-sm;
@ -330,15 +290,12 @@
border-top-right-radius: @btn-border-radius-sm; border-top-right-radius: @btn-border-radius-sm;
} }
} }
& > & { & > & {
float: left; float: left;
} }
& > &:not(:first-child):not(:last-child) > .@{btnClassName} { & > &:not(:first-child):not(:last-child) > .@{btnClassName} {
border-radius: 0; border-radius: 0;
} }
& > &:first-child:not(:last-child) { & > &:first-child:not(:last-child) {
> .@{btnClassName}:last-child { > .@{btnClassName}:last-child {
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
@ -346,7 +303,6 @@
padding-right: 8px; padding-right: 8px;
} }
} }
& > &:last-child:not(:first-child) > .@{btnClassName}:first-child { & > &:last-child:not(:first-child) > .@{btnClassName}:first-child {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-top-left-radius: 0; border-top-left-radius: 0;

View File

@ -74,7 +74,8 @@ export default class Header extends React.Component<HeaderProps, any> {
const currentYear = value.get('year'); const currentYear = value.get('year');
if (rangeEnd.get('year') === currentYear) { if (rangeEnd.get('year') === currentYear) {
end = rangeEnd.get('month') + 1; end = rangeEnd.get('month') + 1;
} else if (rangeStart.get('year') === currentYear) { }
if (rangeStart.get('year') === currentYear) {
start = rangeStart.get('month'); start = rangeStart.get('month');
} }
} }

View File

@ -12,7 +12,7 @@ exports[`renders ./components/calendar/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -61,7 +61,7 @@ exports[`renders ./components/calendar/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1055,7 +1055,7 @@ exports[`renders ./components/calendar/demo/card.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1104,7 +1104,7 @@ exports[`renders ./components/calendar/demo/card.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2096,7 +2096,7 @@ exports[`renders ./components/calendar/demo/notice-calendar.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2145,7 +2145,7 @@ exports[`renders ./components/calendar/demo/notice-calendar.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -3547,7 +3547,7 @@ exports[`renders ./components/calendar/demo/select.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -3596,7 +3596,7 @@ exports[`renders ./components/calendar/demo/select.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -188,7 +188,7 @@ function flattenTree(
ancestor: CascaderOptionType[] = [], ancestor: CascaderOptionType[] = [],
) { ) {
const names: FilledFieldNamesType = getFilledFieldNames(props); const names: FilledFieldNamesType = getFilledFieldNames(props);
let flattenOptions = [] as CascaderOptionType[][]; let flattenOptions: CascaderOptionType[][] = [];
const childrenName = names.children; const childrenName = names.children;
options.forEach(option => { options.forEach(option => {
const path = ancestor.concat(option); const path = ancestor.concat(option);

View File

@ -162,7 +162,7 @@ exports[`ConfigProvider components AutoComplete configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -226,7 +226,7 @@ exports[`ConfigProvider components AutoComplete normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -290,7 +290,7 @@ exports[`ConfigProvider components AutoComplete prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="prefix-AutoComplete-selection class="prefix-AutoComplete-selection
@ -1165,7 +1165,7 @@ exports[`ConfigProvider components Calendar configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -1214,7 +1214,7 @@ exports[`ConfigProvider components Calendar configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -2202,7 +2202,7 @@ exports[`ConfigProvider components Calendar configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -2558,7 +2558,7 @@ exports[`ConfigProvider components Calendar normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2607,7 +2607,7 @@ exports[`ConfigProvider components Calendar normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -3595,7 +3595,7 @@ exports[`ConfigProvider components Calendar normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -3951,7 +3951,7 @@ exports[`ConfigProvider components Calendar prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -4000,7 +4000,7 @@ exports[`ConfigProvider components Calendar prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -4988,7 +4988,7 @@ exports[`ConfigProvider components Calendar prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -8387,7 +8387,7 @@ exports[`ConfigProvider components Pagination configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -8517,7 +8517,7 @@ exports[`ConfigProvider components Pagination configProvider 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -8652,7 +8652,7 @@ exports[`ConfigProvider components Pagination normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -8782,7 +8782,7 @@ exports[`ConfigProvider components Pagination normal 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -8917,7 +8917,7 @@ exports[`ConfigProvider components Pagination prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -9047,7 +9047,7 @@ exports[`ConfigProvider components Pagination prefixCls 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -10516,7 +10516,7 @@ Array [
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="true" aria-expanded="true"
aria-haspopup="true" aria-haspopup="true"
class="config-select-selection class="config-select-selection
@ -10557,7 +10557,7 @@ Array [
class="config-select-dropdown config-select-dropdown--single config-select-dropdown-placement-bottomLeft " class="config-select-dropdown config-select-dropdown--single config-select-dropdown-placement-bottomLeft "
> >
<div <div
id="test-uuid" id=""
style="overflow:auto;transform:translateZ(0)" style="overflow:auto;transform:translateZ(0)"
> >
<ul <ul
@ -10602,7 +10602,7 @@ Array [
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="true" aria-expanded="true"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -10643,7 +10643,7 @@ Array [
class="ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft " class="ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft "
> >
<div <div
id="test-uuid" id=""
style="overflow:auto;transform:translateZ(0)" style="overflow:auto;transform:translateZ(0)"
> >
<ul <ul
@ -10688,7 +10688,7 @@ Array [
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="true" aria-expanded="true"
aria-haspopup="true" aria-haspopup="true"
class="prefix-Select-selection class="prefix-Select-selection
@ -10729,7 +10729,7 @@ Array [
class="prefix-Select-dropdown prefix-Select-dropdown--single prefix-Select-dropdown-placement-bottomLeft " class="prefix-Select-dropdown prefix-Select-dropdown--single prefix-Select-dropdown-placement-bottomLeft "
> >
<div <div
id="test-uuid" id=""
style="overflow:auto;transform:translateZ(0)" style="overflow:auto;transform:translateZ(0)"
> >
<ul <ul

View File

@ -331,12 +331,6 @@
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; @border-radius-base); .button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; @border-radius-base);
line-height: @btn-height-sm - 2px; line-height: @btn-height-sm - 2px;
&-disabled { .button-disabled();
.button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border);
cursor: not-allowed;
&:hover {
.button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border);
}
}
} }
} }

View File

@ -6,7 +6,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 10; z-index: @zindex-picker-panel;
background: @component-background; background: @component-background;
border-radius: @border-radius-base; border-radius: @border-radius-base;
outline: none; outline: none;

View File

@ -4,7 +4,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 10; z-index: @zindex-picker-panel;
border-radius: @border-radius-base; border-radius: @border-radius-base;
background: @component-background; background: @component-background;
outline: none; outline: none;

View File

@ -4,7 +4,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 10; z-index: @zindex-picker-panel;
border-radius: @border-radius-base; border-radius: @border-radius-base;
background: @component-background; background: @component-background;
outline: none; outline: none;

View File

@ -120,7 +120,7 @@
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
z-index: 10; z-index: @zindex-popup-close;
font-weight: 700; font-weight: 700;
text-decoration: none; text-decoration: none;
transition: color @animation-duration-slow; transition: color @animation-duration-slow;

View File

@ -49,7 +49,7 @@ exports[`renders ./components/empty/demo/config-provider.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -545,7 +545,7 @@ exports[`renders ./components/form/demo/coordinated.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -662,7 +662,7 @@ exports[`renders ./components/form/demo/customized-form-controls.md correctly 1`
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1784,7 +1784,7 @@ exports[`renders ./components/form/demo/register.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1874,7 +1874,7 @@ exports[`renders ./components/form/demo/register.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2551,7 +2551,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2630,7 +2630,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -4179,7 +4179,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -47,7 +47,7 @@ exports[`renders ./components/input/demo/addon.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -106,7 +106,7 @@ exports[`renders ./components/input/demo/addon.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -286,7 +286,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -346,7 +346,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -517,7 +517,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -566,7 +566,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -620,7 +620,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -696,7 +696,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -746,7 +746,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -820,7 +820,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -171,7 +171,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -227,7 +227,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -687,7 +687,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -736,7 +736,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1930,7 +1930,7 @@ exports[`renders ./components/locale-provider/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -45,7 +45,7 @@
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
z-index: 10; z-index: @zindex-popup-close;
font-weight: 700; font-weight: 700;
line-height: 1; line-height: 1;
text-decoration: none; text-decoration: none;

View File

@ -52,7 +52,7 @@ exports[`renders ./components/notification/demo/placement.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -20,6 +20,7 @@ export interface ConfigProps {
placement?: NotificationPlacement; placement?: NotificationPlacement;
getContainer?: () => HTMLElement; getContainer?: () => HTMLElement;
} }
function setNotificationConfig(options: ConfigProps) { function setNotificationConfig(options: ConfigProps) {
const { duration, placement, bottom, top, getContainer } = options; const { duration, placement, bottom, top, getContainer } = options;
if (duration !== undefined) { if (duration !== undefined) {
@ -121,6 +122,7 @@ export interface ArgsProps {
readonly type?: IconType; readonly type?: IconType;
onClick?: () => void; onClick?: () => void;
} }
function notice(args: ArgsProps) { function notice(args: ArgsProps) {
const outerPrefixCls = args.prefixCls || 'ant-notification'; const outerPrefixCls = args.prefixCls || 'ant-notification';
const prefixCls = `${outerPrefixCls}-notice`; const prefixCls = `${outerPrefixCls}-notice`;
@ -206,4 +208,5 @@ export interface NotificationApi {
config(options: ConfigProps): void; config(options: ConfigProps): void;
destroy(): void; destroy(): void;
} }
export default api as NotificationApi; export default api as NotificationApi;

View File

@ -267,7 +267,7 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -927,7 +927,7 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -55,6 +55,14 @@
background-clip: padding-box; background-clip: padding-box;
border-radius: @border-radius-base; border-radius: @border-radius-base;
box-shadow: @box-shadow-base; box-shadow: @box-shadow-base;
box-shadow: ~'0 0 8px @{shadow-color} \9';
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10+ */
&-inner {
box-shadow: @box-shadow-base;
}
} }
&-title { &-title {

View File

@ -7,7 +7,7 @@ exports[`renders ./components/select/demo/automatic-tokenization.md correctly 1`
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -50,7 +50,7 @@ exports[`renders ./components/select/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -100,7 +100,7 @@ exports[`renders ./components/select/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -150,7 +150,7 @@ exports[`renders ./components/select/demo/basic.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -205,7 +205,7 @@ exports[`renders ./components/select/demo/coordinate.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -255,7 +255,7 @@ exports[`renders ./components/select/demo/coordinate.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -309,7 +309,7 @@ exports[`renders ./components/select/demo/custom-dropdown-menu.md correctly 1`]
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -362,7 +362,7 @@ exports[`renders ./components/select/demo/hide-selected.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -411,7 +411,7 @@ exports[`renders ./components/select/demo/label-in-value.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -464,7 +464,7 @@ exports[`renders ./components/select/demo/multiple.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -581,7 +581,7 @@ exports[`renders ./components/select/demo/optgroup.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -634,7 +634,7 @@ exports[`renders ./components/select/demo/search.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -706,7 +706,7 @@ exports[`renders ./components/select/demo/search-box.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -755,7 +755,7 @@ exports[`renders ./components/select/demo/select-users.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -869,7 +869,7 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -920,7 +920,7 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1035,7 +1035,7 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1154,7 +1154,7 @@ exports[`renders ./components/select/demo/suffix.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1204,7 +1204,7 @@ exports[`renders ./components/select/demo/suffix.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1258,7 +1258,7 @@ exports[`renders ./components/select/demo/tags.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -29,14 +29,45 @@ describe('Spin', () => {
expect(wrapper).toMatchSnapshot(); expect(wrapper).toMatchSnapshot();
}); });
it("should render with delay when it's mounted with spinning=true and delay", () => { describe('delay spinning', () => {
const wrapper = mount(<Spin spinning delay={500} />); beforeAll(() => {
expect( jest.useFakeTimers();
wrapper });
.find('.ant-spin')
.at(0) afterAll(() => {
.hasClass('ant-spin-spinning'), jest.useRealTimers();
).toEqual(false); });
it("should render with delay when it's mounted with spinning=true and delay", () => {
const wrapper = mount(<Spin spinning delay={500} />);
expect(
wrapper
.find('.ant-spin')
.at(0)
.hasClass('ant-spin-spinning'),
).toEqual(false);
});
it('should render when delay is init set', () => {
const wrapper = mount(<Spin spinning delay={100} />);
expect(
wrapper
.find('.ant-spin')
.at(0)
.hasClass('ant-spin-spinning'),
).toEqual(false);
jest.runAllTimers();
wrapper.update();
expect(
wrapper
.find('.ant-spin')
.at(0)
.hasClass('ant-spin-spinning'),
).toEqual(true);
});
}); });
it('should be controlled by spinning', () => { it('should be controlled by spinning', () => {

View File

@ -94,6 +94,10 @@ class Spin extends React.Component<SpinProps, SpinState> {
return !!(this.props && this.props.children); return !!(this.props && this.props.children);
} }
componentDidMount() {
this.componentDidUpdate();
}
componentWillUnmount() { componentWillUnmount() {
if (this.debounceTimeout) { if (this.debounceTimeout) {
clearTimeout(this.debounceTimeout); clearTimeout(this.debounceTimeout);

View File

@ -0,0 +1,50 @@
.@{steps-prefix-cls}-flex-not-supported {
&.@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal {
.@{steps-prefix-cls}-item {
background: @steps-background;
padding-left: 16px;
margin-left: -16px;
}
&.@{steps-prefix-cls}-small .@{steps-prefix-cls}-item {
padding-left: 12px;
margin-left: -12px;
}
}
&.@{steps-prefix-cls}-dot {
.@{steps-prefix-cls}-item {
&:last-child {
overflow: hidden;
.@{steps-prefix-cls}-icon-dot:after {
width: 200px;
right: -200px;
}
}
.@{steps-prefix-cls}-icon-dot:before,
.@{steps-prefix-cls}-icon-dot:after {
content: '';
position: absolute;
background: @steps-background;
width: 10px;
height: 8px;
top: 0;
left: -10px;
}
.@{steps-prefix-cls}-icon-dot:after {
left: auto;
right: -10px;
}
}
.@{steps-prefix-cls}-item-wait
.@{steps-prefix-cls}-item-icon
> .@{steps-prefix-cls}-icon
.@{steps-prefix-cls}-icon-dot {
background: #ccc;
}
}
}

View File

@ -186,3 +186,4 @@
@import 'vertical'; @import 'vertical';
@import 'label-placement'; @import 'label-placement';
@import 'progress-dot'; @import 'progress-dot';
@import 'compatibility';

View File

@ -237,16 +237,20 @@
@layout-trigger-background-light: #fff; @layout-trigger-background-light: #fff;
@layout-trigger-color-light : @text-color; @layout-trigger-color-light : @text-color;
// z-index list // z-index list, order by `z-index`
@zindex-affix : 10; @zindex-affix : 10;
@zindex-back-top : 10; @zindex-back-top : 10;
@zindex-modal-mask : 1000; @zindex-badge : 10;
@zindex-picker-panel : 10;
@zindex-popup-close : 10;
@zindex-table-fixed : 20;
@zindex-modal : 1000; @zindex-modal : 1000;
@zindex-notification : 1010; @zindex-modal-mask : 1000;
@zindex-message : 1010; @zindex-message : 1010;
@zindex-notification : 1010;
@zindex-popover : 1030; @zindex-popover : 1030;
@zindex-picker : 1050;
@zindex-dropdown : 1050; @zindex-dropdown : 1050;
@zindex-picker : 1050;
@zindex-tooltip : 1060; @zindex-tooltip : 1060;
// Animation // Animation

View File

@ -64,6 +64,8 @@ const defaultPagination = {
onShowSizeChange: noop, onShowSizeChange: noop,
}; };
const ROW_SELECTION_COLUMN_WIDTH = '62px';
/** /**
* Avoid creating new object, so that parent component's shouldComponentUpdate * Avoid creating new object, so that parent component's shouldComponentUpdate
* can works appropriately * can works appropriately
@ -745,7 +747,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
render: this.renderSelectionBox(rowSelection.type), render: this.renderSelectionBox(rowSelection.type),
className: selectionColumnClass, className: selectionColumnClass,
fixed: rowSelection.fixed, fixed: rowSelection.fixed,
width: rowSelection.columnWidth, width: rowSelection.columnWidth || ROW_SELECTION_COLUMN_WIDTH,
title: rowSelection.columnTitle, title: rowSelection.columnTitle,
}; };
if (rowSelection.type !== 'radio') { if (rowSelection.type !== 'radio') {

View File

@ -26,7 +26,9 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
class="" class=""
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
<col /> <col />
</colgroup> </colgroup>
<thead <thead
@ -228,7 +230,9 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
class="ant-table-fixed" class="ant-table-fixed"
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
</colgroup> </colgroup>
<thead <thead
class="ant-table-thead" class="ant-table-thead"

View File

@ -2080,7 +2080,9 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = `
<col <col
class="ant-table-expand-icon-col" class="ant-table-expand-icon-col"
/> />
<col /> <col
style="width:62px;min-width:62px"
/>
<col <col
style="width:150px;min-width:150px" style="width:150px;min-width:150px"
/> />
@ -4288,7 +4290,9 @@ exports[`renders ./components/table/demo/expand-children.md correctly 1`] = `
class="" class=""
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
<col /> <col />
<col <col
style="width:12%;min-width:12%" style="width:12%;min-width:12%"
@ -10934,7 +10938,9 @@ exports[`renders ./components/table/demo/row-selection.md correctly 1`] = `
class="" class=""
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
<col /> <col />
<col /> <col />
<col /> <col />
@ -11313,7 +11319,9 @@ exports[`renders ./components/table/demo/row-selection-and-operation.md correctl
class="" class=""
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
<col /> <col />
<col /> <col />
<col /> <col />
@ -11962,7 +11970,9 @@ exports[`renders ./components/table/demo/row-selection-custom.md correctly 1`] =
class="" class=""
> >
<colgroup> <colgroup>
<col /> <col
style="width:62px;min-width:62px"
/>
<col /> <col />
<col /> <col />
<col /> <col />

View File

@ -9,7 +9,7 @@ title:
适合同时展示有大量数据和数据列。 适合同时展示有大量数据和数据列。
> 若列头与内容不对齐或出现列重复,请指定列的宽度 `width` > 若列头与内容不对齐或出现列重复,请指定**固定**的宽度 `width`
> >
> 建议指定 `scroll.x` 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 `scroll.x` > 建议指定 `scroll.x` 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 `scroll.x`
@ -17,7 +17,7 @@ title:
A Solution for displaying large amounts of data with long columns. A Solution for displaying large amounts of data with long columns.
> Specify the width of columns if header and cell do not align properly. > Specify the width of columns if header and cell do not align properly. (Leave one column at least without width to fit fluid layout)
> >
> A fixed value which is greater than table width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`. > A fixed value which is greater than table width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`.

View File

@ -9,7 +9,7 @@ title:
对于列数很多的数据,可以固定前后的列,横向滚动查看其它数据,需要和 `scroll.x` 配合使用。 对于列数很多的数据,可以固定前后的列,横向滚动查看其它数据,需要和 `scroll.x` 配合使用。
> 若列头与内容不对齐或出现列重复,请指定列的宽度 `width` > 若列头与内容不对齐或出现列重复,请指定**固定**的宽度 `width`
> >
> 建议指定 `scroll.x` 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 `scroll.x` > 建议指定 `scroll.x` 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 `scroll.x`
@ -17,7 +17,7 @@ title:
To fix some columns and scroll inside other columns, and you must set `scroll.x` meanwhile. To fix some columns and scroll inside other columns, and you must set `scroll.x` meanwhile.
> Specify the width of columns if header and cell do not align properly. > Specify the width of columns if header and cell do not align properly. (Leave one column at least without width to fit fluid layout)
> >
> A fixed value which is greater than table width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`. > A fixed value which is greater than table width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`.

View File

@ -9,13 +9,13 @@ title:
方便一页内展示大量数据。 方便一页内展示大量数据。
需要指定 column 的 `width` 属性,否则列头和内容可能不对齐。 需要指定 column 的 `width` 属性,否则列头和内容可能不对齐。(建议留一列不设宽度以适应弹性布局)
## en-US ## en-US
Display large amounts of data in scrollable view. Display large amounts of data in scrollable view.
> Specify the width of each column if header and cell do not align properly. > Specify width of columns if header and cell do not align properly. (Leave one column at least without width to fit fluid layout)
````jsx ````jsx
import { Table } from 'antd'; import { Table } from 'antd';

View File

@ -78,7 +78,7 @@ const columns = [{
| rowSelection | 表格行是否可选择,[配置项](#rowSelection) | object | null | | rowSelection | 表格行是否可选择,[配置项](#rowSelection) | object | null |
| scroll | 设置横向或纵向滚动,也可用于指定滚动区域的宽和高,建议为 `x` 设置一个数字,如果要设置为 `true`,需要配合样式 `.ant-table td { white-space: nowrap; }` | { x: number \| true, y: number } | - | | scroll | 设置横向或纵向滚动,也可用于指定滚动区域的宽和高,建议为 `x` 设置一个数字,如果要设置为 `true`,需要配合样式 `.ant-table td { white-space: nowrap; }` | { x: number \| true, y: number } | - |
| showHeader | 是否显示表头 | boolean | true | | showHeader | 是否显示表头 | boolean | true |
| size | 正常或迷你类型,`default` \| `middle` \| `small` | string | default | | size | 表格大小 | default \| middle \| small | default |
| title | 表格标题 | Function(currentPageData) | | | title | 表格标题 | Function(currentPageData) | |
| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter, extra: { currentDataSource: [] }) | | | onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter, extra: { currentDataSource: [] }) | |
| onExpand | 点击展开图标时触发 | Function(expanded, record) | | | onExpand | 点击展开图标时触发 | Function(expanded, record) | |

View File

@ -294,8 +294,6 @@
&-thead > tr > th.@{table-prefix-cls}-selection-column, &-thead > tr > th.@{table-prefix-cls}-selection-column,
&-tbody > tr > td.@{table-prefix-cls}-selection-column { &-tbody > tr > td.@{table-prefix-cls}-selection-column {
text-align: center; text-align: center;
min-width: 62px;
width: 62px;
.@{ant-prefix}-radio-wrapper { .@{ant-prefix}-radio-wrapper {
margin-right: 0; margin-right: 0;
} }
@ -596,6 +594,7 @@
overflow: hidden; overflow: hidden;
transition: box-shadow 0.3s ease; transition: box-shadow 0.3s ease;
border-radius: 0; border-radius: 0;
z-index: @zindex-table-fixed;
table { table {
width: auto; width: auto;
background: @component-background; background: @component-background;

View File

@ -1534,7 +1534,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1576,7 +1576,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1618,7 +1618,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -1660,7 +1660,7 @@ exports[`renders ./components/tabs/demo/nest.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection
@ -2216,7 +2216,7 @@ exports[`renders ./components/tabs/demo/position.md correctly 1`] = `
> >
<div <div
aria-autocomplete="list" aria-autocomplete="list"
aria-controls="test-uuid" aria-controls=""
aria-expanded="false" aria-expanded="false"
aria-haspopup="true" aria-haspopup="true"
class="ant-select-selection class="ant-select-selection

View File

@ -207,6 +207,7 @@
&-icon { &-icon {
position: absolute; position: absolute;
z-index: 1;
user-select: none; user-select: none;
transition: all 0.3s @ease-in-out; transition: all 0.3s @ease-in-out;
width: 14px; width: 14px;

View File

@ -77,10 +77,10 @@
} }
&-last { &-last {
.@{timeline-prefix-cls}-item-tail { > .@{timeline-prefix-cls}-item-tail {
display: none; display: none;
} }
.@{timeline-prefix-cls}-item-content { > .@{timeline-prefix-cls}-item-content {
min-height: 48px; min-height: 48px;
} }
} }

View File

@ -16,8 +16,6 @@ Uploading is the process of publishing information (web pages, text, pictures, v
## API ## API
> You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki) about how to implement server side upload interface.
| Property | Description | Type | Default | | Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- | | -------- | ----------- | ---- | ------- |
| accept | File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string | - | | accept | File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string | - |
@ -43,7 +41,7 @@ Uploading is the process of publishing information (web pages, text, pictures, v
### onChange ### onChange
> The function will be called when uploading is in progress, completed or failed > The function will be called when uploading is in progress, completed or failed.
When uploading state change, it returns: When uploading state change, it returns:
@ -70,14 +68,21 @@ When uploading state change, it returns:
2. `fileList` current list of files 2. `fileList` current list of files
3. `event` response from server, including uploading progress, supported by advanced browsers. 3. `event` response from server, including uploading progress, supported by advanced browsers.
## show download links ## FAQ
Please set property `url` of property `fileList` to control content of link ### How to implement upload server side?
## customRequest - You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki#server-side) about how to implement server side upload interface.
- There is a mock example of [express](https://github.com/react-component/upload/blob/master/server.js) in rc-upload.
- <https://github.com/react-component/upload#customrequest> ### I want to display download links.
## IE note Please set property `url` of each item in `fileList` to control content of link.
- <https://github.com/react-component/upload#ie89-note> ### How to use `customRequest`?
See <https://github.com/react-component/upload#customrequest>.
### IE8/9 Note
See <https://github.com/react-component/upload#ie89-note>.

View File

@ -17,8 +17,6 @@ title: Upload
## API ## API
> 服务端上传接口实现可以参考 [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki)。
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| accept | 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string | 无 | | accept | 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) | string | 无 |
@ -71,14 +69,21 @@ title: Upload
2. `fileList` 当前的文件列表。 2. `fileList` 当前的文件列表。
3. `event` 上传中的服务端响应内容,包含了上传进度等信息,高级浏览器支持。 3. `event` 上传中的服务端响应内容,包含了上传进度等信息,高级浏览器支持。
## 显示下载链接 ## FAQ
### 服务端如何实现?
- 服务端上传接口实现可以参考 [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki#server-side)。
- 如果要做本地 mock 可以参考这个 [express 的例子](https://github.com/react-component/upload/blob/master/server.js)。
### 如何显示下载链接?
请使用 fileList 属性设置数组项的 url 属性进行展示控制。 请使用 fileList 属性设置数组项的 url 属性进行展示控制。
## customRequest ### `customRequest` 怎么使用?
- <https://github.com/react-component/upload#customrequest> 请参考 <https://github.com/react-component/upload#customrequest>
## IE note ### IE8/9 问题
- <https://github.com/react-component/upload#ie89-note> 请参考 <https://github.com/react-component/upload#ie89-note>

View File

@ -7,7 +7,7 @@ footer {
font-size: 14px; font-size: 14px;
background-color: #000; background-color: #000;
position: relative; position: relative;
z-index: 100; z-index: 9;
margin-left: -1px; margin-left: -1px;
color: rgba(255, 255, 255, 0.65); color: rgba(255, 255, 255, 0.65);

View File

@ -52,8 +52,10 @@ ul.toc > li {
background: #fff; background: #fff;
overflow: auto; overflow: auto;
max-height: ~'calc(100vh - 16px)'; max-height: ~'calc(100vh - 16px)';
z-index: 9;
} }
} }
.toc-affix-bottom { .toc-affix-bottom {
position: absolute; position: absolute;
bottom: 88px; bottom: 88px;