mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
create OnTheFly rootComponent structure, and twig include template to insert it
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<on-the-fly
|
||||
action="action"
|
||||
:type="type"
|
||||
:id="id"
|
||||
@saveFormOnTheFly="saveFormOnTheFly">
|
||||
</on-the-fly>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OnTheFly from './components/OnTheFly.vue';
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: [
|
||||
'OnTheFly'
|
||||
],
|
||||
props: ['onTheFly'],
|
||||
computed: {
|
||||
context() {
|
||||
return this.onTheFly.context;
|
||||
},
|
||||
options() {
|
||||
return this.onTheFly.options;
|
||||
},
|
||||
// temp
|
||||
action() {
|
||||
return 'show'; // 'edit', 'create'
|
||||
},
|
||||
type() {
|
||||
return 'person'; // 'thirdparty'
|
||||
},
|
||||
id() {
|
||||
return 1613
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('OnTheFly mounted');
|
||||
console.log('OnTheFly: data context', this.context);
|
||||
console.log('OnTheFly: data options', this.options);
|
||||
},
|
||||
methods: {
|
||||
saveFormOnTheFly(payload) {
|
||||
console.log('saveFormOnTheFly', payload);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user