增加语音输入不可以同时引用的限制,并处理样式
This commit is contained in:
parent
dd42b26d1f
commit
65dc8002db
@ -219,7 +219,7 @@
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; justify-content: flex-end;">
|
<div style="display: flex;" :class="item.user_id === talkParams.uid?'justify-end':'justify-start'">
|
||||||
<div class="talk-tools voice-content" v-if="item.voiceContent">
|
<div class="talk-tools voice-content" v-if="item.voiceContent">
|
||||||
<span>{{ item.voiceContent }}</span>
|
<span>{{ item.voiceContent }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -293,9 +293,9 @@
|
|||||||
<tm-image
|
<tm-image
|
||||||
:width="52"
|
:width="52"
|
||||||
:height="52"
|
:height="52"
|
||||||
|
style="margin: 10rpx 10rpx 0 0 "
|
||||||
:src="state.isUseSpeech ? keyboardIcon : microphoneIcon"
|
:src="state.isUseSpeech ? keyboardIcon : microphoneIcon"
|
||||||
@click="changeEditorMode"
|
@click="changeEditorMode"
|
||||||
style="align-self: center;"
|
|
||||||
></tm-image>
|
></tm-image>
|
||||||
<div class="flex-1 quillBox" style="">
|
<div class="flex-1 quillBox" style="">
|
||||||
<QuillEditor
|
<QuillEditor
|
||||||
@ -823,7 +823,7 @@ const state = ref({
|
|||||||
lastSelection: 0,
|
lastSelection: 0,
|
||||||
canUseQuillEditor: true, //是否可以使用quill编辑器,如果版本不支持,则使用普通输入框
|
canUseQuillEditor: true, //是否可以使用quill编辑器,如果版本不支持,则使用普通输入框
|
||||||
textAreaValue: '', //普通输入框的值
|
textAreaValue: '', //普通输入框的值
|
||||||
isUseSpeech: true, //是否使用语音输入
|
isUseSpeech: false, //是否使用语音输入
|
||||||
visibleElements: new Set(), //当前需要发送已读回执的可见元素
|
visibleElements: new Set(), //当前需要发送已读回执的可见元素
|
||||||
lastUpdateTime: 0, // 用于节流
|
lastUpdateTime: 0, // 用于节流
|
||||||
setMessageReadInterval: null, // 设置别人发出的消息,我已读的定时器
|
setMessageReadInterval: null, // 设置别人发出的消息,我已读的定时器
|
||||||
@ -948,6 +948,10 @@ const handleHidePanel = () => {
|
|||||||
//切换键盘输入/语音输入
|
//切换键盘输入/语音输入
|
||||||
const changeEditorMode = () => {
|
const changeEditorMode = () => {
|
||||||
state.value.isUseSpeech = !state.value.isUseSpeech
|
state.value.isUseSpeech = !state.value.isUseSpeech
|
||||||
|
if(state.value.isUseSpeech){
|
||||||
|
//如果切换为语音输入,则删除引用
|
||||||
|
state.value.quoteInfo = null
|
||||||
|
}
|
||||||
handleHidePanel()
|
handleHidePanel()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1445,6 +1449,9 @@ const multipleChoose = (item) => {
|
|||||||
|
|
||||||
const actionCite = (item) => {
|
const actionCite = (item) => {
|
||||||
console.log('引用')
|
console.log('引用')
|
||||||
|
if(state.value.isUseSpeech){
|
||||||
|
state.value.isUseSpeech = false
|
||||||
|
}
|
||||||
state.value.quoteInfo = item
|
state.value.quoteInfo = item
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2698,6 +2705,11 @@ const convertText = (msgItem) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//语音输入框高度
|
||||||
|
const chatInputHeight = computed(() => {
|
||||||
|
console.error(rpxToPx(72) + 'px', 'chatInputHeight')
|
||||||
|
return rpxToPx(72) + 'px'
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.dialog-page {
|
.dialog-page {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
hover-start-time="200"
|
hover-start-time="200"
|
||||||
hover-stay-time="150"
|
hover-stay-time="150"
|
||||||
:style="[
|
:style="[
|
||||||
btnStyle,
|
{ ...btnStyle, height: chatInputHeight },
|
||||||
{
|
{
|
||||||
'--btn-hover-fontcolor': btnHoverFontcolor,
|
'--btn-hover-fontcolor': btnHoverFontcolor,
|
||||||
'--btn-hover-bgcolor': btnHoverBgcolor,
|
'--btn-hover-bgcolor': btnHoverBgcolor,
|
||||||
@ -189,7 +189,7 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return {
|
return {
|
||||||
width: 'calc(100% - 26rpx)',
|
width: 'calc(100% - 26rpx)',
|
||||||
height: '32px',
|
height: '32px', // 使用默认值
|
||||||
borderRadius: '8rpx',
|
borderRadius: '8rpx',
|
||||||
backgroundColor: '#F9F9F9',
|
backgroundColor: '#F9F9F9',
|
||||||
border: '1rpx solid whitesmoke',
|
border: '1rpx solid whitesmoke',
|
||||||
|
Loading…
Reference in New Issue
Block a user