0
0
Fork 0

fix: refs #6942 fix vncard

This commit is contained in:
Jorge Penadés 2024-05-17 17:26:00 +02:00
parent 1abcb4796f
commit 7f880b397c
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { onBeforeMount, computed, watchEffect } from 'vue'; import { onBeforeMount, computed, watchEffect, watch } from 'vue';
import { useRoute, onBeforeRouteUpdate } from 'vue-router'; import { useRoute, onBeforeRouteUpdate } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
@ -42,7 +42,7 @@ onBeforeMount(async () => {
if (props.baseUrl) { if (props.baseUrl) {
onBeforeRouteUpdate(async (to, from) => { onBeforeRouteUpdate(async (to, from) => {
if (to.params.id !== from.params.id) { if (to.params.id !== from.params.id) {
arrayData.store.url = `${props.baseUrl}/${route.params.id}`; arrayData.store.url = `${props.baseUrl}/${to.params.id}`;
await arrayData.fetch({ append: false }); await arrayData.fetch({ append: false });
} }
}); });