Merge pull request #1720 from dataease/pr@dev@fix_panel-edit

fix: 仪表板背景由颜色切换为图片,未加图片时背景颜色依然存在问题
This commit is contained in:
王嘉豪 2022-01-28 14:26:00 +08:00 committed by GitHub
commit 499d1763f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -366,7 +366,7 @@ export default {
}
if (this.canvasStyleData.openCommonStyle) {
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
if (this.canvasStyleData.panel.backgroundType === 'image' && typeof (this.canvasStyleData.panel.imageUrl) === 'string') {
style = {
background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
...style