La nav XL porte Recherche média / Publications ; /media relit route.query.tab à chaque changement (un lien /media → /media?tab=projets changeait l'URL sans changer la page). B10 M5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBu7CSLy7PJgL4HJaV5oHP
24 lines
857 B
Vue
24 lines
857 B
Vue
<template>
|
|
<!-- B10-M5 : plus de sous-onglets ici, la nav XL porte « Recherche média » et « Publications » (?tab=projets) -->
|
|
<div class="media-page" style="background: var(--nav-bg);">
|
|
<MediaTabVisuel v-if="tab === 'visuel'" />
|
|
<MediaTabProjets v-else />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const route = useRoute()
|
|
|
|
// Lu à chaque changement de ?tab= (un lien /media → /media?tab=projets ne remonte pas la page).
|
|
const tab = ref<'visuel' | 'projets'>(route.query.tab === 'projets' ? 'projets' : 'visuel')
|
|
watch(() => route.query.tab, (t) => {
|
|
tab.value = t === 'projets' ? 'projets' : 'visuel'
|
|
})
|
|
|
|
useHead(() => ({ title: tab.value === 'projets' ? 'AEP - Publications' : 'AEP - Recherche média' }))
|
|
</script>
|
|
|
|
<style scoped>
|
|
.media-page { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
|
|
</style>
|