mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
controller return json to vue via twig; init vue App
This commit is contained in:
@@ -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;
|
Reference in New Issue
Block a user