diff --git a/frontend/src/views/setting/organization/project/components/addProjectModal.vue b/frontend/src/views/setting/organization/project/components/addProjectModal.vue index c47138c341..a83657332a 100644 --- a/frontend/src/views/setting/organization/project/components/addProjectModal.vue +++ b/frontend/src/views/setting/organization/project/components/addProjectModal.vue @@ -264,15 +264,10 @@ form.resourcePoolIds = props.currentProject.resourcePoolIds; } }); - watch( - () => props.visible, - (val) => { - currentVisible.value = val; - if (!val) { - formReset(); - } else { - initAffiliatedOrgOption(); - } - } - ); + onMounted(() => { + initAffiliatedOrgOption(); + }); + onUnmounted(() => { + formReset(); + });