feat: 视觉风格完成后立即刷新下一阶段
This commit is contained in:
1 parent
ef5325eda3
commit
aaf85510a1
1 file changed
+6
-1
@@ -7,6 +7,7 @@ import { computed, ref } from 'vue'
|
||||
import { useQuery } from '../../composables/useQuery'
|
||||
import { runOperation } from '../workflows/operations'
|
||||
import { useProjectMutationGuard } from '../workflows/useProjectMutationGuard'
|
||||
import { useProjectContext } from '../projects/context'
|
||||
import ConfirmAction from '../workflows/ConfirmAction.vue'
|
||||
import { visualStyleApi } from './api'
|
||||
import type { AddStyleImageInput, SaveVisualStyleInput, VisualStyle, VisualStyleImage } from './types'
|
||||
@@ -15,6 +16,7 @@ import StyleImages from './components/StyleImages.vue'
|
||||
|
||||
/** 项目视觉风格工作区:文本编辑、锁定和风格图记录分开管理。 */
|
||||
const { projectId, blocked } = useProjectMutationGuard()
|
||||
const projectContext = useProjectContext()
|
||||
/** 风格页仅在进入、切换项目或显式刷新时读取。 */
|
||||
const query = useQuery(projectId, async (id, signal) => {
|
||||
const style = await visualStyleApi.get(id, signal)
|
||||
@@ -57,7 +59,10 @@ async function writeStyle(label: string, action: (id: string) => Promise<VisualS
|
||||
dirty.value = false
|
||||
}
|
||||
})
|
||||
if (ok) await query.refresh()
|
||||
if (ok) {
|
||||
await query.refresh()
|
||||
await projectContext.refreshStageReadiness()
|
||||
}
|
||||
}
|
||||
|
||||
/** 人工保存允许修改锁定风格。 */
|
||||
|
||||
Reference in new issue
Block a user