feat: lab04 done
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import BoardForm from '../components/Board/BoardForm.vue';
|
||||
import BoardMessage from '../components/Board/BoardMessage.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const messages = ref([]);
|
||||
|
||||
const onSubmit = (message) => {
|
||||
messages.value.push(message);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="ts-container">
|
||||
<BoardForm @new-message="onSubmit" />
|
||||
<div class="ts-content is-horizontally-fitted is-vertically-padded">
|
||||
<div class="ts-wrap is-vertical">
|
||||
<BoardMessage :message="message" v-for="message in messages" :key="message.id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user