mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 20:42:55 +08:00
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"
|
v-else-if="componentDataShow && componentDataShow.length===0"
|
||||||
class="custom-position"
|
class="custom-position"
|
||||||
>
|
>
|
||||||
{{ $t('panel.panelNull') }}
|
<span v-show="isMainCanvas()">{{ $t('panel.panelNull') }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
@ -214,7 +214,7 @@ export default {
|
|||||||
let style = {
|
let style = {
|
||||||
width: '100%'
|
width: '100%'
|
||||||
}
|
}
|
||||||
if (this.canvasStyleData.openCommonStyle) {
|
if (this.canvasStyleData.openCommonStyle && this.isMainCanvas()) {
|
||||||
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
background: `url(${imgUrlTrans(this.canvasStyleData.panel.imageUrl)}) no-repeat`,
|
background: `url(${imgUrlTrans(this.canvasStyleData.panel.imageUrl)}) no-repeat`,
|
||||||
@ -308,6 +308,9 @@ export default {
|
|||||||
bus.$off('trigger-reset-button', this.triggerResetButton)
|
bus.$off('trigger-reset-button', this.triggerResetButton)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isMainCanvas() {
|
||||||
|
return this.canvasId === 'canvas-main'
|
||||||
|
},
|
||||||
triggerResetButton() {
|
triggerResetButton() {
|
||||||
this.triggerSearchButton(true)
|
this.triggerSearchButton(true)
|
||||||
},
|
},
|
||||||
@ -439,7 +442,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比
|
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.$store.commit('setPreviewCanvasScale', { scaleWidth: (this.scaleWidth / 100), scaleHeight: (this.scaleHeight / 100) })
|
||||||
}
|
}
|
||||||
this.handleScaleChange()
|
this.handleScaleChange()
|
||||||
|
@ -174,6 +174,7 @@
|
|||||||
v-if="!previewVisible&&!mobileLayoutStatus"
|
v-if="!previewVisible&&!mobileLayoutStatus"
|
||||||
ref="canvasMainRef"
|
ref="canvasMainRef"
|
||||||
class="canvas_main_content"
|
class="canvas_main_content"
|
||||||
|
:style="customCanvasStyle"
|
||||||
:canvas-style-data="canvasStyleData"
|
:canvas-style-data="canvasStyleData"
|
||||||
:component-data="mainCanvasComponentData"
|
:component-data="mainCanvasComponentData"
|
||||||
:canvas-id="canvasId"
|
:canvas-id="canvasId"
|
||||||
|
Loading…
Reference in New Issue
Block a user