大屏设计页面更换json编辑器
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user