首页地图
This commit is contained in:
@ -42,8 +42,8 @@
|
||||
|
||||
<script setup>
|
||||
import { defineComponent, getCurrentInstance, onMounted, reactive } from "vue";
|
||||
import echarts from "echarts";
|
||||
import { demand } from "@/api/website/home/index";
|
||||
import * as echarts from "echarts";
|
||||
// import { demand } from "@/api/website/home/index";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = shallowRef(true);
|
||||
@ -200,13 +200,14 @@ const state = reactive({
|
||||
|
||||
onMounted(() => {
|
||||
// 数据接口
|
||||
demand().then((res) => {
|
||||
if (200 == res.code) {
|
||||
treeData = res.data;
|
||||
snapTree.value = res.data;
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
const res = { code: 200, message: "ok", data: {} };
|
||||
// demand().then((res) => {
|
||||
// if (200 == res.code) {
|
||||
treeData = res.data;
|
||||
snapTree.value = res.data;
|
||||
loading.value = false;
|
||||
// }
|
||||
// });
|
||||
// let echartsDomList = document.querySelectorAll('.echartsDom');
|
||||
// // 兼容echarts
|
||||
// echartsDomList.forEach(element => {
|
||||
@ -543,4 +544,4 @@ function loadMap(mapName, data) {
|
||||
width: 90px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user