提交 d1d156c4 authored 作者: wangjiahao's avatar wangjiahao

refactor: 移动端加入新组件默认放到最底端

上级 4f05002a
...@@ -148,7 +148,11 @@ export default { ...@@ -148,7 +148,11 @@ export default {
height: '100%' height: '100%'
} }
} else { } else {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) if (this.terminal === 'pc') {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
} else {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate', 'fontSize'])
}
} }
}, },
......
...@@ -38,11 +38,11 @@ export default { ...@@ -38,11 +38,11 @@ export default {
this.element.style.width = 1600 this.element.style.width = 1600
this.element.style.height = 300 this.element.style.height = 300
this.element.style.left = 0 this.element.style.left = 0
this.element.style.top = 0 this.element.style.top = 6000
this.element.sizex = 6 this.element.sizex = 6
this.element.sizey = 4 this.element.sizey = 4
this.element.x = 1 this.element.x = 1
this.element.y = 1 this.element.y = 200
this.element.auxiliaryMatrix = true this.element.auxiliaryMatrix = true
this.$store.commit('addComponent', { component: this.element }) this.$store.commit('addComponent', { component: this.element })
} else { } else {
......
...@@ -149,11 +149,13 @@ const data = { ...@@ -149,11 +149,13 @@ const data = {
} }
}, },
setShapeStyle({ curComponent, canvasStyleData, curCanvasScale }, { top, left, width, height, rotate }) { setShapeStyle({ curComponent, canvasStyleData, curCanvasScale }, { top, left, width, height, rotate }) {
if (top || top === 0) curComponent.style.top = (top / curCanvasScale.scalePointHeight) + 0.0000001 if (curComponent) {
if (left || left === 0) curComponent.style.left = (left / curCanvasScale.scalePointWidth) + 0.0000001 if (top || top === 0) curComponent.style.top = (top / curCanvasScale.scalePointHeight) + 0.0000001
if (width || width === 0) curComponent.style.width = (width / curCanvasScale.scalePointWidth + 0.0000001) if (left || left === 0) curComponent.style.left = (left / curCanvasScale.scalePointWidth) + 0.0000001
if (height || height === 0) curComponent.style.height = (height / curCanvasScale.scalePointHeight) + 0.0000001 if (width || width === 0) curComponent.style.width = (width / curCanvasScale.scalePointWidth + 0.0000001)
if (rotate || rotate === 0) curComponent.style.rotate = rotate if (height || height === 0) curComponent.style.height = (height / curCanvasScale.scalePointHeight) + 0.0000001
if (rotate || rotate === 0) curComponent.style.rotate = rotate
}
}, },
setShapeSingleStyle({ curComponent }, { key, value }) { setShapeSingleStyle({ curComponent }, { key, value }) {
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
return { return {
padding: '5px', padding: '5px',
display: 'inline-block', display: 'inline-block',
width: '33.3333%' width: '33%'
} }
}, },
...mapState([ ...mapState([
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论