NEZ-1748 fix: Chart 修改,改变内容后,点击 cancel 没有触发 未保存提示 效果

This commit is contained in:
zhangyu
2022-03-29 15:21:28 +08:00
parent 97eca56a9c
commit 745c7c6c30
4 changed files with 92 additions and 20 deletions

View File

@@ -397,6 +397,9 @@ function asciiCompute2 (num, ascii, units, dot = 2, unitIndex = 0) {
* unit:设置的单位
* */
function timeCompute (value, unit, dot = 0) {
if (isNaN(value)) {
return `0 ${unit}`
}
if (unit == 'year') {
return `${value.toFixed(dot)} ${unit}`
}