Commit 39100544 authored by xulili's avatar xulili

map 飘

parent f0cd73ba
...@@ -122,19 +122,18 @@ export default { ...@@ -122,19 +122,18 @@ export default {
geo: { geo: {
map: _this.parentInfo.length === 1 ? "china" : "map", map: _this.parentInfo.length === 1 ? "china" : "map",
roam: true, //是否开启平游或缩放 roam: true, //是否开启平游或缩放
scaleLimit: { // scaleLimit: {
//滚轮缩放的极限控制 // //滚轮缩放的极限控制
min: 1, // min: 1,
// max: 2, // // max: 2,
}, // },
zoom: 1.1,
zoom: 1.3,
top: 51, top: 51,
label: { label: {
normal: { normal: {
show: !0, show: !0,
fontSize: "12", fontSize: "12",
color: "#fff", color:'#fff',
formatter: (p) => { formatter: (p) => {
switch (p.name) { switch (p.name) {
case "内蒙古自治区": case "内蒙古自治区":
...@@ -204,7 +203,7 @@ export default { ...@@ -204,7 +203,7 @@ export default {
], ],
}; };
let echartsDiv = this.$echarts.init(document.getElementById("mapDiv")); let echartsDiv = this.$echarts.init(document.getElementById("mapDiv"));
echartsDiv.setOption(option); echartsDiv.setOption(option,true);
echartsDiv.on("click", _this.echartsMapClick); echartsDiv.on("click", _this.echartsMapClick);
}, },
handleBack() { handleBack() {
...@@ -218,6 +217,7 @@ export default { ...@@ -218,6 +217,7 @@ export default {
if (!params.data) { if (!params.data) {
return; return;
} }
debugger
if(params.data.level === "district"){ if(params.data.level === "district"){
return false return false
} }
......
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