Commit 71a1be2319f78f9253757d606a0cf4dcc57a46b8
1 parent
f2e6d56f
feat(src/packages): 图表3d地图增加loading效果
Showing
1 changed file
with
8 additions
and
1 deletions
| 1 | 1 | <template> |
| 2 | 2 | <!-- 原生方式,没有使用vue-echarts --> |
| 3 | - <div :style="`width:${w}px;height:${h}px;`" ref="map3DRef"></div> | |
| 3 | + <n-space vertical> | |
| 4 | + <n-spin :show="show"> | |
| 5 | + <div :style="`width:${w}px;height:${h}px;`" ref="map3DRef"></div> | |
| 6 | + </n-spin> | |
| 7 | + </n-space> | |
| 4 | 8 | </template> |
| 5 | 9 | |
| 6 | 10 | <script setup lang="ts"> |
| ... | ... | @@ -26,6 +30,8 @@ const { w, h } = toRefs(props.chartConfig.attr) |
| 26 | 30 | |
| 27 | 31 | const map3DRef = ref() |
| 28 | 32 | |
| 33 | +const show = ref(true) | |
| 34 | + | |
| 29 | 35 | const chartInstance = ref() |
| 30 | 36 | |
| 31 | 37 | const toolBoxOption = ref({ |
| ... | ... | @@ -130,6 +136,7 @@ const getGeojson = (regionId: any) => { |
| 130 | 136 | const geoJsonFile = JSON.parse(geoJson) |
| 131 | 137 | saveGeojson.value = geoJsonFile |
| 132 | 138 | registerMap(level === areaEnum.COUNTRY ? name : code, { geoJSON: geoJsonFile as any, specialAreas: {} }) |
| 139 | + show.value = false | |
| 133 | 140 | resolve(true) |
| 134 | 141 | }) |
| 135 | 142 | }) | ... | ... |