refactor(仪表板): 调整矩阵格子尺寸精度,防止组件宽度过大造成细微的偏移
This commit is contained in:
parent
b08543e3e2
commit
1fea0cc24f
@ -1061,8 +1061,8 @@ const clearInfoBox = e => {
|
||||
const cellInit = () => {
|
||||
// 此处向下取整 保留1位小数,why: 矩阵模式计算 x,y时 会使用 style.left/cellWidth style.top/cellWidth
|
||||
// 当初始状态细微的差距(主要是减少)都会导致 x,y 减少一个矩阵大小造成偏移,
|
||||
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 = () => {
|
||||
|
||||
@ -469,6 +469,7 @@ const autoHeightStyle = computed(() => {
|
||||
}
|
||||
.table-page-info {
|
||||
position: relative;
|
||||
padding-left: 4px;
|
||||
margin: 4px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user