add onUpdated to allow the data to be updated when the url changes
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Pau 2022-11-23 08:06:59 +01:00
parent ef0ea4f503
commit e864843c28
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { onMounted, computed, ref } from 'vue';
import { onMounted, computed, ref, onUpdated } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useSession } from 'src/composables/useSession';
@ -18,6 +18,8 @@ onMounted(async () => {
await fetch();
});
onUpdated(async () => await fetch());
const route = useRoute();
const { t } = useI18n();
const { getToken } = useSession();

View File

@ -1,5 +1,5 @@
<script setup>
import { ref, onMounted, computed } from 'vue';
import { ref, onMounted, computed, onUpdated } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
@ -8,6 +8,8 @@ import workerDescriptorDialog from './WorkerDescriptorDialog.vue';
onMounted(() => fetch());
onUpdated(() => fetch());
const route = useRoute();
const { t } = useI18n();
const quasar = useQuasar();