forked from github/dataease
Merge pull request #3024 from dataease/pr@dev@fix_map_init_style
fix(视图-地图): 深色主题新建地图缩放按钮依然是浅色
This commit is contained in:
commit
72d1c316e3
@ -167,6 +167,9 @@ export default {
|
||||
destroyed() {
|
||||
this.myChart.dispose()
|
||||
},
|
||||
created() {
|
||||
this.loadThemeStyle()
|
||||
},
|
||||
methods: {
|
||||
reDrawView() {
|
||||
this.myChart.dispatchAction({ type: 'unselect', seriesIndex: this.linkageActiveParam.seriesIndex, name: this.linkageActiveParam.name })
|
||||
@ -213,6 +216,21 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
loadThemeStyle() {
|
||||
let themeStyle = null
|
||||
if (this.themeStyle) {
|
||||
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
|
||||
if (themeStyle && themeStyle.backgroundColorSelect) {
|
||||
const panelColor = themeStyle.color
|
||||
if (panelColor !== '#FFFFFF') {
|
||||
const reverseValue = reverseColor(panelColor)
|
||||
this.buttonTextColor = reverseValue
|
||||
} else {
|
||||
this.buttonTextColor = null
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
drawEcharts(activeParam) {
|
||||
const chart = this.chart
|
||||
let chart_option = {}
|
||||
|
@ -215,16 +215,17 @@ export default {
|
||||
})
|
||||
}
|
||||
const cCode = this.currentAreaCode
|
||||
if(!cCode) return
|
||||
if (this.$store.getters.geoMap[cCode]) {
|
||||
const json = this.$store.getters.geoMap[cCode]
|
||||
innerCallBack(json, cCode)
|
||||
json && innerCallBack(json, cCode)
|
||||
} else {
|
||||
geoJson(cCode).then(res => {
|
||||
this.$store.dispatch('map/setGeo', {
|
||||
key: cCode,
|
||||
value: res
|
||||
}).then(() => {
|
||||
innerCallBack(res, cCode)
|
||||
res && innerCallBack(res, cCode)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user