12.15
This commit is contained in:
@@ -268,11 +268,15 @@ Component({
|
||||
|
||||
// 打开录音开关
|
||||
switchAudio() {
|
||||
wx.hideKeyboard();
|
||||
this.setData({
|
||||
isAudio: !this.data.isAudio,
|
||||
isEmoji: false,
|
||||
text: '按住说话',
|
||||
focus: false,
|
||||
message:'',
|
||||
displayFlag:'',
|
||||
sendMessageBtn:false
|
||||
});
|
||||
},
|
||||
openRecord(e,callback){
|
||||
@@ -781,6 +785,12 @@ Component({
|
||||
|
||||
},
|
||||
sendTextMessage(msg, flag) {
|
||||
if(this.data.isAudio){
|
||||
this.setData({
|
||||
isAudio:false
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!this.data.message){
|
||||
wx.showToast({
|
||||
title: '输入内容不能为空',
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<view wx:if="{{isAudio}}" class="TUI-message-input-main audio-main" bind:longpress="handleLongPress" bind:touchmove="handleTouchMove" bind:touchend="handleTouchEnd" style="display: flex; justify-content: center; font-size: 32rpx; font-family: PingFangSC-Regular; height: 30px">
|
||||
<text>{{text}}</text>
|
||||
</view>
|
||||
<view class="TUI-message-input-functions" hover-class="none" wx:if="{{!isAudio || isEmoji}}">
|
||||
<view class="TUI-message-input-functions" hover-class="none" >
|
||||
<view class="TUI-sendMessage-btn">
|
||||
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/images/emoji.png" />
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user