mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 03:22:59 +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
@ -750,66 +750,6 @@ exports[`renders ./components/progress/demo/gradient-line.md correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="ant-progress ant-progress-circle ant-progress-status-normal ant-progress-show-info ant-progress-default"
|
class="ant-progress ant-progress-circle ant-progress-status-normal 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-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
|
<div
|
||||||
class="ant-progress-inner ant-progress-circle-gradient"
|
class="ant-progress-inner ant-progress-circle-gradient"
|
||||||
@ -857,6 +797,66 @@ exports[`renders ./components/progress/demo/gradient-line.md correctly 1`] = `
|
|||||||
stroke="url(#ant-progress-gradient-12)"
|
stroke="url(#ant-progress-gradient-12)"
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-width="6"
|
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"
|
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>
|
</svg>
|
||||||
|
@ -32,7 +32,7 @@ exports[`Progress render dashboard 295 gapDegree 1`] = `
|
|||||||
stroke=""
|
stroke=""
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-width="6"
|
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>
|
</svg>
|
||||||
<span
|
<span
|
||||||
@ -77,7 +77,7 @@ exports[`Progress render dashboard 296 gapDegree 1`] = `
|
|||||||
stroke=""
|
stroke=""
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-width="6"
|
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>
|
</svg>
|
||||||
<span
|
<span
|
||||||
@ -122,7 +122,7 @@ exports[`Progress render dashboard zero gapDegree 1`] = `
|
|||||||
stroke=""
|
stroke=""
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-width="6"
|
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>
|
</svg>
|
||||||
<span
|
<span
|
||||||
@ -361,7 +361,7 @@ exports[`Progress render strokeColor 1`] = `
|
|||||||
stroke=""
|
stroke=""
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-width="6"
|
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>
|
</svg>
|
||||||
<span
|
<span
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
"rc-notification": "~4.3.0",
|
"rc-notification": "~4.3.0",
|
||||||
"rc-pagination": "~2.2.0",
|
"rc-pagination": "~2.2.0",
|
||||||
"rc-picker": "~1.4.0",
|
"rc-picker": "~1.4.0",
|
||||||
"rc-progress": "~2.5.0",
|
"rc-progress": "~2.6.0",
|
||||||
"rc-rate": "~2.6.0",
|
"rc-rate": "~2.6.0",
|
||||||
"rc-resize-observer": "^0.2.0",
|
"rc-resize-observer": "^0.2.0",
|
||||||
"rc-select": "~10.3.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/1970
|
||||||
// https://github.com/ant-design/ant-design/issues/1804
|
// https://github.com/ant-design/ant-design/issues/1804
|
||||||
if (testDist) {
|
if (testDist) {
|
||||||
it('should have antd.version', () => {
|
it('antd.js should export version', () => {
|
||||||
// eslint-disable-next-line global-require,import/no-unresolved
|
// eslint-disable-next-line global-require,import/no-unresolved
|
||||||
const antd = require('../dist/antd');
|
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);
|
expect(antd.version).toBe(pkg.version);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user