Skip to content

Commit aed1ff0

Browse files
committed
perf: update some less
1 parent a43b128 commit aed1ff0

File tree

7 files changed

+18
-23
lines changed

7 files changed

+18
-23
lines changed

components/badge/style/index.less

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
line-height: 1;
1414

1515
&-count {
16-
z-index: @zindex-badge;
1716
min-width: @badge-height;
1817
height: @badge-height;
1918
padding: 0 6px;
@@ -37,7 +36,6 @@
3736
}
3837

3938
&-dot {
40-
z-index: @zindex-badge;
4139
width: @badge-dot-size;
4240
height: @badge-dot-size;
4341
background: @highlight-color;
@@ -51,6 +49,7 @@
5149
position: absolute;
5250
top: 0;
5351
right: 0;
52+
z-index: @zindex-badge;
5453
transform: translate(50%, -50%);
5554
transform-origin: 100% 0%;
5655
}
@@ -114,10 +113,6 @@
114113
}
115114
}
116115

117-
&-dot-status {
118-
line-height: 1;
119-
}
120-
121116
&-zoom-appear,
122117
&-zoom-enter {
123118
animation: antZoomBadgeIn 0.3s @ease-out-back;

components/color-picker/__tests__/__snapshots__/index.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ exports[`ColorPicker save event should works 1`] = `
7070
<path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
7171
</svg></i>
7272
</div>
73-
<div class="pcr-app visible" data-theme="monolith" aria-label="color picker dialog" role="window" style="left: 512px; top: 384px;">
73+
<div class="pcr-app visible" data-theme="monolith" aria-label="color picker dialog" role="window" style="top: 384px; left: 512px;">
7474
<div class="pcr-selection">
7575
<div class="pcr-color-preview">
7676
<button type="button" class="pcr-last-color" aria-label="use previous color" style="color: rgb(0, 0, 0);"></button>
@@ -225,7 +225,7 @@ exports[`ColorPicker should support disabled 1`] = `
225225
`;
226226
227227
exports[`ColorPicker should support format 1`] = `
228-
<div tabindex="0" class="ant-color-picker ant-color-picker-open">
228+
<div tabindex="0" class="ant-color-picker">
229229
<div class="ant-color-picker-selection">
230230
<div id="color-picker-box19">
231231
<div class="pickr">
@@ -238,7 +238,7 @@ exports[`ColorPicker should support format 1`] = `
238238
<path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
239239
</svg></i>
240240
</div>
241-
<div class="pcr-app visible" data-theme="monolith" aria-label="color picker dialog" role="window" style="left: 512px; top: 384px;">
241+
<div class="pcr-app" data-theme="monolith" aria-label="color picker dialog" role="window">
242242
<div class="pcr-selection">
243243
<div class="pcr-color-preview">
244244
<button type="button" class="pcr-last-color" aria-label="use previous color" style="color: rgb(0, 0, 0);"></button>

components/form/FormItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export default {
312312
let classes = `${prefixCls}-item-control`;
313313
if (validateStatus) {
314314
classes = classNames(`${prefixCls}-item-control`, {
315-
'has-feedback': props.hasFeedback || validateStatus === 'validating',
315+
'has-feedback': validateStatus && props.hasFeedback,
316316
'has-success': validateStatus === 'success',
317317
'has-warning': validateStatus === 'warning',
318318
'has-error': validateStatus === 'error',

components/select/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@
529529
}
530530

531531
&-selected {
532-
color: @select-item-selected-color;
532+
color: @text-color;
533533
font-weight: @select-item-selected-font-weight;
534534
background-color: @select-item-selected-bg;
535535
}

components/style/themes/default.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@
265265
@layout-trigger-color-light: @text-color;
266266

267267
// z-index list, order by `z-index`
268-
@zindex-badge: auto;
269-
@zindex-table-fixed: auto;
268+
@zindex-badge: 1;
269+
@zindex-table-fixed: 1;
270270
@zindex-affix: 10;
271271
@zindex-back-top: 10;
272272
@zindex-picker-panel: 10;

components/upload/Upload.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,15 @@ export default {
261261
reject: this.onReject,
262262
},
263263
ref: 'uploadRef',
264-
attrs: this.$attrs,
264+
attrs: {...this.$attrs},
265265
};
266-
266+
const children = this.$slots.default;
267+
// Remove id to avoid open by label when trigger is hidden
268+
// https://github.com/ant-design/ant-design/issues/14298
269+
if (!children || disabled) {
270+
delete vcUploadProps.props.id;
271+
delete vcUploadProps.attrs.id;
272+
}
267273
const uploadList = showUploadList ? (
268274
<LocaleReceiver
269275
componentName="Upload"
@@ -272,8 +278,6 @@ export default {
272278
/>
273279
) : null;
274280

275-
const children = this.$slots.default;
276-
277281
if (type === 'drag') {
278282
const dragCls = classNames(prefixCls, {
279283
[`${prefixCls}-drag`]: true,
@@ -304,11 +308,7 @@ export default {
304308
[`${prefixCls}-disabled`]: disabled,
305309
});
306310

307-
// Remove id to avoid open by label when trigger is hidden
308-
// https://github.com/ant-design/ant-design/issues/14298
309-
if (!children || disabled) {
310-
delete vcUploadProps.props.id;
311-
}
311+
312312

313313
const uploadButton = (
314314
<div class={uploadButtonCls} style={children ? undefined : { display: 'none' }}>

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.13';
9+
const tag = '3.26.19';
1010
const clientId = '5f6ccfdc4cdc69f8ba12';
1111
const clientSecret = process.env.CLIENT_SECRET;
1212

0 commit comments

Comments
 (0)