<template>
  <div class="topo_ex">
    <Topology :datas="datas" />
  </div>
</template>

<script>
// @ is an alias to /src
import Topology from "@/components/topology.vue";

export default {
  components: {
    Topology
  },
  data: () => ({
    datas: {}
  }),
  mounted() {
    this.getData();
  },
  methods: {
    getData() {
      let url = "./static/antv.json";
      this.$http
        .get(url)
        .then(response => {
          this.datas = response.data.elements;
        })
        .catch(function(response) {
          this.error = true;
        });
    },
  }
};
</script>
<style scoped>
.topo_ex {
    margin-top: 100px;
}
</style>