forked from github/dataease
fix(视图): 设置tab背景对内部地图文字无效
This commit is contained in:
parent
f43e08fd61
commit
9192ef96b1
@ -252,6 +252,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isCurrentEdit() {
|
isCurrentEdit() {
|
||||||
return this.isEdit && this.curComponent && this.curComponent.id === this.element.id
|
return this.isEdit && this.curComponent && this.curComponent.id === this.element.id
|
||||||
|
},
|
||||||
|
themeStyle() {
|
||||||
|
return this.element.commonBackground
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -282,17 +285,34 @@ export default {
|
|||||||
this.$store.commit('setCurActiveTabInner', null)
|
this.$store.commit('setCurActiveTabInner', null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'themeStyle.color'(value, old) {
|
||||||
|
if (value !== old) {
|
||||||
|
this.setContentThemeStyle()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'themeStyle.commonBackground.color'(value, old) {
|
||||||
|
if (value !== old) {
|
||||||
|
this.setContentThemeStyle()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
bus.$on('add-new-tab', this.addNewTab)
|
bus.$on('add-new-tab', this.addNewTab)
|
||||||
this.activeTabName = this.element.options.tabList[0].name
|
this.activeTabName = this.element.options.tabList[0].name
|
||||||
|
this.setContentThemeStyle()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off('add-new-tab', this.addNewTab)
|
bus.$off('add-new-tab', this.addNewTab)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setContentThemeStyle() {
|
||||||
|
this.element.options.tabList.forEach(tab => {
|
||||||
|
if(tab.content && tab.content.type === 'view') {
|
||||||
|
tab.content.commonBackground = this.themeStyle ? JSON.parse(JSON.stringify(this.themeStyle)) : null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
beforeHandleCommond(item, param) {
|
beforeHandleCommond(item, param) {
|
||||||
return {
|
return {
|
||||||
'command': item,
|
'command': item,
|
||||||
@ -374,6 +394,8 @@ export default {
|
|||||||
component.propValue = propValue
|
component.propValue = propValue
|
||||||
component.filters = []
|
component.filters = []
|
||||||
component.linkageFilters = []
|
component.linkageFilters = []
|
||||||
|
if(this.themeStyle)
|
||||||
|
component.commonBackground = JSON.parse(JSON.stringify(this.themeStyle))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
component.id = newComponentId
|
component.id = newComponentId
|
||||||
|
Loading…
Reference in New Issue
Block a user