修改评论Bug
This commit is contained in:
@@ -64,5 +64,7 @@
|
||||
padding: 2px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
p,span,div{
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
@@ -436,13 +436,13 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
if(talkVoiceObj.value.duration){
|
||||
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
||||
}else{
|
||||
if(sum === 5) {
|
||||
if(sum === 10) {
|
||||
voiceTime.value = 0 + 's'
|
||||
return
|
||||
}
|
||||
setTimeout(()=>{
|
||||
setVoiceTime(sum)
|
||||
},100)
|
||||
},200)
|
||||
}
|
||||
}
|
||||
const playQnsVoice = (readType = 'qns', item) =>{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
>按住说话
|
||||
</view>
|
||||
<view class="touch-btn" v-if="keyboardIsShow">
|
||||
<uv-input class="input-box" ref="inputRef" v-model="answerValue" maxlength="500"
|
||||
<uv-input class="input-box" ref="inputRef" v-model="answerValue" :maxlength="props.textValueLength"
|
||||
placeholderStyle='color:#999999;font-size:26rpx' placeholder="请输入文字">
|
||||
</uv-input>
|
||||
</view>
|
||||
@@ -72,6 +72,10 @@ const props = defineProps({
|
||||
default: '当前状态不能发送内容!',
|
||||
type: String
|
||||
},
|
||||
textValueLength:{
|
||||
type: Number,
|
||||
default: 500
|
||||
}
|
||||
})
|
||||
const { isDisabled, onlyVoice } = toRefs(props)
|
||||
const isLoadingState = computed(() => props.isLoading)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="answer-content">
|
||||
<view class="answer-content" v-if="props.isLoading">
|
||||
<view class="talking-cont">
|
||||
<CommonLoading color="#06f"/>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="answer-content" v-else>
|
||||
<view class="talking-cont">
|
||||
<MarkdownPreview :mdString="mdText"/>
|
||||
</view>
|
||||
@@ -39,7 +45,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, computed, ref } from 'vue'
|
||||
import { onMounted, computed, ref, watch } from 'vue'
|
||||
import MarkdownPreview from '@/components/markdown-preview/markdown-preview.vue';
|
||||
|
||||
const emit = defineEmits(['handleEvents'])
|
||||
@@ -48,10 +54,16 @@
|
||||
default: () => ({}),
|
||||
type: Object
|
||||
},
|
||||
isLoading:{
|
||||
default: false,
|
||||
type:Boolean
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.dataInfo, () => {},{deep: true,immediate: true})
|
||||
watch(() => props.isLoading, () => {},{deep: true,immediate: true})
|
||||
const mdText = computed(() => props.dataInfo?.talkingText)
|
||||
|
||||
|
||||
const reAnswer = () => {
|
||||
emit('handleEvents', 'reAnswer')
|
||||
}
|
||||
@@ -70,7 +82,10 @@
|
||||
border-radius: 15rpx;
|
||||
padding-bottom: 10rpx;
|
||||
position: relative;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
width: 100%;
|
||||
min-height: 80rpx;
|
||||
.talking-cont{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
@@ -127,10 +127,10 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
}
|
||||
const setVoiceTime = (sum) => {
|
||||
sum += 1
|
||||
if(talkVoiceObj.value.duration){
|
||||
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
||||
if(Math.ceil(talkVoiceObj.value.duration)>0){
|
||||
voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1 ) + 's'
|
||||
}else{
|
||||
if(sum === 10) {
|
||||
if(sum === 20) {
|
||||
voiceTime.value = 0 + 's'
|
||||
return
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<answerVue
|
||||
v-else-if="talkingType === 'answer'"
|
||||
:dataInfo="props.talkingInfo"
|
||||
:isLoading="!!props.talkingInfo.isLoading"
|
||||
@handleEvents="handleEvents"
|
||||
></answerVue>
|
||||
<view v-else></view>
|
||||
|
||||
@@ -251,6 +251,12 @@
|
||||
...body,
|
||||
talkingVoice: askData.value.talkingVoice
|
||||
})
|
||||
talkingList.value.push({
|
||||
type: 'answer',
|
||||
isLoading: true,
|
||||
id: _id+'loading'
|
||||
})
|
||||
scrollToBottomNow()
|
||||
return
|
||||
}
|
||||
if (commond === 'ASK-STOP') {
|
||||
@@ -266,6 +272,7 @@
|
||||
console.log('开始回答!')
|
||||
answerIsOver.value = false
|
||||
answerText.value = ''
|
||||
talkingList.value.pop()
|
||||
talkingList.value.push({
|
||||
type: 'answer',
|
||||
talkingText: answerText.value,
|
||||
|
||||
Reference in New Issue
Block a user