forked from github/dataease
Merge pull request #3506 from dataease/pr@dev@fix_panel-backgroup
fix(仪表板): 修复新画布编辑状态仪表板背景未生效问题
This commit is contained in:
commit
b52bbbe493
@ -27,7 +27,7 @@
|
||||
v-else-if="componentDataShow && componentDataShow.length===0"
|
||||
class="custom-position"
|
||||
>
|
||||
{{ $t('panel.panelNull') }}
|
||||
<span v-show="isMainCanvas()">{{ $t('panel.panelNull') }}</span>
|
||||
</el-row>
|
||||
<div
|
||||
v-else
|
||||
@ -214,7 +214,7 @@ export default {
|
||||
let style = {
|
||||
width: '100%'
|
||||
}
|
||||
if (this.canvasStyleData.openCommonStyle) {
|
||||
if (this.canvasStyleData.openCommonStyle && this.isMainCanvas()) {
|
||||
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||
style = {
|
||||
background: `url(${imgUrlTrans(this.canvasStyleData.panel.imageUrl)}) no-repeat`,
|
||||
@ -308,6 +308,9 @@ export default {
|
||||
bus.$off('trigger-reset-button', this.triggerResetButton)
|
||||
},
|
||||
methods: {
|
||||
isMainCanvas() {
|
||||
return this.canvasId === 'canvas-main'
|
||||
},
|
||||
triggerResetButton() {
|
||||
this.triggerSearchButton(true)
|
||||
},
|
||||
@ -439,7 +442,7 @@ export default {
|
||||
} else {
|
||||
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比
|
||||
}
|
||||
if (this.canvasId === 'canvas-main') {
|
||||
if (this.isMainCanvas()) {
|
||||
this.$store.commit('setPreviewCanvasScale', { scaleWidth: (this.scaleWidth / 100), scaleHeight: (this.scaleHeight / 100) })
|
||||
}
|
||||
this.handleScaleChange()
|
||||
|
@ -174,6 +174,7 @@
|
||||
v-if="!previewVisible&&!mobileLayoutStatus"
|
||||
ref="canvasMainRef"
|
||||
class="canvas_main_content"
|
||||
:style="customCanvasStyle"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:component-data="mainCanvasComponentData"
|
||||
:canvas-id="canvasId"
|
||||
|
Loading…
Reference in New Issue
Block a user