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