mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
rename to templates
This commit is contained in:
1 parent
98fc9d964a
commit
4a303cb423
59 files changed
+248
-264
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { createApp, reactive } from 'vue'
|
||||
|
||||
import Form from './submission_form/form'
|
||||
|
||||
window.customElements.define('submission-form', class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
this.appElem = document.createElement('div')
|
||||
|
||||
this.app = createApp(Form, {
|
||||
submissionSlug: this.dataset.submissionSlug,
|
||||
authenticityToken: this.dataset.authenticityToken,
|
||||
values: reactive(JSON.parse(this.dataset.values)),
|
||||
attachments: reactive(JSON.parse(this.dataset.attachments)),
|
||||
fields: JSON.parse(this.dataset.fields)
|
||||
})
|
||||
|
||||
this.app.mount(this.appElem)
|
||||
|
||||
this.appendChild(this.appElem)
|
||||
}
|
||||
|
||||
disconnectedCallback () {
|
||||
this.app?.unmount()
|
||||
this.appElem?.remove()
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user