修复: 多视图UX(知识库窄屏CSS+任务详情路由+项目灵感视图)
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user