fix: 解决tag与类别切换需要reload整个页面的bug

This commit is contained in:
AnNingUI
2025-08-12 20:42:31 +08:00
parent 82475f71db
commit 414872f61e
2 changed files with 50 additions and 30 deletions

View File

@@ -210,17 +210,13 @@ export default {
const gotoCategory = (c) => {
const value = encodeURIComponent(c.id ?? c.name)
router.push({ path: '/', query: { category: value } }).then(() => {
window.location.reload()
})
router.push({ path: '/', query: { category: value } })
handleItemClick()
}
const gotoTag = (t) => {
const value = encodeURIComponent(t.id ?? t.name)
router.push({ path: '/', query: { tags: value } }).then(() => {
window.location.reload()
})
router.push({ path: '/', query: { tags: value } })
handleItemClick()
}