controller return json to vue via twig; init vue App

This commit is contained in:
2021-05-27 17:36:33 +02:00
parent b89cffce68
commit b1d7e543fc
11 changed files with 138 additions and 52 deletions

View File

@@ -0,0 +1,31 @@
import 'es6-promise/auto';
import { createStore } from 'vuex';
const debug = process.env.NODE_ENV !== 'production';
//console.log('window.activity', window.activity);
const store = createStore({
strict: debug,
state: {
activity: window.activity
},
getters: {
},
mutations: {
addPerson(state, payload) {
}
},
actions: {
addPerson() {
//let el = document.getElementById('form['activity']['xxx']['xxxx']');
//let option = document.createElement('option');
//option.value = person.id;
//el.appendChild(option);
commit('addPerson', payload)
}
}
});
export default store;