Merge pull request #1496 from dataease/pr@dev@refactor_panel-mb
refactor: 移动端加入新组件默认放到最底端
This commit is contained in:
commit
e88d47d1c8
@ -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 {
|
|||||||
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 = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
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 {
|
|||||||
return {
|
return {
|
||||||
padding: '5px',
|
padding: '5px',
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
width: '33.3333%'
|
width: '33%'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user