diff --git a/client/src/components/AddContentElement.vue b/client/src/components/AddContentElement.vue index ceb86084..65e9a22a 100644 --- a/client/src/components/AddContentElement.vue +++ b/client/src/components/AddContentElement.vue @@ -1,5 +1,5 @@ @@ -8,6 +8,8 @@ import AddIcon from '@/components/icons/AddIcon'; export default { + props: ['index'], + components: { AddIcon } diff --git a/client/src/components/NewContentBlockWizard.vue b/client/src/components/NewContentBlockWizard.vue index 34c2810b..a1412757 100644 --- a/client/src/components/NewContentBlockWizard.vue +++ b/client/src/components/NewContentBlockWizard.vue @@ -1,18 +1,21 @@ @@ -46,10 +49,8 @@ removeElement(index) { this.elements.splice(index, 1); }, - addElement() { - this.elements.push({ - id: 5 - }) + addElement(index) { + this.elements.splice(index + 1, 0, {}) }, changeType(index) { this.elements.splice(index, 1, {type: 'link'});