otf: add data attributes and pass them in vue component

This commit is contained in:
2021-10-01 14:03:58 +02:00
parent 65782d3a6b
commit 75348f6ba7
3 changed files with 22 additions and 16 deletions

View File

@@ -3,10 +3,19 @@
It push all variables from context in OnTheFly/App.vue.
OPTIONS
*
* targetEntity {
name: string 'person', 'thirdparty'
id: integer
}
* action 'show', 'edit', 'create'
#}
<div class="onthefly-container"
data-target-name="{{ targetEntity.name|e('html_attr') }}"
data-target-id="{{ targetEntity.id|e('html_attr') }}"
data-action="{{ action|e('html_attr') }}"
></div>
{{ encore_entry_script_tags('vue_onthefly') }}