forked from github/dataease
refactor: 移动端加入新组件默认放到最底端
This commit is contained in:
parent
4f05002a23
commit
d1d156c4dd
@ -148,7 +148,11 @@ export default {
|
||||
height: '100%'
|
||||
}
|
||||
} 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 {
|
||||
this.element.style.width = 1600
|
||||
this.element.style.height = 300
|
||||
this.element.style.left = 0
|
||||
this.element.style.top = 0
|
||||
this.element.style.top = 6000
|
||||
this.element.sizex = 6
|
||||
this.element.sizey = 4
|
||||
this.element.x = 1
|
||||
this.element.y = 1
|
||||
this.element.y = 200
|
||||
this.element.auxiliaryMatrix = true
|
||||
this.$store.commit('addComponent', { component: this.element })
|
||||
} else {
|
||||
|
@ -149,11 +149,13 @@ const data = {
|
||||
}
|
||||
},
|
||||
setShapeStyle({ curComponent, canvasStyleData, curCanvasScale }, { top, left, width, height, rotate }) {
|
||||
if (top || top === 0) curComponent.style.top = (top / curCanvasScale.scalePointHeight) + 0.0000001
|
||||
if (left || left === 0) curComponent.style.left = (left / curCanvasScale.scalePointWidth) + 0.0000001
|
||||
if (width || width === 0) curComponent.style.width = (width / curCanvasScale.scalePointWidth + 0.0000001)
|
||||
if (height || height === 0) curComponent.style.height = (height / curCanvasScale.scalePointHeight) + 0.0000001
|
||||
if (rotate || rotate === 0) curComponent.style.rotate = rotate
|
||||
if (curComponent) {
|
||||
if (top || top === 0) curComponent.style.top = (top / curCanvasScale.scalePointHeight) + 0.0000001
|
||||
if (left || left === 0) curComponent.style.left = (left / curCanvasScale.scalePointWidth) + 0.0000001
|
||||
if (width || width === 0) curComponent.style.width = (width / curCanvasScale.scalePointWidth + 0.0000001)
|
||||
if (height || height === 0) curComponent.style.height = (height / curCanvasScale.scalePointHeight) + 0.0000001
|
||||
if (rotate || rotate === 0) curComponent.style.rotate = rotate
|
||||
}
|
||||
},
|
||||
|
||||
setShapeSingleStyle({ curComponent }, { key, value }) {
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
return {
|
||||
padding: '5px',
|
||||
display: 'inline-block',
|
||||
width: '33.3333%'
|
||||
width: '33%'
|
||||
}
|
||||
},
|
||||
...mapState([
|
||||
|
Loading…
Reference in New Issue
Block a user