Skip to content

Commit e165b1e

Browse files
committed
feat: update some less
1 parent cd52fec commit e165b1e

File tree

6 files changed

+20
-25
lines changed

6 files changed

+20
-25
lines changed

components/_util/transition.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ let TransitionGroup = TG;
4646

4747
if (process.env.NODE_ENV === 'test') {
4848
Transition = (props, { slots }) => {
49-
let child = slots.default?.()[0];
49+
const child = slots.default?.()[0];
5050
if (child && child.dirs && child.dirs[0]) {
5151
const value = child.dirs[0].value;
5252
const oldValue = child.dirs[0].oldValue;
@@ -60,7 +60,7 @@ if (process.env.NODE_ENV === 'test') {
6060
}
6161
return slots.default?.();
6262
};
63-
Transition.displayName = 'TransitionForTest'
63+
Transition.displayName = 'TransitionForTest';
6464
Transition.inheritAttrs = false;
6565
TransitionGroup = defineComponent({
6666
name: 'TransitionGroupForTest',
@@ -70,8 +70,8 @@ if (process.env.NODE_ENV === 'test') {
7070
const { tag: Tag, ...rest } = props;
7171
return () => {
7272
const children = slots.default?.() || [];
73-
if(Tag) {
74-
return <Tag {...rest}>{children}</Tag>
73+
if (Tag) {
74+
return <Tag {...rest}>{children}</Tag>;
7575
} else {
7676
return children;
7777
}

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/form/FormItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export default defineComponent({
356356
let classes = `${prefixCls}-item-control`;
357357
if (validateStatus) {
358358
classes = classNames(`${prefixCls}-item-control`, {
359-
'has-feedback': this.hasFeedback || validateStatus === 'validating',
359+
'has-feedback': validateStatus && this.hasFeedback,
360360
'has-success': validateStatus === 'success',
361361
'has-warning': validateStatus === 'warning',
362362
'has-error': validateStatus === 'error',

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/table/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns.md correctly 1`] = `
15041504
<!---->
15051505
<div class="ant-table-body-outer">
15061506
<div class="ant-table-body-inner">
1507-
<table class="ant-table-fixed">
1507+
<table class="ant-table-fixed" style="width: 200px;">
15081508
<colgroup>
15091509
<col style="width: 100px; min-width: 100px;">
15101510
<col style="width: 100px; min-width: 100px;">
@@ -1551,7 +1551,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns.md correctly 1`] = `
15511551
<!---->
15521552
<div class="ant-table-body-outer">
15531553
<div class="ant-table-body-inner">
1554-
<table class="ant-table-fixed">
1554+
<table class="ant-table-fixed" style="width: 100px;">
15551555
<colgroup>
15561556
<col style="width: 100px; min-width: 100px;">
15571557
</colgroup>
@@ -2151,7 +2151,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns-header.md correctly
21512151
</div>
21522152
<div class="ant-table-fixed-left">
21532153
<div class="ant-table-header">
2154-
<table class="ant-table-fixed">
2154+
<table class="ant-table-fixed" style="width: 200px;">
21552155
<colgroup>
21562156
<col style="width: 100px; min-width: 100px;">
21572157
<col style="width: 100px; min-width: 100px;">
@@ -2173,7 +2173,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns-header.md correctly
21732173
</div>
21742174
<div class="ant-table-body-outer">
21752175
<div class="ant-table-body-inner" style="max-height: 300px; overflow-y: scroll;">
2176-
<table class="ant-table-fixed">
2176+
<table class="ant-table-fixed" style="width: 200px;">
21772177
<colgroup>
21782178
<col style="width: 100px; min-width: 100px;">
21792179
<col style="width: 100px; min-width: 100px;">
@@ -2287,7 +2287,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns-header.md correctly
22872287
</div>
22882288
<div class="ant-table-fixed-right">
22892289
<div class="ant-table-header">
2290-
<table class="ant-table-fixed">
2290+
<table class="ant-table-fixed" style="width: 100px;">
22912291
<colgroup>
22922292
<col style="width: 100px; min-width: 100px;">
22932293
</colgroup>
@@ -2304,7 +2304,7 @@ exports[`renders ./antdv-demo/docs/table/demo/fixed-columns-header.md correctly
23042304
</div>
23052305
<div class="ant-table-body-outer">
23062306
<div class="ant-table-body-inner" style="max-height: 300px; overflow-y: scroll;">
2307-
<table class="ant-table-fixed">
2307+
<table class="ant-table-fixed" style="width: 100px;">
23082308
<colgroup>
23092309
<col style="width: 100px; min-width: 100px;">
23102310
</colgroup>
@@ -3603,7 +3603,7 @@ exports[`renders ./antdv-demo/docs/table/demo/grouping-columns.md correctly 1`]
36033603
</div>
36043604
<div class="ant-table-fixed-left">
36053605
<div class="ant-table-header">
3606-
<table class="ant-table-fixed">
3606+
<table class="ant-table-fixed" style="width: 100px;">
36073607
<colgroup>
36083608
<col style="width: 100px; min-width: 100px;">
36093609
</colgroup>
@@ -3620,7 +3620,7 @@ exports[`renders ./antdv-demo/docs/table/demo/grouping-columns.md correctly 1`]
36203620
</div>
36213621
<div class="ant-table-body-outer">
36223622
<div class="ant-table-body-inner" style="max-height: 240px; overflow-y: scroll;">
3623-
<table class="ant-table-fixed">
3623+
<table class="ant-table-fixed" style="width: 100px;">
36243624
<colgroup>
36253625
<col style="width: 100px; min-width: 100px;">
36263626
</colgroup>
@@ -3693,7 +3693,7 @@ exports[`renders ./antdv-demo/docs/table/demo/grouping-columns.md correctly 1`]
36933693
</div>
36943694
<div class="ant-table-fixed-right">
36953695
<div class="ant-table-header">
3696-
<table class="ant-table-fixed">
3696+
<table class="ant-table-fixed" style="width: 80px;">
36973697
<colgroup>
36983698
<col style="width: 80px; min-width: 80px;">
36993699
</colgroup>
@@ -3710,7 +3710,7 @@ exports[`renders ./antdv-demo/docs/table/demo/grouping-columns.md correctly 1`]
37103710
</div>
37113711
<div class="ant-table-body-outer">
37123712
<div class="ant-table-body-inner" style="max-height: 240px; overflow-y: scroll;">
3713-
<table class="ant-table-fixed">
3713+
<table class="ant-table-fixed" style="width: 80px;">
37143714
<colgroup>
37153715
<col style="width: 80px; min-width: 80px;">
37163716
</colgroup>

components/table/__tests__/__snapshots__/empty.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ exports[`Table renders empty table with fixed columns 1`] = `
245245
<!---->
246246
<div class="ant-table-body-outer">
247247
<div class="ant-table-body-inner">
248-
<table class="ant-table-fixed">
248+
<table class="ant-table-fixed" style="width: 200px;">
249249
<colgroup>
250250
<col style="width: 100px; min-width: 100px;">
251251
<col style="width: 100px; min-width: 100px;">
@@ -271,7 +271,7 @@ exports[`Table renders empty table with fixed columns 1`] = `
271271
<!---->
272272
<div class="ant-table-body-outer">
273273
<div class="ant-table-body-inner">
274-
<table class="ant-table-fixed">
274+
<table class="ant-table-fixed" style="width: 100px;">
275275
<colgroup>
276276
<col style="width: 100px; min-width: 100px;">
277277
</colgroup>

0 commit comments

Comments
 (0)