rouuter push 추가

This commit is contained in:
ckx6954 2024-12-17 10:38:01 +09:00
parent 5d232d8cc9
commit 67416262a7
2 changed files with 15 additions and 3 deletions

View File

@ -4,7 +4,9 @@
<div class="row g-3">
<div class="mt-8">
<button type="button" class="btn btn-primary float-end">글쓰기</button>
<router-link to="/board/write">
<button type="button" class="btn btn-primary float-end">글쓰기</button>
</router-link>
</div>
<template v-for="(item, index) in list" :key="item.id">
<board-card :item="item" />

View File

@ -28,8 +28,8 @@
</div>
<div class="mb-4 d-flex justify-content-end">
<button type="button" class="btn btn-info right">목록</button>
<button type="button" class="btn btn-primary ms-1">작성</button>
<button type="button" class="btn btn-info right" @click="goList">목록</button>
<button type="button" class="btn btn-primary ms-1" @click="write">작성</button>
</div>
</div>
</div>
@ -43,6 +43,7 @@ import FormInput from '@c/input/FormInput.vue';
import FormSelect from '@c/input/FormSelect.vue';
import FormFile from '@c/input/FormFile.vue';
import { ref } from 'vue';
import router from '@/router';
const categoryList = ['자유', '임시', '공지사항'];
@ -51,6 +52,15 @@ const password = ref('');
const category = ref('');
const content = ref('');
const attachFiles = ref(null);
const goList = () => {
// ,
router.push('/board');
};
const write = () => {
console.log("작성");
};
</script>
<style>