diff options
Diffstat (limited to 'views/mods/mod_rechnungen/js')
| -rw-r--r-- | views/mods/mod_rechnungen/js/e_invoice_app.module.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/views/mods/mod_rechnungen/js/e_invoice_app.module.js b/views/mods/mod_rechnungen/js/e_invoice_app.module.js new file mode 100644 index 0000000..a34bb75 --- /dev/null +++ b/views/mods/mod_rechnungen/js/e_invoice_app.module.js @@ -0,0 +1,25 @@ +import { createApp } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'; + +export async function initEInvoiceApp(element, data) { + + const template = await fetch(data.template_url).then(response => response.text()); + + const App = { + data() { + + return { + data: data, + open: false + } + + }, + methods: { + intVal: function(value) { console.log(value); return parseInt(value); }, + trans: function(strDefault) { return strDefault; } + }, + template: template + }; + + createApp(App).mount(element); + +}
\ No newline at end of file |
