0
0
Fork 0

feat: refs #5919 set store.data

This commit is contained in:
Jorge Penadés 2024-05-02 10:23:35 +02:00
parent 2c4cd56102
commit 455f47d46f
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { onBeforeMount, computed } from 'vue';
import { onBeforeMount, computed, watchEffect } from 'vue';
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useArrayData } from 'src/composables/useArrayData';
@ -47,6 +47,11 @@ if (props.baseUrl) {
}
});
}
watchEffect(() => {
if (Array.isArray(arrayData.store.data))
arrayData.store.data = arrayData.store.data[0];
});
</script>
<template>
<Teleport