feat: tag & catagory selection

This commit is contained in:
tim
2025-07-10 14:41:23 +08:00
parent 9be4863366
commit 5763a37047
2 changed files with 6 additions and 2 deletions

View File

@@ -25,7 +25,9 @@ export default {
const gotoCategory = () => {
if (!props.category) return
const value = encodeURIComponent(props.category.id ?? props.category.name)
router.push({ path: '/', query: { category: value } })
router.push({ path: '/', query: { category: value } }).then(() => {
window.location.reload()
})
}
return { gotoCategory }
}

View File

@@ -29,7 +29,9 @@ export default {
const router = useRouter()
const gotoTag = tag => {
const value = encodeURIComponent(tag.id ?? tag.name)
router.push({ path: '/', query: { tags: value } })
router.push({ path: '/', query: { tags: value } }).then(() => {
window.location.reload()
})
}
return { gotoTag }
}