refactor(仪表板): 调整矩阵格子尺寸精度,防止组件宽度过大造成细微的偏移

This commit is contained in:
wangjiahao 2024-04-18 11:38:17 +08:00
parent b08543e3e2
commit 1fea0cc24f
2 changed files with 3 additions and 2 deletions

View File

@ -1061,8 +1061,8 @@ const clearInfoBox = e => {
const cellInit = () => {
// 1,why: x,y 使 style.left/cellWidth style.top/cellWidth
// () xy ,
cellWidth.value = Math.floor((baseWidth.value + baseMarginLeft.value) * 10) / 10
cellHeight.value = Math.floor((baseHeight.value + baseMarginTop.value) * 10) / 10
cellWidth.value = Math.floor((baseWidth.value + baseMarginLeft.value) * 1000) / 1000
cellHeight.value = Math.floor((baseHeight.value + baseMarginTop.value) * 1000) / 1000
}
const canvasSizeInit = () => {

View File

@ -469,6 +469,7 @@ const autoHeightStyle = computed(() => {
}
.table-page-info {
position: relative;
padding-left: 4px;
margin: 4px;
height: 20px;
display: flex;