Skip to content

Commit 689921f

Browse files
committed
fix: badge animation and other style
1 parent 9e33ed9 commit 689921f

File tree

6 files changed

+35
-15
lines changed

6 files changed

+35
-15
lines changed

components/badge/ScrollNumber.jsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,30 @@ export default {
5151
updated() {
5252
const { animateStarted, count } = this;
5353
if (animateStarted) {
54-
this.setState(
55-
{
56-
animateStarted: false,
57-
sCount: count,
58-
},
59-
this.onAnimated,
60-
);
54+
this.clearTimeout();
55+
// Let browser has time to reset the scroller before actually
56+
// performing the transition.
57+
this.timeout = setTimeout(() => {
58+
this.setState(
59+
{
60+
animateStarted: false,
61+
sCount: count,
62+
},
63+
this.onAnimated,
64+
);
65+
});
6166
}
6267
},
68+
beforeDestroy() {
69+
this.clearTimeout();
70+
},
6371
methods: {
72+
clearTimeout() {
73+
if (this.timeout) {
74+
clearTimeout(this.timeout);
75+
this.timeout = undefined;
76+
}
77+
},
6478
getPositionByNum(num, i) {
6579
const { sCount } = this;
6680
const currentCount = Math.abs(Number(sCount));

components/date-picker/style/Picker.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
line-height: 1;
103103
}
104104

105+
.@{ant-prefix}-input-disabled + &-icon {
106+
cursor: not-allowed;
107+
}
108+
105109
&-small &-clear,
106110
&-small &-icon {
107111
right: @control-padding-horizontal-sm;

components/grid/style/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
box-sizing: border-box;
1111
}
1212

13+
.@{ant-prefix}-row + .@{ant-prefix}-row::before {
14+
clear: both;
15+
}
16+
1317
.@{ant-prefix}-row-flex {
1418
display: flex;
1519
flex-flow: row wrap;

components/result/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const ResultProps = {
3333
};
3434

3535
const renderIcon = (h, prefixCls, { status, icon }) => {
36-
if (ExceptionStatus.includes(status)) {
36+
if (ExceptionStatus.includes(`${status}`)) {
3737
const SVGComponent = ExceptionMap[status];
3838
return (
3939
<div class={`${prefixCls}-icon ${prefixCls}-image`}>

components/table/style/index.less

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,14 @@
445445
box-shadow: @box-shadow-base;
446446

447447
.@{ant-prefix}-dropdown-menu {
448+
// https://github.com/ant-design/ant-design/issues/4916
449+
// https://github.com/ant-design/ant-design/issues/19542
450+
max-height: calc(100vh - 130px);
451+
overflow-x: hidden;
448452
border: 0;
449453
border-radius: @border-radius-base @border-radius-base 0 0;
450454
box-shadow: none;
451455

452-
// https://github.com/ant-design/ant-design/issues/4916
453-
&-without-submenu {
454-
max-height: 400px;
455-
overflow-x: hidden;
456-
}
457-
458456
&-item > label + span {
459457
padding-right: 0;
460458
}

scripts/syncStyleFromAntd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path');
66

77
const owner = 'ant-design';
88
const repo = 'ant-design';
9-
const tag = '3.26.12';
9+
const tag = '3.26.13';
1010
const clientId = '5f6ccfdc4cdc69f8ba12';
1111
const clientSecret = process.env.CLIENT_SECRET;
1212

0 commit comments

Comments
 (0)