NEZ-912 fix: 修复null值导致chart-tooltip报错的问题

This commit is contained in:
chenjinsong
2021-08-18 17:09:46 +08:00
parent 787d81c176
commit afdafa3aee

View File

@@ -338,7 +338,7 @@ export default new Vue({
}
},
countDecimals (value) {
if (Math.floor(value) !== value) {
if ((value || value === 0) && Math.floor(value) !== value) {
const arr = value.toString().split('.')
if (Math.abs(arr[0] > 0) || arr.length < 2) {
return 2