CN-647 fix: 图表接口对接

This commit is contained in:
chenjinsong
2022-08-09 21:19:21 +08:00
parent 0c53dc11e3
commit e6e6ccdabd
7 changed files with 171 additions and 400 deletions

View File

@@ -754,3 +754,11 @@ export function scrollToTop (dom, toTop, duration, direction) {
}
window.requestAnimationFrame(step)
}
export function getChainRatio (current, prev) {
if (prev === 0) {
return '-'
} else {
return (current - prev) / prev
}
}