chat WIP
This commit is contained in:
28
client/app/components/chat/ChatEditor.vue
Normal file
28
client/app/components/chat/ChatEditor.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="chat-editor">
|
||||
<PrimeTextarea v-model="msg" />
|
||||
<PrimeButton :disabled="!msg" @click="handleSend()">
|
||||
Send
|
||||
</PrimeButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
interface Emits {
|
||||
(e: 'send', msg: string): void
|
||||
}
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
const msg = ref<string | undefined>()
|
||||
|
||||
function handleSend() {
|
||||
emit('send', msg.value!)
|
||||
|
||||
msg.value = ''
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user