Merge pull request #9184 from dataease/pr@dev-v2@refactor_matrix

refactor(仪表板): 调整矩阵格子尺寸精度,防止组件宽度过大造成细微的偏移
This commit is contained in:
王嘉豪
2024-04-18 11:38:56 +08:00
committed by GitHub
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;