Merge pull request #7915 from dataease/pr@dev@fix_panel-console
fix(仪表板): 修复历史主题在编辑界面移动端设计时前端console报错问题 #7783
This commit is contained in:
commit
fd20c291ab
@ -107,6 +107,7 @@ import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
|||||||
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
||||||
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
import { MOBILE_SETTING } from '@/views/panel/panel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MobileBackgroundSelector',
|
name: 'MobileBackgroundSelector',
|
||||||
@ -117,7 +118,7 @@ export default {
|
|||||||
dialogImageUrl: '',
|
dialogImageUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
uploadDisabled: false,
|
uploadDisabled: false,
|
||||||
mobileSetting: null,
|
mobileSetting: deepCopy(MOBILE_SETTING),
|
||||||
predefineColors: COLOR_PANEL
|
predefineColors: COLOR_PANEL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -128,10 +129,14 @@ export default {
|
|||||||
// deep监听panel 如果改变 提交到 store
|
// deep监听panel 如果改变 提交到 store
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 初始化赋值
|
if (this.canvasStyleData.panel.mobileSetting) {
|
||||||
this.mobileSetting = this.canvasStyleData.panel.mobileSetting
|
// 初始化赋值
|
||||||
if (this.mobileSetting.imageUrl && typeof (this.mobileSetting.imageUrl) === 'string') {
|
this.mobileSetting = this.canvasStyleData.panel.mobileSetting
|
||||||
this.fileList.push({ url: imgUrlTrans(this.mobileSetting.imageUrl) })
|
if (this.mobileSetting.imageUrl && typeof (this.mobileSetting.imageUrl) === 'string') {
|
||||||
|
this.fileList.push({ url: imgUrlTrans(this.mobileSetting.imageUrl) })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.canvasStyleData.panel['mobileSetting'] = this.mobileSetting
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user