修复: 多视图UX(知识库窄屏CSS+任务详情路由+项目灵感视图)

This commit is contained in:
lxy
2026-06-16 02:33:16 +08:00
parent 10e4945e5a
commit 73ed4bd637
13 changed files with 70 additions and 194 deletions
+8 -4
View File
@@ -27,10 +27,14 @@ export function createTasksStore() {
}
async function updateTask(id: string, field: string, value: string) {
await taskApi.update(id, field, value)
const idx = state.tasks.findIndex(t => t.id === id)
if (idx >= 0) {
(state.tasks[idx] as any)[field] = value
try {
await taskApi.update(id, field, value)
const idx = state.tasks.findIndex(t => t.id === id)
if (idx >= 0) {
(state.tasks[idx] as any)[field] = value
}
} catch (e: any) {
state.error = e?.toString() ?? t('tasks.err.updateFailed')
}
}