forked from github/dataease
fix(仪表板): 移动端制作-模型在画布区,位置居中显示
This commit is contained in:
parent
3c8e90bfb5
commit
d2d42f88e4
@ -132,13 +132,14 @@ const loadCanvasData = () => {
|
|||||||
const setMobileStyle = debounce(() => {
|
const setMobileStyle = debounce(() => {
|
||||||
const height = window.innerHeight
|
const height = window.innerHeight
|
||||||
if (height > 1032) {
|
if (height > 1032) {
|
||||||
mobileStyle.value = {}
|
mobileStyle.value = {
|
||||||
|
transform: 'translateY(-50%)'
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const scale = height / 1032
|
const scale = height / 1032
|
||||||
mobileStyle.value = {
|
mobileStyle.value = {
|
||||||
top: `${60 + scale * 40}px`,
|
transform: `scale(${scale}) translateY(-50%)`,
|
||||||
transform: `scale(${scale})`,
|
|
||||||
transformOrigin: '0 0'
|
transformOrigin: '0 0'
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -337,7 +338,7 @@ const save = () => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-size: 100% 100% !important;
|
background-size: 100% 100% !important;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 80px;
|
top: calc(50% + 32px);
|
||||||
left: calc(50% - 419px);
|
left: calc(50% - 419px);
|
||||||
background-image: url(../../assets/img/mobile-bg-pc.png);
|
background-image: url(../../assets/img/mobile-bg-pc.png);
|
||||||
padding: 0 22px;
|
padding: 0 22px;
|
||||||
|
Loading…
Reference in New Issue
Block a user