mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 08:12:49 +08:00
commit
674131a0ae
@ -49,7 +49,8 @@ export const option = {
|
||||
},
|
||||
color: '#ffffff',
|
||||
borderColor: '#75ecaa',
|
||||
borderWidth: 1
|
||||
borderWidth: 1,
|
||||
showHainanIsLands: true // 是否显示南海群岛
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
|
@ -43,6 +43,11 @@
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="其他">
|
||||
<SettingItem>
|
||||
<n-checkbox v-model:checked="seriesList[1].itemStyle.showHainanIsLands" size="small">显示南海群岛</n-checkbox>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
</CollapseItem>
|
||||
<CollapseItem name="标记" :expanded="true">
|
||||
<SettingItemBox name="样式">
|
||||
|
@ -14,8 +14,8 @@ import { useChartDataFetch } from '@/hooks'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import dataJson from './data.json'
|
||||
import mapJson from './map.json'
|
||||
import mapJsonWithoutHainanIsLands from './mapWithoutHainanIsLands.json'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, GeoComponent } from 'echarts/components'
|
||||
|
||||
const props = defineProps({
|
||||
@ -58,6 +58,24 @@ const dataSetHandle = (dataset: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
const mapTypeHandle = (show: boolean) => {
|
||||
show
|
||||
? registerMap('china', { geoJSON: mapJson as any, specialAreas: {} })
|
||||
: registerMap('china', { geoJSON: mapJsonWithoutHainanIsLands as any, specialAreas: {} })
|
||||
option.value = props.chartConfig.option
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.series[1].itemStyle.showHainanIsLands,
|
||||
newData => {
|
||||
mapTypeHandle(newData)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
newData => {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user