forked from verdnatura/salix-front
fix: refs #6942 fix vncard
This commit is contained in:
parent
1abcb4796f
commit
7f880b397c
|
@ -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 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue