yeah
This commit is contained in:
26
appOLDD/pages/box/[id].vue
Normal file
26
appOLDD/pages/box/[id].vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<boxes />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useUiStore } from '~/store/ui'
|
||||
import { useDataStore } from '~/store/data'
|
||||
|
||||
// Configuration du layout
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
|
||||
const uiStore = useUiStore()
|
||||
const dataStore = useDataStore()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(async () => {
|
||||
await dataStore.loadData()
|
||||
const idParam = Array.isArray(route.params.id) ? route.params.id[0] : route.params.id
|
||||
if (typeof idParam === 'string' && idParam.length > 0) {
|
||||
uiStore.selectBox(idParam)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user