✌️
This commit is contained in:
parent
83fde7c131
commit
3e91159bc3
5 changed files with 43 additions and 29 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="mk-messaging-form">
|
||||
<textarea v-model="text" @keypress="onKeypress" @paste="onPaste" placeholder="%i18n:common.input-message-here%" v-autocomplete></textarea>
|
||||
<textarea v-model="text" ref="textarea" @keypress="onKeypress" @paste="onPaste" placeholder="%i18n:common.input-message-here%" v-autocomplete></textarea>
|
||||
<div class="file" v-if="file">{{ file.name }}</div>
|
||||
<mk-uploader ref="uploader"/>
|
||||
<button class="send" @click="send" :disabled="sending" title="%i18n:common.send%">
|
||||
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as autosize from 'autosize';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
data() {
|
||||
|
|
@ -27,6 +29,9 @@ export default Vue.extend({
|
|||
sending: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
autosize(this.$refs.textarea);
|
||||
},
|
||||
methods: {
|
||||
onPaste(e) {
|
||||
const data = e.clipboardData;
|
||||
|
|
@ -93,6 +98,7 @@ export default Vue.extend({
|
|||
height 64px
|
||||
margin 0
|
||||
padding 8px
|
||||
resize none
|
||||
font-size 1em
|
||||
color #000
|
||||
outline none
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue