This commit is contained in:
Kasper Rynning-Tønnesen
2019-11-17 00:10:58 +01:00
parent 4aa216947a
commit 0501a7ebbb
4 changed files with 235 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
<template>
<div class="chat-input">
<input v-model="chatInput" type="text" placeholder="Aa.." @keyup.enter="send" />
<button @click="send">Send</button>
<button @click="requestHelp">Help</button>
</div>
</template>
<script>
export default {
data() {
return {
chatInput: ""
}
},
methods: {
send: function() {
if(this.chatInput == "") {
return;
}
this.$emit("sentMessage", this.chatInput);
this.chatInput = "";
},
requestHelp: function() {
console.log("emit for help here");
}
}
}
</script>
<style scoped lang="scss">
</style>