diff --git a/packages/core/src/components/utility/form-tab/DFormTabGroups.vue b/packages/core/src/components/utility/form-tab/DFormTabGroups.vue index e38112e1..b9ac5841 100644 --- a/packages/core/src/components/utility/form-tab/DFormTabGroups.vue +++ b/packages/core/src/components/utility/form-tab/DFormTabGroups.vue @@ -80,7 +80,12 @@ export default defineComponent({ }; const handleUpdated = (data: Record) => { - items.value[currentIndex.value] = { ...data }; + if (currentIndex.value === -1) { + items.value.push({ ...data }); + currentIndex.value = 0; + } else { + items.value[currentIndex.value] = { ...data }; + } emit('update:modelValue', items.value); }; @@ -98,10 +103,7 @@ export default defineComponent({