瀏覽代碼

[Fix-8715][UI Next][V1.0.0-Alpha] Worked out this issue with missing some data in the form of a task when continuously clicking the same task node. (#8742)

calvin 3 年之前
父節點
當前提交
6e2c2adcaa
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx

+ 8 - 7
dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx

@@ -23,7 +23,8 @@ import {
   watch,
   nextTick,
   provide,
-  computed
+  computed,
+  onMounted
 } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { omit } from 'lodash'
@@ -102,12 +103,12 @@ const NodeDetailModal = defineComponent({
     )
 
     watch(
-      () => props.data,
-      async () => {
-        if (!props.show) return
-        await nextTick()
-        detailRef.value.value.setValues(formatModel(props.data))
-      }
+        () => [props.show, props.data],
+        async () => {
+          if (!props.show) return
+          await nextTick()
+          detailRef.value.value.setValues(formatModel(props.data))
+        }
     )
 
     return () => (