sketchmind commented on code in PR #11203:
URL: https://github.com/apache/dolphinscheduler/pull/11203#discussion_r954745415


##########
dolphinscheduler-ui/src/views/resource/components/resource/upload/index.tsx:
##########
@@ -59,6 +80,20 @@ export default defineComponent({
 
     const trim = getCurrentInstance()?.appContext.config.globalProperties.trim
 
+
+    watch(
+      () => props.show,
+      () => {
+        state.uploadForm.type = props.resourceType!
+        state.uploadForm.isReupload = props.isReupload
+        if (props.isReupload && props.show) {
+          state.uploadForm.id = props.id
+          state.uploadForm.name = props.name
+          state.uploadForm.description = props.description
+        }
+      }

Review Comment:
   > It seems that these logics are only handled when show is true.
   
   Yes, because the updateForm will be reset when the modal is hidden or the 
upload is confirm. If it is updated when show become false, it will cause the 
upload function to incorrectly refer to the re-uploaded value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to