mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-09 03:27:32 +08:00
fix: 解决冲突
This commit is contained in:
@@ -131,12 +131,11 @@ export default {
|
|||||||
const tags = ref([])
|
const tags = ref([])
|
||||||
const categoryOpen = ref(true)
|
const categoryOpen = ref(true)
|
||||||
const tagOpen = ref(true)
|
const tagOpen = ref(true)
|
||||||
|
const { data: categoryData, pending: isLoadingCategory } = await fetch(
|
||||||
const { data: categoryData, pending: isLoadingCategory } = await useFetch(
|
|
||||||
`${API_BASE_URL}/api/categories`,
|
`${API_BASE_URL}/api/categories`,
|
||||||
{ server: true }
|
{ server: true }
|
||||||
)
|
)
|
||||||
const { data: tagData, pending: isLoadingTag } = await useFetch(
|
const { data: tagData, pending: isLoadingTag } = await fetch(
|
||||||
`${API_BASE_URL}/api/tags?limit=10`,
|
`${API_BASE_URL}/api/tags?limit=10`,
|
||||||
{ server: true }
|
{ server: true }
|
||||||
)
|
)
|
||||||
@@ -210,19 +209,39 @@ export default {
|
|||||||
|
|
||||||
const gotoCategory = (c) => {
|
const gotoCategory = (c) => {
|
||||||
const value = encodeURIComponent(c.id ?? c.name)
|
const value = encodeURIComponent(c.id ?? c.name)
|
||||||
this.$router
|
router
|
||||||
.push({ path: '/', query: { category: value } }).then(() => {
|
.push({ path: '/', query: { category: value } }).then(() => {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
this.handleItemClick()
|
handleItemClick()
|
||||||
},
|
}
|
||||||
gotoTag(t) {
|
|
||||||
|
const gotoTag = (t) => {
|
||||||
const value = encodeURIComponent(t.id ?? t.name)
|
const value = encodeURIComponent(t.id ?? t.name)
|
||||||
this.$router
|
router
|
||||||
.push({ path: '/', query: { tags: value } }).then(() => {
|
.push({ path: '/', query: { tags: value } }).then(() => {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
this.handleItemClick()
|
handleItemClick()
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
categories,
|
||||||
|
tags,
|
||||||
|
categoryOpen,
|
||||||
|
tagOpen,
|
||||||
|
isLoadingCategory,
|
||||||
|
isLoadingTag,
|
||||||
|
iconClass,
|
||||||
|
unreadCount,
|
||||||
|
showUnreadCount,
|
||||||
|
shouldShowStats,
|
||||||
|
cycleTheme,
|
||||||
|
handleHomeClick,
|
||||||
|
handleItemClick,
|
||||||
|
isImageIcon,
|
||||||
|
gotoCategory,
|
||||||
|
gotoTag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user