diff --git a/src/components/input/FormFile.vue b/src/components/input/FormFile.vue index 4fbfce7..71070db 100644 --- a/src/components/input/FormFile.vue +++ b/src/components/input/FormFile.vue @@ -1,17 +1,25 @@ - - diff --git a/src/components/input/FormInput.vue b/src/components/input/FormInput.vue index 7f005e6..731824c 100644 --- a/src/components/input/FormInput.vue +++ b/src/components/input/FormInput.vue @@ -2,7 +2,7 @@
@@ -71,8 +72,17 @@
- - + +
@@ -94,6 +104,7 @@ const password = ref(''); const category = ref(0); // 기본값 0 const content = ref(''); const attachFiles = ref(null); +const isFileValid = ref(true); // 파일 유효성 상태 추가 const titleAlert = ref(false); const passwordAlert = ref(false); @@ -112,7 +123,7 @@ const write = async () => { passwordAlert.value = category.value === 1 && !password.value; contentAlert.value = !content.value; - if (titleAlert.value || passwordAlert.value || contentAlert.value) { + if (titleAlert.value || passwordAlert.value || contentAlert.value || !isFileValid.value) { return; } @@ -125,7 +136,6 @@ const write = async () => { }; const { data: boardResponse } = await axios.post('board', boardData); - console.log(boardResponse.data); const boardId = boardResponse.data; if (attachFiles.value && attachFiles.value.length > 0) {