大屏设计页面更换json编辑器

This commit is contained in:
yanran200730
2021-12-28 09:45:37 +08:00
parent 0014d989a0
commit bba329a41c
3 changed files with 31 additions and 14 deletions

View File

@@ -3,10 +3,10 @@
<div v-if="!component">
<div
:style="{
width: item.width + 'px',
height: item.height + 'px',
left: item.left + 'px',
top: item.top + 'px',
width: item.width * scale + 'px',
height: item.height * scale + 'px',
left: item.left * scale + 'px',
top: item.top * scale + 'px',
position: 'absolute',
zIndex: item.zIndex
}"
@@ -57,12 +57,26 @@
backgroundImage: []
},
componentList: [],
scale: 1,
meta: {}
}
},
created() {
this.getInfo(this.id)
// this.scale = document.body.clientWidth / 1920
},
mounted () {
this.$nextTick(() => {
const transform = document.querySelector('#dv-full-screen-container').style.transform
const scale = transform.replace('scale', '').replace('(', '').replace(')', '')
if (scale == 1) {
this.scale = document.body.clientWidth / 1920
}
})
},
methods: {