This commit is contained in:
2024-01-11 07:55:56 +01:00
parent 5ba7df5b62
commit cf875dc704

View File

@@ -48,8 +48,8 @@
<div class="pb_section table-bordered p-2 pl-3 pr-3 mb-3 rounded"> <div class="pb_section table-bordered p-2 pl-3 pr-3 mb-3 rounded">
<component <component
@itemRemoved="removeItem" @itemRemoved="removeItem"
:key="keyIndex+contentId + '_' + index" :key="keyIndex+contentId + rand()"
:id="keyIndex+contentId + '_' + index" :id="keyIndex+contentId + rand()"
v-bind:is="element.name" v-bind:is="element.name"
v-bind:value="element" v-bind:value="element"
v-model="value.items[index]" v-model="value.items[index]"
@@ -105,7 +105,7 @@ export default {
modalAddBox: false, modalAddBox: false,
drag: false, drag: false,
modalColumnsSettings: false, modalColumnsSettings: false,
contentId: 'content' + Math.round(Math.random() * 1000) contentId: 'cnt' + Math.round(Math.random() * 1000)
} }
}, },
props: { value: Object, keyIndex: String }, props: { value: Object, keyIndex: String },
@@ -125,7 +125,7 @@ export default {
this.$emit('change') this.$emit('change')
}, },
rand: function () { rand: function () {
return 'component' + Math.random() * 100 return 'c' + Math.round(Math.random() * 1000)
}, },
removeItem(item) { removeItem(item) {
this.value.items.indexOf(item) this.value.items.indexOf(item)