refactor: 优化仪表板样式缩放比例,组件内边距缩放比例

This commit is contained in:
wangjiahao 2024-01-22 15:02:27 +08:00
parent 0e07afe3aa
commit dbabb1fe64
2 changed files with 5 additions and 2 deletions

View File

@ -133,7 +133,10 @@ const componentBackgroundStyle = computed(() => {
innerPadding, innerPadding,
borderRadius borderRadius
} = config.value.commonBackground } = config.value.commonBackground
const style = { padding: innerPadding + 'px', borderRadius: borderRadius + 'px' } const style = {
padding: innerPadding * deepScale.value + 'px',
borderRadius: borderRadius + 'px'
}
let colorRGBA = '' let colorRGBA = ''
if (backgroundColorSelect && backgroundColor) { if (backgroundColorSelect && backgroundColor) {
colorRGBA = backgroundColor colorRGBA = backgroundColor

View File

@ -141,7 +141,7 @@ const restore = () => {
cellWidth.value = canvasWidth / pcMatrixCount.value.x cellWidth.value = canvasWidth / pcMatrixCount.value.x
cellHeight.value = canvasHeight / pcMatrixCount.value.y cellHeight.value = canvasHeight / pcMatrixCount.value.y
scaleWidth.value = isMainCanvas(canvasId.value) scaleWidth.value = isMainCanvas(canvasId.value)
? scaleWidth.value * 1.5 ? scaleWidth.value * 1.2
: outerScale.value * 100 : outerScale.value * 100
} else { } else {
changeRefComponentsSizeWithScale( changeRefComponentsSizeWithScale(