Skip to content

Commit 12918ae

Browse files
committed
feat: update antd3.8.4
1 parent 702fbc8 commit 12918ae

File tree

22 files changed

+319
-133
lines changed

22 files changed

+319
-133
lines changed

components/badge/demo/index.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</script>
5353

5454
<style>
55-
#components-badge-demo .ant-badge:not(.ant-badge-status) {
55+
#components-badge-demo .ant-badge:not(.ant-badge-not-a-wrapper) {
5656
margin-right: 20px;
5757
}
5858
#components-badge-demo .head-example {
@@ -62,4 +62,7 @@
6262
background: #eee;
6363
display: inline-block;
6464
}
65+
#components-badge-demo .ant-badge-not-a-wrapper:not(.ant-badge-status) {
66+
margin-right: 8px;
67+
}
6568
</style>

components/badge/style/index.less

+14-14
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
color: unset;
1414

1515
&-count {
16-
position: absolute;
17-
transform: translate(50%, -50%);
18-
top: 0;
19-
right: 0;
16+
top: -@badge-height / 2;
2017
height: @badge-height;
2118
border-radius: @badge-height / 2;
2219
min-width: @badge-height;
@@ -28,7 +25,6 @@
2825
font-size: @badge-font-size;
2926
font-weight: @badge-font-weight;
3027
white-space: nowrap;
31-
transform-origin: 0 center;
3228
box-shadow: 0 0 0 1px #fff;
3329
a,
3430
a:hover {
@@ -41,11 +37,7 @@
4137
}
4238

4339
&-dot {
44-
position: absolute;
45-
transform: translate(50%, -50%);
46-
transform-origin: 0 center;
47-
top: 0;
48-
right: 0;
40+
top: -@badge-dot-size / 2;
4941
height: @badge-dot-size;
5042
width: @badge-dot-size;
5143
border-radius: 100%;
@@ -54,6 +46,14 @@
5446
box-shadow: 0 0 0 1px #fff;
5547
}
5648

49+
&-count,
50+
&-dot {
51+
position: absolute;
52+
right: 0;
53+
transform: translateX(50%);
54+
transform-origin: 100%;
55+
}
56+
5757
&-status {
5858
line-height: inherit;
5959
vertical-align: baseline;
@@ -150,19 +150,19 @@
150150
@keyframes antZoomBadgeIn {
151151
0% {
152152
opacity: 0;
153-
transform: scale(0) translateX(-50%);
153+
transform: scale(0) translateX(50%);
154154
}
155155
100% {
156-
transform: scale(1) translateX(-50%);
156+
transform: scale(1) translateX(50%);
157157
}
158158
}
159159

160160
@keyframes antZoomBadgeOut {
161161
0% {
162-
transform: scale(1) translateX(-50%);
162+
transform: scale(1) translateX(50%);
163163
}
164164
100% {
165165
opacity: 0;
166-
transform: scale(0) translateX(-50%);
166+
transform: scale(0) translateX(50%);
167167
}
168168
}

components/card/style/index.less

+12-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
@card-prefix-cls: ~"@{ant-prefix}-card";
55
@card-head-height: 48px;
66
@card-hover-border: rgba(0, 0, 0, 0.09);
7+
@card-radius: @border-radius-sm;
78

89
.@{card-prefix-cls} {
910
.reset-component;
1011
background: @component-background;
11-
border-radius: @border-radius-sm;
12+
border-radius: @card-radius;
1213
position: relative;
1314
transition: all .3s;
1415

@@ -28,7 +29,7 @@
2829
background: @card-head-background;
2930
border-bottom: @border-width-base @border-style-base @border-color-split;
3031
padding: 0 @card-padding-base;
31-
border-radius: @border-radius-sm @border-radius-sm 0 0;
32+
border-radius: @card-radius @card-radius 0 0;
3233
.clearfix;
3334
margin-bottom: -1px; // Fix card grid overflow bug: https://gw.alipayobjects.com/zos/rmsportal/XonYxBikwpgbqIQBeuhk.png
3435
min-height: @card-head-height;
@@ -101,9 +102,14 @@
101102
padding-bottom: 0;
102103
}
103104

104-
&-cover > * {
105-
width: 100%;
106-
display: block;
105+
&-cover {
106+
> * {
107+
width: 100%;
108+
display: block;
109+
}
110+
img {
111+
border-radius: @card-radius @card-radius 0 0;
112+
}
107113
}
108114

109115
&-actions {
@@ -232,7 +238,7 @@
232238
&-loading-block {
233239
height: 14px;
234240
margin: 4px 0;
235-
border-radius: @border-radius-sm;
241+
border-radius: @card-radius;
236242
background: linear-gradient(90deg, rgba(207, 216, 220, .2), rgba(207, 216, 220, .4), rgba(207, 216, 220, .2));
237243
animation: card-loading 1.4s ease infinite;
238244
background-size: 600% 600%;

components/cascader/style/index.less

+2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@
165165
padding: 0;
166166
border-right: @border-width-base @border-style-base @border-color-split;
167167
overflow: auto;
168+
-ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
169+
168170
&:first-child {
169171
border-radius: @border-radius-base 0 0 @border-radius-base;
170172
}

components/checkbox/style/mixin.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686

8787
// 半选状态
8888
.@{checkbox-prefix-cls}-indeterminate .@{checkbox-inner-prefix-cls}:after {
89-
@indeterminate-width: @checkbox-size - 7px;
90-
@indeterminate-height: @checkbox-size - 7px;
89+
@indeterminate-width: @checkbox-size - 8px;
90+
@indeterminate-height: @checkbox-size - 8px;
9191
content: ' ';
9292
transform: translate(-50%, -50%) scale(1);
9393
border: 0;

components/drawer/style/drawer.less

+61-21
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,29 @@
55
.@{dawer-prefix-cls} {
66
position: fixed;
77
top: 0;
8-
width: 100%;
9-
height: 100%;
10-
pointer-events: none;
8+
width: 0%;
119
z-index: @zindex-modal;
12-
transition: transform 0.3s @ease-in-out-circ;
1310
> * {
14-
transition: transform 0.3s @ease-in-out-circ;
11+
transition: transform @animation-duration-slow @ease-base-in;
1512
}
1613

1714
&-content-wrapper {
18-
position: absolute;
15+
position: fixed;
16+
}
17+
.@{dawer-prefix-cls}-content {
18+
width: 100%;
19+
height: 100%;
1920
}
20-
2121
&-left,
2222
&-right {
23-
.@{dawer-prefix-cls}-content-wrapper,
24-
.@{dawer-prefix-cls}-content {
23+
width: 0%;
24+
height: 100%;
25+
.@{dawer-prefix-cls}-content-wrapper {
2526
height: 100%;
2627
}
28+
&.@{dawer-prefix-cls}-open {
29+
width: 100%;
30+
}
2731
}
2832
&-left {
2933
&.@{dawer-prefix-cls}-open {
@@ -44,13 +48,41 @@
4448
}
4549
}
4650
}
47-
&.@{dawer-prefix-cls}-open {
48-
> * {
49-
pointer-events: auto;
51+
52+
&-top,
53+
&-bottom {
54+
.@{dawer-prefix-cls}-content-wrapper,
55+
.@{dawer-prefix-cls}-content {
56+
width: 100%;
5057
}
58+
}
59+
&-top {
60+
&.@{dawer-prefix-cls}-open {
61+
.@{dawer-prefix-cls}-content-wrapper {
62+
box-shadow: @shadow-1-down;
63+
}
64+
}
65+
}
66+
&-bottom {
67+
.@{dawer-prefix-cls} {
68+
&-content-wrapper {
69+
bottom: 0;
70+
}
71+
}
72+
&.@{dawer-prefix-cls}-open {
73+
.@{dawer-prefix-cls}-content-wrapper {
74+
box-shadow: @shadow-1-up;
75+
}
76+
}
77+
}
78+
79+
&.@{dawer-prefix-cls}-open {
5180
.@{dawer-prefix-cls} {
5281
&-mask {
5382
opacity: 0.3;
83+
height: 100%;
84+
animation: antdDrawerFadeIn @animation-duration-slow @ease-base-out;
85+
transition: none;
5486
}
5587
}
5688
}
@@ -82,7 +114,7 @@
82114
font-weight: 700;
83115
line-height: 1;
84116
text-decoration: none;
85-
transition: color 0.3s;
117+
transition: color @animation-duration-slow;
86118
color: @text-color-secondary;
87119
outline: 0;
88120
padding: 0;
@@ -129,21 +161,29 @@
129161

130162
&-mask {
131163
position: fixed;
132-
top: 0;
133-
right: 0;
134-
left: 0;
135-
bottom: 0;
164+
width: 100%;
165+
height: 0;
136166
opacity: 0;
137167
background-color: @modal-mask-bg;
138-
height: 100%;
139-
transition: opacity 0.3s @ease-in-out-circ;
140168
filter: ~"alpha(opacity=50)";
169+
transition: opacity @animation-duration-slow linear, height 0s ease @animation-duration-slow;
141170
}
142-
143171
&-open {
144-
overflow: hidden;
172+
transition: transform @animation-duration-slow @ease-base-out;
173+
> * {
174+
transition: transform @animation-duration-slow @ease-base-out;
175+
}
145176
&-content {
146177
box-shadow: @shadow-2;
147178
}
148179
}
149180
}
181+
182+
@keyframes antdDrawerFadeIn {
183+
0% {
184+
opacity: 0;
185+
}
186+
100% {
187+
opacity: 0.3;
188+
}
189+
}

components/drawer/style/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import '../../style/index.less'
2-
import './index.less'
1+
import '../../style/index.less';
2+
import './index.less';
33

44
// style dependencies
5-
import '../../button/style'
5+
import '../../button/style';

components/input-number/style/index.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
cursor: pointer;
124124
&-inner {
125125
top: 50%;
126-
margin-top: -6px;
126+
margin-top: -5px;
127127
&:before {
128128
text-align: center;
129129
content: "\e61e";
@@ -136,7 +136,7 @@
136136

137137
&-handler-down {
138138
border-top: @border-width-base @border-style-base @border-color-base;
139-
top: -1px;
139+
top: 0;
140140
cursor: pointer;
141141
&-inner {
142142
top: 50%;

components/input/style/mixin.less

+5
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@
271271
display: inline-block;
272272
}
273273

274+
// https://github.com/ant-design/ant-design/issues/11863
275+
& > span > .@{inputClass} {
276+
border-right-width: 0;
277+
}
278+
274279
// Undo float for .ant-input-group .ant-input
275280
.@{inputClass} {
276281
float: none;

components/menu/style/index.less

+11
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@
179179
position: absolute;
180180
border-radius: @border-radius-base;
181181
z-index: @zindex-dropdown;
182+
183+
&:before {
184+
position: absolute;
185+
top: -7px;
186+
left: -6px;
187+
right: -6px;
188+
bottom: 0;
189+
content: ' ';
190+
opacity: .0001;
191+
}
182192
}
183193

184194
> .@{menu-prefix-cls} {
@@ -375,6 +385,7 @@
375385
width: @menu-collapsed-width;
376386
> .@{menu-prefix-cls}-item,
377387
> .@{menu-prefix-cls}-item-group > .@{menu-prefix-cls}-item-group-list > .@{menu-prefix-cls}-item,
388+
> .@{menu-prefix-cls}-item-group > .@{menu-prefix-cls}-item-group-list > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title,
378389
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
379390
left: 0;
380391
text-overflow: clip;

components/steps/style/index.less

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@steps-small-icon-size: 24px;
2626
@steps-dot-size: 8px;
2727
@steps-current-dot-size: 10px;
28-
@steps-desciption-max-width: 140px;
28+
@steps-desciption-max-width: 150px;
2929

3030
.@{steps-prefix-cls} {
3131
.reset-component;
@@ -147,6 +147,7 @@
147147
}
148148
&-description {
149149
max-width: @steps-desciption-max-width;
150+
white-space: normal;
150151
}
151152
}
152153
}

0 commit comments

Comments
 (0)