prepare vue_visgraph component, with store, dataset and display basic graph

This commit is contained in:
2021-10-18 15:47:57 +02:00
parent 8be11314c3
commit 1b0c19a68f
11 changed files with 250 additions and 59 deletions

View File

@@ -0,0 +1,27 @@
import { createApp } from "vue"
import { store } from "./store.js"
import { _createI18n } from 'ChillMainAssets/vuejs/_js/i18n'
import { visMessages } from './i18n'
import App from './App.vue'
const i18n = _createI18n(visMessages)
const container = document.getElementById('relationship-graph')
const persons = JSON.parse(container.dataset.persons)
persons.forEach(person => {
store.dispatch('addPerson', person)
store.dispatch('fetchInfoForPerson', person)
})
const app = createApp({
template: `<app></app>`
})
.use(store)
.use(i18n)
.component('app', App)
.mount('#relationship-graph')
//console.log('container dataset', container.dataset.persons)