23 lines
443 B
Vue
23 lines
443 B
Vue
<script setup lang="ts">
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import { useItem } from '../stores/item';
|
|
import { watch } from 'vue';
|
|
|
|
const page = useItem()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
|
|
router.afterEach((to) => {
|
|
if (to.name == 'home_no') {
|
|
page.load(route.params)
|
|
}
|
|
return true
|
|
})
|
|
|
|
watch(() => route.params.item, () => {
|
|
page.load(route.params)
|
|
})
|
|
</script>
|
|
<template>
|
|
|
|
</template> |