增加语音输入不可以同时引用的限制,并处理样式

This commit is contained in:
wangyifeng 2025-04-23 09:55:04 +08:00
parent dd42b26d1f
commit 65dc8002db
2 changed files with 17 additions and 5 deletions

View File

@ -219,7 +219,7 @@
</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">
<span>{{ item.voiceContent }}</span>
</div>
@ -293,9 +293,9 @@
<tm-image
:width="52"
:height="52"
style="margin: 10rpx 10rpx 0 0 "
:src="state.isUseSpeech ? keyboardIcon : microphoneIcon"
@click="changeEditorMode"
style="align-self: center;"
></tm-image>
<div class="flex-1 quillBox" style="">
<QuillEditor
@ -823,7 +823,7 @@ const state = ref({
lastSelection: 0,
canUseQuillEditor: true, //使quill使
textAreaValue: '', //
isUseSpeech: true, //使
isUseSpeech: false, //使
visibleElements: new Set(), //
lastUpdateTime: 0, //
setMessageReadInterval: null, //
@ -948,6 +948,10 @@ const handleHidePanel = () => {
///
const changeEditorMode = () => {
state.value.isUseSpeech = !state.value.isUseSpeech
if(state.value.isUseSpeech){
//
state.value.quoteInfo = null
}
handleHidePanel()
}
@ -1445,6 +1449,9 @@ const multipleChoose = (item) => {
const actionCite = (item) => {
console.log('引用')
if(state.value.isUseSpeech){
state.value.isUseSpeech = false
}
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>
<style scoped lang="less">
.dialog-page {

View File

@ -14,7 +14,7 @@
hover-start-time="200"
hover-stay-time="150"
:style="[
btnStyle,
{ ...btnStyle, height: chatInputHeight },
{
'--btn-hover-fontcolor': btnHoverFontcolor,
'--btn-hover-bgcolor': btnHoverBgcolor,
@ -189,7 +189,7 @@ export default {
default() {
return {
width: 'calc(100% - 26rpx)',
height: '32px',
height: '32px', // 使
borderRadius: '8rpx',
backgroundColor: '#F9F9F9',
border: '1rpx solid whitesmoke',