From c1bca77b3faa913091058ebaa0417884c58619f9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Sat, 14 Sep 2024 15:41:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/packages/tools/AiEchartMap.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ui/packages/tools/AiEchartMap.vue b/ui/packages/tools/AiEchartMap.vue index 507d2580..78a6ad97 100644 --- a/ui/packages/tools/AiEchartMap.vue +++ b/ui/packages/tools/AiEchartMap.vue @@ -73,9 +73,11 @@ export default { }) this.loadLibs().then(() => { const geoJson = this.geo - const boundary = geoJson.features?.length > 1 ? turf.union(geoJson) : geoJson + const boundary = geoJson.features?.length > 1 ? turf.union(geoJson) : this.$copy(geoJson.features[0]) + boundary.properties = {...boundary.properties} boundary.properties.name = "boundary" geoJson.features.unshift(boundary) + console.log(geoJson) echarts.registerMap('customMap', geoJson) const option = { geo: { @@ -86,12 +88,8 @@ export default { regions: [ { name: "boundary", itemStyle: { - areaColor: { - type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ - {offset: 0, color: 'rgba(61,127,255,0.35)'}, - {offset: 1, color: '#09E2F8'}, - ] - }, shadowColor: "#1A80BF", shadowOffsetY: 2 + areaColor: "rgba(2,188,255,0.16)", shadowColor: "#02F0FF21", shadowOffsetY: 20, shadowBlur: 20, + borderColor: '#02F0FF', borderWidth: 3 }, label: {show: false} } ],