前端:完善 naive-ui 配置,修复 API 返回值访问方式,修复 Sidebar 硬编码数据,修复路由守卫逻辑,修复其他组件问题。

This commit is contained in:
2026-03-31 22:23:03 +08:00
parent d10c823e23
commit 023380d14b
11 changed files with 82 additions and 50 deletions

View File

@@ -22,7 +22,7 @@ async function fetchPosts(categoryId?: string) {
params.category_id = categoryId
}
const response = await postApi.getList(params)
posts.value = response.data.items.filter(p => p.status === 'published')
posts.value = response.data.items.filter((p: any) => p.status === 'published')
} catch (error) {
console.error('Failed to fetch posts:', error)
} finally {