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

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> </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 {

View File

@ -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',