Compatible with a calculation result of 0
This commit is contained in:
parent
e533c55536
commit
a7aa6278c8
|
@ -113,7 +113,7 @@ export default {
|
||||||
|
|
||||||
const sum = value.reduce((all, v) => all + v, 0)
|
const sum = value.reduce((all, v) => all + v, 0)
|
||||||
|
|
||||||
const percent = parseInt(value[activeIndex] / sum * 100)
|
const percent = parseInt(value[activeIndex] / sum * 100) || 0
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: '{nt}%',
|
content: '{nt}%',
|
||||||
|
|
Loading…
Reference in New Issue