From e87957c88a2cc61bd9d5c1f49f7003452632e754 Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Tue, 14 Jan 2025 12:23:13 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=ED=85=8C=EC=8A=A4=ED=8A=B8=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardComment.vue | 4 + src/components/board/BoardContent.vue | 6 +- src/components/board/BoardProfile.vue | 78 ++++++++----- src/components/list/BoardCard.vue | 154 +++++++++++++++++--------- src/router/index.js | 10 +- src/stores/calendarStore.js | 4 +- src/views/board/BoardEdit.vue | 154 ++++++++++++++++++++++++++ src/views/board/BoardList.vue | 73 ++++++------ src/views/board/BoardView.vue | 108 ++++++++++++++++-- src/views/board/BoardWrite.vue | 6 +- vite.config.js | 2 +- 11 files changed, 471 insertions(+), 128 deletions(-) create mode 100644 src/views/board/BoardEdit.vue diff --git a/src/components/board/BoardComment.vue b/src/components/board/BoardComment.vue index 6128c7d..e71b3ee 100644 --- a/src/components/board/BoardComment.vue +++ b/src/components/board/BoardComment.vue @@ -36,6 +36,7 @@ import BoardComentArea from './BoardComentArea.vue'; import { ref, computed } from 'vue'; import Pagination from '../pagination/Pagination.vue'; import PlusButton from '../button/PlusBtn.vue'; +import { defineEmits } from 'vue'; const comment = ref(false); @@ -43,6 +44,9 @@ const toggleComment = () => { comment.value = !comment.value }; +// emits 정의 +const emit = defineEmits(['submitComment']); + \ No newline at end of file + diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index d747800..cfe80e3 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -24,72 +24,96 @@
diff --git a/src/components/list/BoardCard.vue b/src/components/list/BoardCard.vue index c2ed3c0..02c8b18 100644 --- a/src/components/list/BoardCard.vue +++ b/src/components/list/BoardCard.vue @@ -1,23 +1,43 @@ - diff --git a/src/router/index.js b/src/router/index.js index 417ef6c..a19d7da 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,4 @@ import { createRouter, createWebHistory } from 'vue-router' -import BoardWrite from '@v/board/BoardWrite.vue'; // 초기 렌더링 속도를 위해 지연 로딩 사용 const routes = [ @@ -14,6 +13,7 @@ const routes = [ children: [ { path: '', + name: 'BoardList', component: () => import('@v/board/BoardList.vue') }, { @@ -21,8 +21,14 @@ const routes = [ component: () => import('@v/board/BoardWrite.vue') }, { - path: 'get/:id', + path: ':id', + name: 'BoardDetail', component: () => import('@v/board/BoardView.vue') + }, + { + path: 'edit/:id', + name: 'BoardEdit', + component: () => import('@v/board/BoardEdit.vue') } ] }, diff --git a/src/stores/calendarStore.js b/src/stores/calendarStore.js index 80c8525..a3616f9 100644 --- a/src/stores/calendarStore.js +++ b/src/stores/calendarStore.js @@ -4,12 +4,12 @@ import axios from 'axios'; const events = ref([]); const fetchEvents = async () => { - const response = await axios.get('/api/calendar/events'); + const response = await axios.get('/calendar/events'); events.value = response.data; }; const addEvent = async (event) => { - await axios.post('/api/calendar/event', event); + await axios.post('/calendar/event', event); fetchEvents(); }; diff --git a/src/views/board/BoardEdit.vue b/src/views/board/BoardEdit.vue new file mode 100644 index 0000000..36e81bd --- /dev/null +++ b/src/views/board/BoardEdit.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue index 25109bd..691fdba 100644 --- a/src/views/board/BoardList.vue +++ b/src/views/board/BoardList.vue @@ -1,30 +1,30 @@