feat: ajout d'une route GetMangaByIdHandler.php et fix de la SearchBar.vue
This commit is contained in:
parent
ed0a075a6c
commit
d9e935f7de
@@ -159,7 +159,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, computed } from 'vue';
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useMangaStore } from '../../application/store/mangaStore';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -238,6 +238,13 @@ const loadData = async () => {
|
||||
]);
|
||||
};
|
||||
|
||||
// Ajouter le watcher sur l'ID de la route
|
||||
watch(() => route.params.id, (newId, oldId) => {
|
||||
if (newId !== oldId) {
|
||||
loadData();
|
||||
}
|
||||
});
|
||||
|
||||
// Actions sur les chapitres et volumes
|
||||
const searchChapter = async (chapter) => {
|
||||
// TODO: Implémenter la recherche de chapitre
|
||||
|
||||
Reference in New Issue
Block a user