fix: 仪表板预览时右侧边框间隔过大问题

This commit is contained in:
wangjiahao 2021-12-08 15:28:54 +08:00
parent c98f20a0e9
commit 11515a5aeb
2 changed files with 6 additions and 8 deletions

View File

@ -213,8 +213,8 @@ export default {
restore() {
const canvasHeight = document.getElementById('canvasInfoMain').offsetHeight
const canvasWidth = document.getElementById('canvasInfoMain').offsetWidth
this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)//
this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)//
this.scaleWidth = (canvasWidth) * 100 / this.canvasStyleData.width //
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height//
this.handleScaleChange()
},
resetID(data) {
@ -226,7 +226,7 @@ export default {
return data
},
format(value, scale) {
return value * parseInt(scale) / 100
return value * scale / 100
},
handleScaleChange() {
if (this.componentData) {
@ -296,10 +296,6 @@ export default {
color: #9ea6b2;
}
.gap_class {
padding: 5px;
}
.dialog-css > > > .el-dialog__title {
font-size: 14px;
}

View File

@ -321,7 +321,9 @@ export default {
return !this.linkageSettingStatus && !this.mobileLayoutStatus
},
showAttr() {
if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) {
if (this.mobileLayoutStatus) {
return false
} else if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) {
//
if (this.curComponent.type === 'custom' && !this.curComponent.options.attrs.title) {
return false