Progress add prop success-percent
This commit is contained in:
parent
b40e2e96be
commit
9d6b35e49b
4 changed files with 33 additions and 37 deletions
|
@ -96,13 +96,13 @@
|
|||
style = {
|
||||
'stroke-dasharray': `${(this.percent / 100) * (this.len - 75)}px ${this.len}px`,
|
||||
'stroke-dashoffset': `-${75 / 2}px`,
|
||||
'transition': 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s'
|
||||
'transition': 'stroke-dashoffset .3s ease 0s, stroke-dasharray .6s ease 0s, stroke .6s, stroke-width .06s ease .6s'
|
||||
};
|
||||
} else {
|
||||
style = {
|
||||
'stroke-dasharray': `${this.len}px ${this.len}px`,
|
||||
'stroke-dashoffset': `${((100 - this.percent) / 100 * this.len)}px`,
|
||||
'transition': 'stroke-dashoffset 0.3s ease 0s, stroke 0.3s ease'
|
||||
'transition': 'stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease'
|
||||
};
|
||||
}
|
||||
return style;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue