|
@@ -3,9 +3,9 @@
|
|
|
<view class="submit">
|
|
|
<view class="submit-chat">
|
|
|
<!-- 文本框 -->
|
|
|
- <textarea cursor-spacing='20' class="chat-send btn" :show-confirm-bar="false"
|
|
|
- disable-default-padding="true" auto-height="true" @input="inputs" @focus="focus"
|
|
|
- v-model="msg"></textarea>
|
|
|
+ <textarea :confirm-hold="true" confirm-type="send" cursor-spacing='20' class="chat-send btn"
|
|
|
+ :show-confirm-bar="false" disable-default-padding="true" auto-height="true" @confirm="inputs"
|
|
|
+ @focus="focus" v-model="msg"></textarea>
|
|
|
<view class="bt-img" @tap="more">
|
|
|
<text class="iconfont icon-gengduoneirong"></text>
|
|
|
</view>
|
|
@@ -40,8 +40,7 @@
|
|
|
//文字发送
|
|
|
inputs(e) {
|
|
|
var chat = e.detail.value;
|
|
|
- var pos = chat.indexOf('\n');
|
|
|
- if (pos != -1 && chat.length > 1) {
|
|
|
+ if (chat.length > 1) {
|
|
|
// 0为表情和文字
|
|
|
let msg = this.msg.replace(/[\r\n]/g, "");
|
|
|
this.send(msg, '0')
|