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',
|
color: '#ffffff',
|
||||||
borderColor: '#75ecaa',
|
borderColor: '#75ecaa',
|
||||||
borderWidth: 1
|
borderWidth: 1,
|
||||||
|
showHainanIsLands: true // 是否显示南海群岛
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -43,6 +43,11 @@
|
|||||||
></n-input-number>
|
></n-input-number>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="其他">
|
||||||
|
<SettingItem>
|
||||||
|
<n-checkbox v-model:checked="seriesList[1].itemStyle.showHainanIsLands" size="small">显示南海群岛</n-checkbox>
|
||||||
|
</SettingItem>
|
||||||
|
</SettingItemBox>
|
||||||
</CollapseItem>
|
</CollapseItem>
|
||||||
<CollapseItem name="标记" :expanded="true">
|
<CollapseItem name="标记" :expanded="true">
|
||||||
<SettingItemBox name="样式">
|
<SettingItemBox name="样式">
|
||||||
|
@ -14,8 +14,8 @@ import { useChartDataFetch } from '@/hooks'
|
|||||||
import { mergeTheme } from '@/packages/public/chart'
|
import { mergeTheme } from '@/packages/public/chart'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { isPreview } from '@/utils'
|
import { isPreview } from '@/utils'
|
||||||
import dataJson from './data.json'
|
|
||||||
import mapJson from './map.json'
|
import mapJson from './map.json'
|
||||||
|
import mapJsonWithoutHainanIsLands from './mapWithoutHainanIsLands.json'
|
||||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, GeoComponent } from 'echarts/components'
|
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, GeoComponent } from 'echarts/components'
|
||||||
|
|
||||||
const props = defineProps({
|
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(
|
watch(
|
||||||
() => props.chartConfig.option.dataset,
|
() => props.chartConfig.option.dataset,
|
||||||
newData => {
|
newData => {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user