Forráskód Böngészése

新增模拟参数

YaolongHan 4 éve
szülő
commit
6fd29827f3

+ 3 - 4
docs/.vuepress/components/tuopu/baseTopu1.vue

@@ -13,6 +13,7 @@
 import { SGraphView, SGraphScene } from "@persagy-web/graph";
 import { PTopoParser } from "./PTopoParser";
 import axios from "axios";
+import { data } from "./data/data1.js"; //模拟接口返回参数
 export default {
   data() {
     return {
@@ -29,8 +30,6 @@ export default {
       this.view ? (this.view.scene = this.scene) : null;
       // 获取压缩包数据并解压
       this.getMapBlob();
-
-
     },
 
     // 请求获取地图的压缩包
@@ -63,8 +62,8 @@ export default {
       const parse = new PTopoParser();
 
       // 获取数据解析数据再将转化得实例添加到场景中
-
-      parse.parseData(res.data.content.elements);
+      // 测试数据
+      parse.parseData(data.content.elements);
       parse.markers.forEach((item) => {
         this.scene.addItem(item);
       });

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 7585 - 0
docs/.vuepress/components/tuopu/data/data1.js