flat: 暂存
This commit is contained in:
@@ -43,7 +43,10 @@
|
||||
<view class="message" :class="{ messageNull: !msg.displayText }" v-else>
|
||||
<!-- {{ msg.displayText }} -->
|
||||
<view class="message-markdown">
|
||||
<md-render :content="msg.displayText"></md-render>
|
||||
<md-render
|
||||
:content="msg.displayText"
|
||||
:typing="isTyping && messages.length - 1 === index"
|
||||
></md-render>
|
||||
<view class="message-controll" v-show="showControll(index)">
|
||||
<view class="controll-left">
|
||||
<image
|
||||
@@ -99,7 +102,7 @@
|
||||
<view class="chat-item self" v-if="isRecording">
|
||||
<view class="message">{{ recognizedText }} {{ lastFinalText }}</view>
|
||||
</view>
|
||||
<view v-if="isTyping" :class="{ self: true }">
|
||||
<view v-if="isTyping" class="self">
|
||||
<text class="message msg-loading">
|
||||
<span class="ai-loading"></span>
|
||||
</text>
|
||||
@@ -107,7 +110,7 @@
|
||||
</view>
|
||||
</FadeView>
|
||||
</scroll-view>
|
||||
<view class="vio_container" :class="status" v-if="status !== 'idle'">
|
||||
<view class="vio_container" @click="handleTouchEnd" :class="status" v-if="status !== 'idle'">
|
||||
<view class="record-tip">{{ statusText }}</view>
|
||||
<WaveDisplay
|
||||
:background="audiowaveStyle"
|
||||
@@ -134,6 +137,9 @@
|
||||
@touchmove="handleTouchMove"
|
||||
@touchend="handleTouchEnd"
|
||||
@touchcancel="handleTouchCancel"
|
||||
:catchtouchstart="true"
|
||||
:catchtouchmove="true"
|
||||
:catchtouchend="true"
|
||||
v-show="isVoice"
|
||||
type="default"
|
||||
>
|
||||
@@ -250,7 +256,7 @@ const {
|
||||
lastFinalText,
|
||||
} = useAudioRecorder(config.vioceBaseURl);
|
||||
|
||||
const { speak, pause, resume, isSpeaking, isPaused } = useSpeechReader();
|
||||
const { speak, pause, resume, isSpeaking, isPaused, cancelAudio } = useSpeechReader();
|
||||
|
||||
// state
|
||||
const queries = ref([]);
|
||||
@@ -327,8 +333,6 @@ const sendMessage = (text) => {
|
||||
const callback = () => {
|
||||
const normalArr = toRaw(filesList.value); // 转换为普通数组
|
||||
filesList.value = [];
|
||||
const newMsg = { text: values, self: true, displayText: values, files: normalArr };
|
||||
useChatGroupDBStore().addMessage(newMsg);
|
||||
useChatGroupDBStore()
|
||||
.getStearm(values, normalArr, scrollToBottom, {
|
||||
onComplete: () => console.log('Display complete'),
|
||||
@@ -505,6 +509,7 @@ const handleTouchStart = async (e) => {
|
||||
if (!isAudioPermission.value) {
|
||||
return tipsPermisson();
|
||||
}
|
||||
cancelAudio();
|
||||
console.log('handleTouchStart');
|
||||
startY.value = e.touches[0].clientY;
|
||||
status.value = 'recording';
|
||||
@@ -574,11 +579,8 @@ function copyMarkdown(value) {
|
||||
|
||||
function userGoodFeedback(msg) {
|
||||
$api.msg('该功能正在开发中,敬请期待后续更新!');
|
||||
// const params = {
|
||||
// dataId: msg.dataId,
|
||||
// sessionId: msg.parentGroupId,
|
||||
// userGoodFeedback: 'no',
|
||||
// };
|
||||
console.log(msg.dataId);
|
||||
// useChatGroupDBStore().badFeedback(msg.dataId, msg.parentGroupId);
|
||||
}
|
||||
|
||||
function readMarkdown(value, index) {
|
||||
@@ -638,7 +640,6 @@ defineExpose({ scrollToBottom, closeGuess, colseFile, changeQueries, handleTouch
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
/* 过渡样式 */
|
||||
.collapse-enter-active,
|
||||
.collapse-leave-active {
|
||||
@@ -706,7 +707,7 @@ image-margin-top = 40rpx
|
||||
.chat-container
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100% - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
height: 100%;
|
||||
position: relative
|
||||
z-index: 1
|
||||
background: #FFFFFF
|
||||
@@ -795,7 +796,7 @@ image-margin-top = 40rpx
|
||||
align-items: center
|
||||
border-top: 2rpx solid #EAEAEA
|
||||
padding: 24rpx 0
|
||||
margin-top: -10rpx
|
||||
margin-top: 10rpx
|
||||
.controll-left
|
||||
.controll-right
|
||||
.controll-icon
|
||||
@@ -863,12 +864,12 @@ image-margin-top = 40rpx
|
||||
text-align: center
|
||||
font-size: 28rpx
|
||||
font-weight: 500
|
||||
user-select:none;
|
||||
-webkit-touch-callout:none;
|
||||
-webkit-user-select:none;
|
||||
-khtml-user-select:none;
|
||||
-moz-user-select:none;
|
||||
-ms-user-select:none;
|
||||
user-select:none;
|
||||
.input_vio:active
|
||||
background: #e8e8e8
|
||||
.vio_container
|
||||
|
Reference in New Issue
Block a user