Merge pull request #8354 from dataease/pr@dev@fix_mobile-background

fix(移动端): 修复移动端成功上传背景图片,但下次进行编辑的时候背景图片不显示问题 #8239
This commit is contained in:
王嘉豪 2024-03-05 18:16:21 +08:00 committed by GitHub
commit 295c42fd18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 3 deletions

View File

@ -655,7 +655,7 @@ export default {
openMobileLayout(switchVal) { openMobileLayout(switchVal) {
if (switchVal) { if (switchVal) {
this.$store.commit('openMobileLayout') this.$store.commit('openMobileLayout')
bus.$emit('mobile-status-change', 'openMobileLayout', { componentData: this.componentData, panelInfo: this.panelInfo }) bus.$emit('mobile-status-change', 'openMobileLayout', { componentData: this.componentData, panelInfo: this.panelInfo, canvasStyleData: this.canvasStyleData })
} else { } else {
this.mobileLayoutSave() this.mobileLayoutSave()
} }

View File

@ -24,7 +24,7 @@ import {
} from '@/components/canvas/utils/utils' } from '@/components/canvas/utils/utils'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { hexColorToRGBA } from '@/views/chart/chart/util' import { hexColorToRGBA } from '@/views/chart/chart/util'
import store from "@/store"; import store from '@/store'
export default { export default {
components: { DeCanvas, CanvasOptBar }, components: { DeCanvas, CanvasOptBar },
data() { data() {
@ -90,6 +90,7 @@ export default {
if (event.data.type === 'openMobileLayout') { if (event.data.type === 'openMobileLayout') {
this.$store.commit('setComponentData', event.data.value.componentData) this.$store.commit('setComponentData', event.data.value.componentData)
this.$store.commit('setCanvasStyle', event.data.value.canvasStyleData)
this.$store.dispatch('panel/setPanelInfo', event.data.value.panelInfo) this.$store.dispatch('panel/setPanelInfo', event.data.value.panelInfo)
this.$store.commit('openMobileLayout') this.$store.commit('openMobileLayout')
} }

View File

@ -136,6 +136,7 @@ export default {
height: calc(100% - 40px); height: calc(100% - 40px);
float: left; float: left;
overflow-y: auto; overflow-y: auto;
background-size: 100% 100% !important;
} }
.component-custom { .component-custom {

View File

@ -888,7 +888,7 @@ export default {
methods: { methods: {
handleLoad() { handleLoad() {
this.mobileLoading = false this.mobileLoading = false
this.mobileStatusChange('openMobileLayout', { componentData: this.componentData, panelInfo: this.panelInfo }) this.mobileStatusChange('openMobileLayout', { componentData: this.componentData, panelInfo: this.panelInfo, canvasStyleData: this.canvasStyleData })
}, },
deleteComponentWithId(id) { deleteComponentWithId(id) {
for (let index = 0; index < this.pcComponentData.length; index++) { for (let index = 0; index < this.pcComponentData.length; index++) {