mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-08-13 14:51:00 +00:00
feat: tag & catagory selection
This commit is contained in:
@@ -25,7 +25,9 @@ export default {
|
|||||||
const gotoCategory = () => {
|
const gotoCategory = () => {
|
||||||
if (!props.category) return
|
if (!props.category) return
|
||||||
const value = encodeURIComponent(props.category.id ?? props.category.name)
|
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 }
|
return { gotoCategory }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ export default {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const gotoTag = tag => {
|
const gotoTag = tag => {
|
||||||
const value = encodeURIComponent(tag.id ?? tag.name)
|
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 }
|
return { gotoTag }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user