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 @@