Skip to content

Commit 2362467

Browse files
committed
feat: add title prop for progress, close #4929
1 parent 42e34a6 commit 2362467

File tree

4 files changed

+51
-39
lines changed

4 files changed

+51
-39
lines changed

components/progress/__tests__/__snapshots__/demo.test.js.snap

+22-22
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`renders ./components/progress/demo/circle.vue correctly 1`] = `
1313
<path d="M 50,50 m 0,-47
1414
a 47,47 0 1 1 0,94
1515
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
16-
</svg><span class="ant-progress-text">75%</span></div>
16+
</svg><span class="ant-progress-text" title="75%">75%</span></div>
1717
</div>
1818
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-exception">
1919
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -59,7 +59,7 @@ exports[`renders ./components/progress/demo/circle-dynamic.vue correctly 1`] = `
5959
<path d="M 50,50 m 0,-47
6060
a 47,47 0 1 1 0,94
6161
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
62-
</svg><span class="ant-progress-text">0%</span></div>
62+
</svg><span class="ant-progress-text" title="0%">0%</span></div>
6363
</div>
6464
<div class="ant-btn-group"><button class="ant-btn ant-btn-icon-only" type="button"><span role="img" aria-label="minus" class="anticon anticon-minus"><svg focusable="false" class="" data-icon="minus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"></path></svg></span></button><button class="ant-btn ant-btn-icon-only" type="button"><span role="img" aria-label="plus" class="anticon anticon-plus"><svg focusable="false" class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span></button></div>
6565
</div>
@@ -78,7 +78,7 @@ exports[`renders ./components/progress/demo/circle-mini.vue correctly 1`] = `
7878
<path d="M 50,50 m 0,-47
7979
a 47,47 0 1 1 0,94
8080
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
81-
</svg><span class="ant-progress-text">30%</span></div>
81+
</svg><span class="ant-progress-text" title="30%">30%</span></div>
8282
</div>
8383
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-exception">
8484
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -124,7 +124,7 @@ exports[`renders ./components/progress/demo/dashboard.vue correctly 1`] = `
124124
<path d="M 50,50 m 0,47
125125
a 47,47 0 1 1 0,-94
126126
a 47,47 0 1 1 0,94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
127-
</svg><span class="ant-progress-text">75%</span></div>
127+
</svg><span class="ant-progress-text" title="75%">75%</span></div>
128128
</div>
129129
</div>
130130
`;
@@ -137,7 +137,7 @@ exports[`renders ./components/progress/demo/dynamic.vue correctly 1`] = `
137137
<div class="ant-progress-bg" style="width: 0%; height: 8px;"></div>
138138
<!---->
139139
</div>
140-
</div><span class="ant-progress-text">0%</span>
140+
</div><span class="ant-progress-text" title="0%">0%</span>
141141
</div>
142142
<div class="ant-btn-group"><button class="ant-btn ant-btn-icon-only" type="button"><span role="img" aria-label="minus" class="anticon anticon-minus"><svg focusable="false" class="" data-icon="minus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"></path></svg></span></button><button class="ant-btn ant-btn-icon-only" type="button"><span role="img" aria-label="plus" class="anticon anticon-plus"><svg focusable="false" class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span></button></div>
143143
</div>
@@ -157,7 +157,7 @@ exports[`renders ./components/progress/demo/format.vue correctly 1`] = `
157157
<path d="M 50,50 m 0,-47
158158
a 47,47 0 1 1 0,94
159159
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
160-
</svg><span class="ant-progress-text">75 Days</span></div>
160+
</svg><span class="ant-progress-text" title="75 Days">75 Days</span></div>
161161
</div>
162162
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-success">
163163
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -171,7 +171,7 @@ exports[`renders ./components/progress/demo/format.vue correctly 1`] = `
171171
<path d="M 50,50 m 0,-47
172172
a 47,47 0 1 1 0,94
173173
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
174-
</svg><span class="ant-progress-text">Done</span></div>
174+
</svg><span class="ant-progress-text" title="Done">Done</span></div>
175175
</div>
176176
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
177177
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -198,15 +198,15 @@ exports[`renders ./components/progress/demo/gradient-line.vue correctly 1`] = `
198198
<div class="ant-progress-bg" style="width: 99.9%; height: 8px;"></div>
199199
<!---->
200200
</div>
201-
</div><span class="ant-progress-text">99.9%</span>
201+
</div><span class="ant-progress-text" title="99.9%">99.9%</span>
202202
</div>
203203
<div class="ant-progress ant-progress-line ant-progress-show-info ant-progress-default ant-progress-status-active">
204204
<div class="ant-progress-outer">
205205
<div class="ant-progress-inner">
206206
<div class="ant-progress-bg" style="width: 99.9%; height: 8px;"></div>
207207
<!---->
208208
</div>
209-
</div><span class="ant-progress-text">99.9%</span>
209+
</div><span class="ant-progress-text" title="99.9%">99.9%</span>
210210
</div>
211211
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
212212
<div class="ant-progress-inner ant-progress-circle-gradient" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -225,7 +225,7 @@ exports[`renders ./components/progress/demo/gradient-line.vue correctly 1`] = `
225225
<path d="M 50,50 m 0,-47
226226
a 47,47 0 1 1 0,94
227227
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
228-
</svg><span class="ant-progress-text">90%</span></div>
228+
</svg><span class="ant-progress-text" title="90%">90%</span></div>
229229
</div>
230230
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-success">
231231
<div class="ant-progress-inner ant-progress-circle-gradient" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -256,15 +256,15 @@ exports[`renders ./components/progress/demo/line.vue correctly 1`] = `
256256
<div class="ant-progress-bg" style="width: 30%; height: 8px;"></div>
257257
<!---->
258258
</div>
259-
</div><span class="ant-progress-text">30%</span>
259+
</div><span class="ant-progress-text" title="30%">30%</span>
260260
</div>
261261
<div class="ant-progress ant-progress-line ant-progress-show-info ant-progress-default ant-progress-status-active">
262262
<div class="ant-progress-outer">
263263
<div class="ant-progress-inner">
264264
<div class="ant-progress-bg" style="width: 50%; height: 8px;"></div>
265265
<!---->
266266
</div>
267-
</div><span class="ant-progress-text">50%</span>
267+
</div><span class="ant-progress-text" title="50%">50%</span>
268268
</div>
269269
<div class="ant-progress ant-progress-line ant-progress-show-info ant-progress-default ant-progress-status-exception">
270270
<div class="ant-progress-outer">
@@ -301,15 +301,15 @@ exports[`renders ./components/progress/demo/line-mini.vue correctly 1`] = `
301301
<div class="ant-progress-bg" style="width: 30%; height: 6px;"></div>
302302
<!---->
303303
</div>
304-
</div><span class="ant-progress-text">30%</span>
304+
</div><span class="ant-progress-text" title="30%">30%</span>
305305
</div>
306306
<div class="ant-progress ant-progress-line ant-progress-show-info ant-progress-small ant-progress-status-active">
307307
<div class="ant-progress-outer">
308308
<div class="ant-progress-inner">
309309
<div class="ant-progress-bg" style="width: 50%; height: 6px;"></div>
310310
<!---->
311311
</div>
312-
</div><span class="ant-progress-text">50%</span>
312+
</div><span class="ant-progress-text" title="50%">50%</span>
313313
</div>
314314
<div class="ant-progress ant-progress-line ant-progress-show-info ant-progress-small ant-progress-status-exception">
315315
<div class="ant-progress-outer">
@@ -338,7 +338,7 @@ exports[`renders ./components/progress/demo/linecap.vue correctly 1`] = `
338338
<div class="ant-progress-bg" style="width: 75%; height: 8px; border-radius: 0;"></div>
339339
<!---->
340340
</div>
341-
</div><span class="ant-progress-text">75%</span>
341+
</div><span class="ant-progress-text" title="75%">75%</span>
342342
</div>
343343
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
344344
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -352,7 +352,7 @@ exports[`renders ./components/progress/demo/linecap.vue correctly 1`] = `
352352
<path d="M 50,50 m 0,-47
353353
a 47,47 0 1 1 0,94
354354
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="square" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
355-
</svg><span class="ant-progress-text">75%</span></div>
355+
</svg><span class="ant-progress-text" title="75%">75%</span></div>
356356
</div>
357357
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
358358
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg class="ant-progress-circle" viewBox="0 0 100 100">
@@ -366,7 +366,7 @@ exports[`renders ./components/progress/demo/linecap.vue correctly 1`] = `
366366
<path d="M 50,50 m 0,47
367367
a 47,47 0 1 1 0,-94
368368
a 47,47 0 1 1 0,94" stroke="" stroke-linecap="square" stroke-width="6" opacity="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
369-
</svg><span class="ant-progress-text">75%</span></div>
369+
</svg><span class="ant-progress-text" title="75%">75%</span></div>
370370
</div>
371371
</div>
372372
`;
@@ -380,7 +380,7 @@ exports[`renders ./components/progress/demo/segment.vue correctly 1`] = `
380380
<div class="ant-progress-bg" style="width: 60%; height: 8px;"></div>
381381
<div class="ant-progress-success-bg" style="width: 30%; height: 8px;"></div>
382382
</div>
383-
</div><span class="ant-progress-text">60%</span>
383+
</div><span class="ant-progress-text" title="60%">60%</span>
384384
</div>
385385
<!---->
386386
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
@@ -395,7 +395,7 @@ exports[`renders ./components/progress/demo/segment.vue correctly 1`] = `
395395
<path d="M 50,50 m 0,-47
396396
a 47,47 0 1 1 0,94
397397
a 47,47 0 1 1 0,-94" stroke="" stroke-linecap="round" stroke-width="6" opacity="1" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 88.59291283123217px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
398-
</svg><span class="ant-progress-text">60%</span></div>
398+
</svg><span class="ant-progress-text" title="60%">60%</span></div>
399399
</div>
400400
<!---->
401401
<div class="ant-progress ant-progress-circle ant-progress-show-info ant-progress-default ant-progress-status-normal">
@@ -410,7 +410,7 @@ exports[`renders ./components/progress/demo/segment.vue correctly 1`] = `
410410
<path d="M 50,50 m 0,47
411411
a 47,47 0 1 1 0,-94
412412
a 47,47 0 1 1 0,94" stroke="" stroke-linecap="round" stroke-width="6" opacity="1" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #52C41A; stroke-dasharray: 88.59291283123217px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s;"></path>
413-
</svg><span class="ant-progress-text">60%</span></div>
413+
</svg><span class="ant-progress-text" title="60%">60%</span></div>
414414
</div>
415415
</div>
416416
`;
@@ -420,7 +420,7 @@ exports[`renders ./components/progress/demo/steps.vue correctly 1`] = `
420420
<div class="ant-progress-steps-outer">
421421
<div class="ant-progress-steps-item ant-progress-steps-item-active" style="width: 14px; height: 8px;"></div>
422422
<div class="ant-progress-steps-item ant-progress-steps-item-active" style="width: 14px; height: 8px;"></div>
423-
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div><span class="ant-progress-text">50%</span>
423+
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div><span class="ant-progress-text" title="50%">50%</span>
424424
</div>
425425
</div>
426426
<br>
@@ -430,7 +430,7 @@ exports[`renders ./components/progress/demo/steps.vue correctly 1`] = `
430430
<div class="ant-progress-steps-item ant-progress-steps-item-active" style="width: 14px; height: 8px;"></div>
431431
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div>
432432
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div>
433-
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div><span class="ant-progress-text">30%</span>
433+
<div class="ant-progress-steps-item" style="width: 14px; height: 8px;"></div><span class="ant-progress-text" title="30%">30%</span>
434434
</div>
435435
</div>
436436
<br>

0 commit comments

Comments
 (0)