preload dynamic editor
This commit is contained in:
@@ -274,13 +274,16 @@ export default {
|
|||||||
makeDynamic () {
|
makeDynamic () {
|
||||||
this.isMakeDynamicLoading = true
|
this.isMakeDynamicLoading = true
|
||||||
|
|
||||||
this.baseFetch(`/templates/${this.template.id}/dynamic_documents`, {
|
Promise.all([
|
||||||
method: 'POST',
|
this.baseFetch(`/templates/${this.template.id}/dynamic_documents`, {
|
||||||
body: JSON.stringify({ uuid: this.document.uuid }),
|
method: 'POST',
|
||||||
headers: {
|
body: JSON.stringify({ uuid: this.document.uuid }),
|
||||||
'Content-Type': 'application/json'
|
headers: {
|
||||||
}
|
'Content-Type': 'application/json'
|
||||||
}).then(async (resp) => {
|
}
|
||||||
|
}),
|
||||||
|
import(/* webpackChunkName: "dynamic-editor" */ './dynamic_document')
|
||||||
|
]).then(async ([resp, _]) => {
|
||||||
const dynamicDocument = await resp.json()
|
const dynamicDocument = await resp.json()
|
||||||
|
|
||||||
this.template.schema.find((item) => item.attachment_uuid === dynamicDocument.uuid).dynamic = true
|
this.template.schema.find((item) => item.attachment_uuid === dynamicDocument.uuid).dynamic = true
|
||||||
|
|||||||
Reference in New Issue
Block a user