mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
refactor: 🆙 upgrade rc-progress (#24127)
* 🆙 upgrade rc-progress * test: antd.min.js ref #24116
This commit is contained in:
parent
6093f11cf0
commit
9d03db0503
@ -10,7 +10,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -52,7 +52,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -112,7 +112,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -177,7 +177,7 @@ exports[`renders ./components/progress/demo/circle-dynamic.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -282,7 +282,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
|
||||
style="width:80px;height:80px;font-size:18px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -324,7 +324,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
|
||||
style="width:80px;height:80px;font-size:18px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -384,7 +384,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
|
||||
style="width:80px;height:80px;font-size:18px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -449,7 +449,7 @@ exports[`renders ./components/progress/demo/dashboard.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -491,7 +491,7 @@ exports[`renders ./components/progress/demo/dashboard.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -623,7 +623,7 @@ exports[`renders ./components/progress/demo/format.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -665,7 +665,7 @@ exports[`renders ./components/progress/demo/format.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -756,67 +756,7 @@ exports[`renders ./components/progress/demo/gradient-line.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="ant-progress-gradient-11"
|
||||
x1="100%"
|
||||
x2="0%"
|
||||
y1="0%"
|
||||
y2="0%"
|
||||
>
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#108ee9"
|
||||
/>
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#87d068"
|
||||
/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path
|
||||
class="ant-progress-circle-trail"
|
||||
d="M 50,50 m 0,-47
|
||||
a 47,47 0 1 1 0,94
|
||||
a 47,47 0 1 1 0,-94"
|
||||
fill-opacity="0"
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke-dasharray:295.3097094374406px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"
|
||||
/>
|
||||
<path
|
||||
class="ant-progress-circle-path"
|
||||
d="M 50,50 m 0,-47
|
||||
a 47,47 0 1 1 0,94
|
||||
a 47,47 0 1 1 0,-94"
|
||||
fill-opacity="0"
|
||||
opacity="1"
|
||||
stroke="url(#ant-progress-gradient-11)"
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke:[object Object];stroke-dasharray:265.77873849369655px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
class="ant-progress-text"
|
||||
title="90%"
|
||||
>
|
||||
90%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-progress ant-progress-circle ant-progress-status-success ant-progress-show-info ant-progress-default"
|
||||
>
|
||||
<div
|
||||
class="ant-progress-inner ant-progress-circle-gradient"
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<defs>
|
||||
@ -857,6 +797,66 @@ exports[`renders ./components/progress/demo/gradient-line.md correctly 1`] = `
|
||||
stroke="url(#ant-progress-gradient-12)"
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke:[object Object];stroke-dasharray:265.77873849369655px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
class="ant-progress-text"
|
||||
title="90%"
|
||||
>
|
||||
90%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-progress ant-progress-circle ant-progress-status-success ant-progress-show-info ant-progress-default"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="ant-progress-gradient-13"
|
||||
x1="100%"
|
||||
x2="0%"
|
||||
y1="0%"
|
||||
y2="0%"
|
||||
>
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#108ee9"
|
||||
/>
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#87d068"
|
||||
/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path
|
||||
class="ant-progress-circle-trail"
|
||||
d="M 50,50 m 0,-47
|
||||
a 47,47 0 1 1 0,94
|
||||
a 47,47 0 1 1 0,-94"
|
||||
fill-opacity="0"
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke-dasharray:295.3097094374406px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"
|
||||
/>
|
||||
<path
|
||||
class="ant-progress-circle-path"
|
||||
d="M 50,50 m 0,-47
|
||||
a 47,47 0 1 1 0,94
|
||||
a 47,47 0 1 1 0,-94"
|
||||
fill-opacity="0"
|
||||
opacity="1"
|
||||
stroke="url(#ant-progress-gradient-13)"
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke:[object Object];stroke-dasharray:295.3097094374406px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"
|
||||
/>
|
||||
</svg>
|
||||
@ -1197,7 +1197,7 @@ exports[`renders ./components/progress/demo/linecap.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -1239,7 +1239,7 @@ exports[`renders ./components/progress/demo/linecap.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -1312,7 +1312,7 @@ exports[`renders ./components/progress/demo/segment.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -1366,7 +1366,7 @@ exports[`renders ./components/progress/demo/segment.md correctly 1`] = `
|
||||
style="width:120px;height:120px;font-size:24px"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
|
@ -9,7 +9,7 @@ exports[`Progress render dashboard 295 gapDegree 1`] = `
|
||||
style="width: 120px; height: 120px; font-size: 24px;"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -32,7 +32,7 @@ exports[`Progress render dashboard 295 gapDegree 1`] = `
|
||||
stroke=""
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -147.5px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s;"
|
||||
style="stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -147.5px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s; transition-duration: .3s, .3s, .3s, .06s;"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
@ -54,7 +54,7 @@ exports[`Progress render dashboard 296 gapDegree 1`] = `
|
||||
style="width: 120px; height: 120px; font-size: 24px;"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -77,7 +77,7 @@ exports[`Progress render dashboard 296 gapDegree 1`] = `
|
||||
stroke=""
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -148px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s;"
|
||||
style="stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -148px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s; transition-duration: .3s, .3s, .3s, .06s;"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
@ -99,7 +99,7 @@ exports[`Progress render dashboard zero gapDegree 1`] = `
|
||||
style="width: 120px; height: 120px; font-size: 24px;"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -122,7 +122,7 @@ exports[`Progress render dashboard zero gapDegree 1`] = `
|
||||
stroke=""
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="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;"
|
||||
style="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; transition-duration: .3s, .3s, .3s, .06s;"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
@ -338,7 +338,7 @@ exports[`Progress render strokeColor 1`] = `
|
||||
style="width: 120px; height: 120px; font-size: 24px;"
|
||||
>
|
||||
<svg
|
||||
class="ant-progress-circle "
|
||||
class="ant-progress-circle"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<path
|
||||
@ -361,7 +361,7 @@ exports[`Progress render strokeColor 1`] = `
|
||||
stroke=""
|
||||
stroke-linecap="round"
|
||||
stroke-width="6"
|
||||
style="stroke: red; stroke-dasharray: 147.6548547187203px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s;"
|
||||
style="stroke: red; stroke-dasharray: 147.6548547187203px 295.3097094374406px; stroke-dashoffset: -0px; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s; transition-duration: .3s, .3s, .3s, .06s;"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
|
@ -128,7 +128,7 @@
|
||||
"rc-notification": "~4.3.0",
|
||||
"rc-pagination": "~2.2.0",
|
||||
"rc-picker": "~1.4.0",
|
||||
"rc-progress": "~2.5.0",
|
||||
"rc-progress": "~2.6.0",
|
||||
"rc-rate": "~2.6.0",
|
||||
"rc-resize-observer": "^0.2.0",
|
||||
"rc-select": "~10.3.0",
|
||||
|
@ -14,9 +14,17 @@ describe('antd dist files', () => {
|
||||
// https://github.com/ant-design/ant-design/issues/1970
|
||||
// https://github.com/ant-design/ant-design/issues/1804
|
||||
if (testDist) {
|
||||
it('should have antd.version', () => {
|
||||
it('antd.js should export version', () => {
|
||||
// eslint-disable-next-line global-require,import/no-unresolved
|
||||
const antd = require('../dist/antd');
|
||||
expect(antd).toBeTruthy();
|
||||
expect(antd.version).toBe(pkg.version);
|
||||
});
|
||||
|
||||
it('antd.min.js should export version', () => {
|
||||
// eslint-disable-next-line global-require,import/no-unresolved
|
||||
const antd = require('../dist/antd.min');
|
||||
expect(antd).toBeTruthy();
|
||||
expect(antd.version).toBe(pkg.version);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user