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

This commit is contained in:
2026-06-16 02:33:16 +08:00
parent 10e4945e5a
commit 73ed4bd637
13 changed files with 70 additions and 194 deletions

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')
}
}

View File

@@ -89,6 +89,7 @@ export function createWorkflowStore() {
state.pendingApproval = null
} catch (error) {
console.error('审批失败:', error)
state.error = error?.toString() ?? t('projects.err.approveFailed')
}
}
@@ -105,6 +106,7 @@ export function createWorkflowStore() {
state.pendingApproval = null
} catch (error) {
console.error('取消审批失败:', error)
state.error = error?.toString() ?? t('projects.err.cancelFailed')
}
}