fix: levels and categories empty due to res vs res.data mismatch

- Fix Classification.vue: levels use res.data, auto-fetch on mount
- Fix Task.vue: levels and categories use res.data
- Fix Project.vue: templates use res.data
This commit is contained in:
hiderfong
2026-04-23 10:51:06 +08:00
parent 5119ca775b
commit 86c487ae40
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ async function handleDelete(p: ProjectItem) {
async function fetchMeta() {
try {
const [tRes, sRes] = await Promise.all([getTemplates(), getDataSources()])
templates.value = (tRes as any) || []
templates.value = (tRes as any)?.data || []
dataSources.value = (sRes as any)?.data || []
} catch (e) {
// ignore