fix: export workflow image

This commit is contained in:
zxhlyh
2025-09-04 14:42:47 +08:00
parent 1e5f6c1475
commit 1bf04b7b74
3 changed files with 8 additions and 7 deletions

View File

@ -30,7 +30,7 @@ export const useWorkflowInit = () => {
const [data, setData] = useState<FetchWorkflowDraftResponse>()
const [isLoading, setIsLoading] = useState(true)
useEffect(() => {
workflowStore.setState({ appId: appDetail.id })
workflowStore.setState({ appId: appDetail.id, appName: appDetail.name })
}, [appDetail.id, workflowStore])
const handleUpdateWorkflowConfig = useCallback((config: Record<string, any>) => {

View File

@ -2,6 +2,7 @@ import type { StateCreator } from 'zustand'
export type WorkflowSliceShape = {
appId: string
appName: string
notInitialWorkflow: boolean
setNotInitialWorkflow: (notInitialWorkflow: boolean) => void
nodesDefaultConfigs: Record<string, any>
@ -11,6 +12,7 @@ export type WorkflowSliceShape = {
export type CreateWorkflowSlice = StateCreator<WorkflowSliceShape>
export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({
appId: '',
appName: '',
notInitialWorkflow: false,
setNotInitialWorkflow: notInitialWorkflow => set(() => ({ notInitialWorkflow })),
nodesDefaultConfigs: {},