diff --git a/applicationFE/src/views/repository/RepositoryList.vue b/applicationFE/src/views/repository/RepositoryList.vue index f12e73b..9319b67 100644 --- a/applicationFE/src/views/repository/RepositoryList.vue +++ b/applicationFE/src/views/repository/RepositoryList.vue @@ -158,7 +158,8 @@ const formMode = ref('new') * @Desc repository 생성버튼 클릭시 동작하는 함수 (formMode set) */ const onClickNewBtn = () => { - formMode.value = 'new' + selectRepositoryName.value = ""; + formMode.value = 'new'; } diff --git a/applicationFE/src/views/repository/components/repositoryForm.vue b/applicationFE/src/views/repository/components/repositoryForm.vue index 4ecdb1d..b45d265 100644 --- a/applicationFE/src/views/repository/components/repositoryForm.vue +++ b/applicationFE/src/views/repository/components/repositoryForm.vue @@ -136,8 +136,6 @@ watch(repositoryName, async () => { onMounted(async () => { await setInit(); - const modalElement = document.getElementById('repositoryForm'); - modalElement?.addEventListener('hidden.bs.modal', handleModalClose); }) const repositoryFormData = ref({} as Repository) @@ -195,13 +193,16 @@ const onClickSubmit = async () => { if (props.mode === 'new') { await _registRepository().then(() => { emit('get-repository-list') + setInit() }) } - else + else { await _updateRepository().then(() => { emit('get-repository-list') + setInit() }) - setInit() + } + } /** @@ -228,17 +229,6 @@ const _updateRepository = async () => { toast.error('등록 할 수 없습니다.') } -const handleModalClose = () => { - repositoryFormData.value.name = '' - repositoryFormData.value.format = 'raw' - repositoryFormData.value.type = 'hosted' - repositoryFormData.value.url = '' - repositoryFormData.value.online = true - httpPort.value = 0 - httpsPort.value = 0 - writePolicy.value = "allow" -} -