Commit b0836c78 authored by XXM's avatar XXM

地图数据

parent ffff6e9b
......@@ -6,6 +6,7 @@
<script>
import axios from 'axios'
import * as echarts from 'echarts'
import china from "@/assets/json/china.json";
let myChart= null
export default {
props: {
......@@ -26,9 +27,7 @@ export default {
}
},
created(){
axios.get('/static/json/china.json').then((chinaJson)=>{
echarts.registerMap('china', chinaJson.data);
})
echarts.registerMap('china', china);
},
watch:{
datas: function(obj) {
......@@ -53,7 +52,7 @@ export default {
},
series: [
{
name: '中国',
name: 'china',
type: 'map',
map: 'china',
label: {
......@@ -64,7 +63,6 @@ export default {
]
}
// axios.get('https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json').then((chinaJson)=>{
// console.log(chinaJson.data)
// echarts.registerMap('china', chinaJson.data);
// myChart.setOption(option)
// })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment