fix: 修复不显示南海群岛时的小方块
This commit is contained in:
parent
05a048e5a8
commit
7fa4319bd1
@ -36,7 +36,7 @@ export const option = {
|
|||||||
{
|
{
|
||||||
name: '地图',
|
name: '地图',
|
||||||
type: 'map',
|
type: 'map',
|
||||||
map: 'chinaWithoutHainanIsLands',
|
map: 'china',
|
||||||
zoom: 1, //缩放
|
zoom: 1, //缩放
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
// 背景色
|
// 背景色
|
||||||
@ -50,7 +50,7 @@ export const option = {
|
|||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
borderColor: '#75ecaa',
|
borderColor: '#75ecaa',
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
showHainanIsLands: true // 是否显示海南群岛
|
showHainanIsLands: true // 是否显示南海群岛
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="其他">
|
<SettingItemBox name="其他">
|
||||||
<SettingItem>
|
<SettingItem>
|
||||||
<n-checkbox v-model:checked="seriesList[1].itemStyle.showHainanIsLands" size="small">显示海南群岛</n-checkbox>
|
<n-checkbox v-model:checked="seriesList[1].itemStyle.showHainanIsLands" size="small">显示南海群岛</n-checkbox>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
</CollapseItem>
|
</CollapseItem>
|
||||||
|
@ -45,7 +45,6 @@ use([
|
|||||||
])
|
])
|
||||||
|
|
||||||
registerMap('china', { geoJSON: mapJson as any, specialAreas: {} })
|
registerMap('china', { geoJSON: mapJson as any, specialAreas: {} })
|
||||||
registerMap('chinaWithoutHainanIsLands', { geoJSON: mapJsonWithoutHainanIsLands as any, specialAreas: {} })
|
|
||||||
|
|
||||||
const option = reactive({
|
const option = reactive({
|
||||||
value: mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
value: mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||||
@ -59,13 +58,10 @@ const dataSetHandle = (dataset: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapTypeHandle = (config: boolean) => {
|
const mapTypeHandle = (show: boolean) => {
|
||||||
// props.chartConfig.option.series.forEach((item: any) => {
|
show
|
||||||
// if (item.type === 'effectScatter' && dataset.point) item.data = dataset.point
|
? registerMap('china', { geoJSON: mapJson as any, specialAreas: {} })
|
||||||
// else if (item.type === 'map' && dataset.point) item.data = dataset.map
|
: registerMap('china', { geoJSON: mapJsonWithoutHainanIsLands as any, specialAreas: {} })
|
||||||
// option.value = props.chartConfig.option
|
|
||||||
// })
|
|
||||||
props.chartConfig.option.series[1].map = config ? 'china' : 'chinaWithoutHainanIsLands'
|
|
||||||
option.value = props.chartConfig.option
|
option.value = props.chartConfig.option
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user