diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-environment-name.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-environment-name.ts index 17b293eeba..0f959ebdfb 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-environment-name.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-environment-name.ts @@ -49,7 +49,7 @@ export function useEnvironmentName( if (options.value.length === 0) { model.environmentCode = null } else { - isCreate && (model.environmentCode = options.value[0].value) + (isCreate && !model.environmentCode) && (model.environmentCode = options.value[0].value) } }