feat: update progress & radio

pull/309/head
tangjinzhou 2018-12-10 22:25:16 +08:00
parent 0bb79c27a6
commit 1d72ddf6bc
8 changed files with 62 additions and 60 deletions

View File

@ -177,10 +177,10 @@ describe('DatePicker', () => {
}, 0)
await asyncExpect(() => {
selectDateFromBody(moment('2016-11-23'))
}, 0)
}, 100)
await asyncExpect(() => {
clearInput(wrapper)
}, 300)
}, 1000)
await asyncExpect(() => {
openPanel(wrapper)
}, 0)

View File

@ -6,27 +6,27 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">75%</span></div>
</svg><span title="75%" class="ant-progress-text">75%</span></div>
</div>
<div class="ant-progress ant-progress-circle ant-progress-status-exception ant-progress-show-info ant-progress-default">
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #ff5500; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #ff5500; stroke-dasharray: 206.7167966062084px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text"><i class="anticon anticon-cross"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span></div>
</svg><span class="ant-progress-text"><i class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></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" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@ -41,8 +41,11 @@ exports[`renders ./components/progress/demo/circle-dynamic.md correctly 1`] = `
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">0%</span></div>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span title="0%" class="ant-progress-text">0%</span></div>
</div>
<div class="ant-btn-group"><button type="button" class="ant-btn ant-btn-default"><i class="anticon anticon-minus"><svg viewBox="64 64 896 896" data-icon="minus" width="1em" height="1em" fill="currentColor" aria-hidden="true" class="">
<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>
@ -58,27 +61,27 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 88.59291283123217px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">30%</span></div>
</svg><span title="30%" class="ant-progress-text">30%</span></div>
</div>
<div class="ant-progress ant-progress-circle ant-progress-status-exception ant-progress-show-info ant-progress-default">
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #ff5500; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #ff5500; stroke-dasharray: 206.7167966062084px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text"><i class="anticon anticon-cross"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span></div>
</svg><span class="ant-progress-text"><i class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></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" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@ -93,11 +96,11 @@ exports[`renders ./components/progress/demo/dashboard.md correctly 1`] = `
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
<path d="M 50,50 m 0,47
a 47,47 0 1 1 0,-94
a 47,47 0 1 1 0,94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 165.23228207808043px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
</svg><span class="ant-progress-text">75%</span></div>
</svg><span title="75%" class="ant-progress-text">75%</span></div>
</div>
</div>
`;
@ -110,7 +113,7 @@ exports[`renders ./components/progress/demo/dynamic.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 0%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">0%</span>
</div><span title="0%" class="ant-progress-text">0%</span>
</div>
</div>
<div class="ant-btn-group"><button type="button" class="ant-btn ant-btn-default"><i class="anticon anticon-minus"><svg viewBox="64 64 896 896" data-icon="minus" width="1em" height="1em" fill="currentColor" aria-hidden="true" class="">
@ -127,21 +130,21 @@ exports[`renders ./components/progress/demo/format.md correctly 1`] = `
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">75 Days</span></div>
</svg><span title="75 Days" class="ant-progress-text">75 Days</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" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">Done</span></div>
</svg><span title="Done" class="ant-progress-text">Done</span></div>
</div>
</div>
`;
@ -154,7 +157,7 @@ exports[`renders ./components/progress/demo/line.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 30%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">30%</span>
</div><span title="30%" class="ant-progress-text">30%</span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-active ant-progress-show-info ant-progress-default">
@ -163,7 +166,7 @@ exports[`renders ./components/progress/demo/line.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 50%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">50%</span>
</div><span title="50%" class="ant-progress-text">50%</span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-exception ant-progress-show-info ant-progress-default">
@ -172,7 +175,7 @@ exports[`renders ./components/progress/demo/line.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 70%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-cross-circle"><!----></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-close-circle"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></i></span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-success ant-progress-show-info ant-progress-default">
@ -181,7 +184,7 @@ exports[`renders ./components/progress/demo/line.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 100%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path></svg></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg></i></span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-normal ant-progress-default">
@ -204,7 +207,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 30%; height: 6px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">30%</span>
</div><span title="30%" class="ant-progress-text">30%</span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-active ant-progress-show-info ant-progress-small">
@ -213,7 +216,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 50%; height: 6px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">50%</span>
</div><span title="50%" class="ant-progress-text">50%</span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-exception ant-progress-show-info ant-progress-small">
@ -222,7 +225,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 70%; height: 6px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-cross-circle"><!----></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-close-circle"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></i></span>
</div>
</div>
<div class="ant-progress ant-progress-line ant-progress-status-success ant-progress-show-info ant-progress-small">
@ -231,7 +234,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 100%; height: 6px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path></svg></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg></i></span>
</div>
</div>
</div>
@ -245,28 +248,28 @@ exports[`renders ./components/progress/demo/linecap.md correctly 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 75%; height: 8px; border-radius: 0;"></div>
</div>
</div><span class="ant-progress-text">75%</span>
</div><span title="75%" class="ant-progress-text">75%</span>
</div>
</div>
<div class="ant-progress ant-progress-circle ant-progress-status-normal ant-progress-show-info ant-progress-default">
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">75%</span></div>
</svg><span title="75%" class="ant-progress-text">75%</span></div>
</div>
<div class="ant-progress ant-progress-circle ant-progress-status-normal ant-progress-show-info ant-progress-default">
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: #108ee9; stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
<path d="M 50,50 m 0,47
a 47,47 0 1 1 0,-94
a 47,47 0 1 1 0,94" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 165.23228207808043px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
</svg><span class="ant-progress-text">75%</span></div>
</svg><span title="75%" class="ant-progress-text">75%</span></div>
</div>
</div>
`;
@ -279,7 +282,7 @@ exports[`renders ./components/progress/demo/segment.md correctly 1`] = `
<div class="ant-progress-bg" style="width: 60%; height: 8px; border-radius: 100px;"></div>
<div class="ant-progress-success-bg" style="width: 30%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">60%</span>
</div><span title="60%" class="ant-progress-text">60%</span>
</div>
</div>
`;

View File

@ -5,11 +5,11 @@ exports[`Progress render format 1`] = `
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" 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" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke: red; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
<path d="M 50,50 m 0,-47
a 47,47 0 1 1 0,94
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: red; stroke-dasharray: 147.6548547187203px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
</svg><span class="ant-progress-text">50%</span></div>
</svg><span title="50%" class="ant-progress-text">50%</span></div>
</div>
`;
@ -20,7 +20,7 @@ exports[`Progress render negetive progress 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 0%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">0%</span>
</div><span title="0%" class="ant-progress-text">0%</span>
</div>
</div>
`;
@ -33,7 +33,7 @@ exports[`Progress render negetive successPercent 1`] = `
<div class="ant-progress-bg" style="width: 50%; height: 8px; border-radius: 100px;"></div>
<div class="ant-progress-success-bg" style="width: 0%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">50%</span>
</div><span title="50%" class="ant-progress-text">50%</span>
</div>
</div>
`;
@ -46,7 +46,7 @@ exports[`Progress render negetive successPercent 2`] = `
<div class="ant-progress-bg" style="width: 50%; height: 8px; border-radius: 100px;"></div>
<div class="ant-progress-success-bg" style="width: 10%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text">50 10</span>
</div><span title="50 10" class="ant-progress-text">50 10</span>
</div>
</div>
`;
@ -58,7 +58,7 @@ exports[`Progress render out-of-range progress 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 100%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path></svg></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg></i></span>
</div>
</div>
`;
@ -70,7 +70,7 @@ exports[`Progress render out-of-range progress with info 1`] = `
<div class="ant-progress-inner">
<div class="ant-progress-bg" style="width: 100%; height: 8px; border-radius: 100px;"></div>
</div>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path></svg></i></span>
</div><span class="ant-progress-text"><i class="anticon anticon-check-circle"><svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg></i></span>
</div>
</div>
`;

View File

@ -74,11 +74,18 @@ export default {
if (format || (progressStatus !== 'exception' && progressStatus !== 'success')) {
text = textFormatter(validProgress(percent), validProgress(successPercent))
} else if (progressStatus === 'exception') {
text = <Icon type={`cross${iconType}`} />
text = <Icon type={`close${iconType}`} theme={type === 'line' ? 'filled' : 'outlined'} />
} else if (progressStatus === 'success') {
text = <Icon type={`check${iconType}`} />
text = <Icon type={`check${iconType}`} theme={type === 'line' ? 'filled' : 'outlined'} />
}
progressInfo = <span class={`${prefixCls}-text`}>{text}</span>
progressInfo = (
<span
class={`${prefixCls}-text`}
title={typeof text === 'string' ? text : undefined}
>
{text}
</span>
)
}
if (type === 'line') {

View File

@ -22,10 +22,6 @@ export default {
radioProps.props.checked = props.value === this.radioGroupContext.stateValue
radioProps.props.disabled = props.disabled || this.radioGroupContext.disabled
}
return (
<Wave>
<Radio {...radioProps}>{this.$slots.default}</Radio>
</Wave>
)
return <Radio {...radioProps}>{this.$slots.default}</Radio>
},
}

View File

@ -26,8 +26,8 @@ const md = {
## When To Use
- Used to select a single state in multiple options.
- The difference between Select is that Radio is visible to user and can facilitate the comparison of choice, which makes there shouldn't be too many of them.
- Used to select a single state from multiple options.
- The difference from Select is that Radio is visible to the user and can facilitate the comparison of choice, which means there shouldn't be too many of them.
## Examples
`,
}

View File

@ -48,7 +48,6 @@ const Circle = {
a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`
const len = Math.PI * 2 * radius
const trailPathStyle = {
stroke: strokeColor,
strokeDasharray: `${len - gapDegree}px ${len}px`,
strokeDashoffset: `-${gapDegree / 2}px`,
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s',
@ -102,13 +101,9 @@ const Circle = {
<path
{...pathFirst}
/>
{
percent > 0 ? (
<path
{...pathSecond}
/>
) : null
}
<path
{...pathSecond}
/>
</svg>
)
},

View File

@ -30,6 +30,7 @@ const Line = {
`M ${strokeLinecap === 'round' ? center : 0},${center}
L ${strokeLinecap === 'round' ? right : 100},${center}`
const viewBoxString = `0 0 100 ${strokeWidth}`
const pathFirst = {
attrs: {
'd': pathString,