[Fix] [UI-Next] [V1.0.0-Alpha] Fix the resource options in task node display incorrect after creating a new file. (#9269)

migrate-dev-docs-to-main
Amy0104 2022-03-29 23:11:41 +08:00 committed by GitHub
parent 3516cd56b1
commit 4ad1764932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -115,6 +115,13 @@ export const useTaskNodeStore = defineStore({
},
updateMainJar(type: ProgramType, mainJar: IMainJar[]) {
this.mainJars[type] = mainJar
},
init() {
this.preTaskOptions = []
this.postTaskOptions = []
this.preTasks = []
this.resources = []
this.mainJars = {}
}
}
})

View File

@ -18,6 +18,7 @@
import { defineComponent, ref, watch, inject, Ref, unref } from 'vue'
import Form from '@/components/form'
import { useTask } from './use-task'
import { useTaskNodeStore } from '@/store/project/task-node'
import type { ITaskData, EditWorkflowDefinition } from './types'
interface IDetailPanel {
@ -33,6 +34,9 @@ const NodeDetail = defineComponent({
name: 'NodeDetail',
emits: ['taskTypeChange'],
setup(props, { expose, emit }) {
const taskStore = useTaskNodeStore()
taskStore.init()
const formRef = ref()
const detailData: IDetailPanel = inject('data') || {
projectCode: 0,