Пытаюсь интегрировать vis-network с Vue. Использую плагин
https://github.com/r3code/vue-vis-network . Вылезает ошибка: "Cannot read property 'hasChildNodes' of undefined". У меня есть подозрение, что плагин ищет данные не в секции данных у компонента, а пытается обратиться к #app. Как это можно исправить?
Код компонента:
<template>
<el-container >
<el-main>
<network ref="network" :nodes="nodes" :edges="edges" :options="options"> </network>
<button @click="get_data">GetData</button>
</el-main>
</el-container>
</template>
<script>
export default {
components: { Notification },
data () {
return {
nodes: [],
edges: [],
options: []
}
},
methods:
{
get_data()
{
axios.get(base_url + '/graph')
.then((response) => {
this.nodes = response.data.nodes;
this.edges = response.data.edges;
}).catch((error) => {
console.log(error);
});
}
},
}
</script>
index.js:
Vue.component('network', new vueVisNetwork.Network);
Возможно связанное issue
https://github.com/crubier/react-graph-vis/issues/57 (правда про Реакт)