-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
When I am trying to add vis-network not in main component I am getting error: Constructor must be called with the new operator
<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:
import vueVisNetwork from 'vis-network'
import locale from 'element-ui/lib/locale/lang/ru-RU'
window.axios = require('axios');
Vue.use(ElementUI, { locale })
Vue.use(Router)
Vue.component('network', vueVisNetwork.Network);
window.base_url = "http://127.0.0.1:8000"
new Vue({
el: '#app',
locale: 'ru',
render: h => h(App)
});
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed