feat: panel布局、单值图、line图等

This commit is contained in:
chenjinsong
2021-06-20 13:31:55 +08:00
parent dd94703db0
commit 5a02d866b8
25 changed files with 856 additions and 52 deletions

View File

@@ -369,3 +369,10 @@ export function isEqual (o1, o2) {
}
return isEqualForInner(o1, o2)
}
/* 计算文本的实际width而不是length */
export function calculateTextWidth (text, fontSize = 14) {
const html = document.querySelector(`.temp-dom--${fontSize}`)
html.innerText = text
return html.offsetWidth
}