diff --git a/dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx index 55a7103a31..289755a62e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, onMounted, PropType, toRefs, watch } from 'vue' +import { defineComponent, PropType, toRefs, watch } from 'vue' import Modal from '@/components/modal' import { NDataTable, NPagination } from 'naive-ui' import { useI18n } from 'vue-i18n' @@ -48,21 +48,12 @@ const VersionModal = defineComponent({ }) } - onMounted(() => { - variables.taskVersion = props.row?.taskVersion - variables.taskCode = props.row?.taskCode - - createColumns(variables) - requestData() - }) - watch( () => props.show, () => { - variables.taskVersion = props.row?.taskVersion - variables.taskCode = props.row?.taskCode - if (props.show) { + variables.taskVersion = props.row?.taskVersion + variables.taskCode = props.row?.taskCode createColumns(variables) requestData() }