|
|
@@ -291,18 +291,20 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template #content>
|
|
|
- <a-textarea
|
|
|
- readonly
|
|
|
- auto-size
|
|
|
- v-model="displayedText"
|
|
|
- :class="{ chatItemAnswer: theme === 'light' }"
|
|
|
- :style="{
|
|
|
- backgroundColor:
|
|
|
- theme === 'light' ? '#ffffff' : '#000000',
|
|
|
- }"
|
|
|
- style="border: none"
|
|
|
- >
|
|
|
- </a-textarea>
|
|
|
+ <a-spin :loading="chartLoading" dot style="width: 100%">
|
|
|
+ <a-textarea
|
|
|
+ readonly
|
|
|
+ auto-size
|
|
|
+ v-model="displayedText"
|
|
|
+ :class="{ chatItemAnswer: theme === 'light' }"
|
|
|
+ :style="{
|
|
|
+ backgroundColor:
|
|
|
+ theme === 'light' ? '#ffffff' : '#000000',
|
|
|
+ }"
|
|
|
+ style="border: none"
|
|
|
+ >
|
|
|
+ </a-textarea>
|
|
|
+ </a-spin>
|
|
|
</template>
|
|
|
|
|
|
<template #actions>
|
|
|
@@ -574,6 +576,7 @@
|
|
|
const modalObj = reactive({ add: false });
|
|
|
const dialogId = ref('');
|
|
|
const chatDis = ref(false);
|
|
|
+ const chartLoading = ref(false);
|
|
|
const loading = ref(false);
|
|
|
const agentType = ref('1');
|
|
|
const agentTitle = ref('未命名会话');
|
|
|
@@ -924,6 +927,7 @@
|
|
|
const startChat = async (valMsg) => {
|
|
|
chatDis.value = true;
|
|
|
loading.value = true;
|
|
|
+ chartLoading.value = true;
|
|
|
toStop = false;
|
|
|
sessionDetailList.value.push({
|
|
|
content: valMsg,
|
|
|
@@ -967,6 +971,7 @@
|
|
|
if (typeof d !== 'boolean') {
|
|
|
// console.info("data:", d);
|
|
|
streamStr.value = d.content;
|
|
|
+ chartLoading.value = false;
|
|
|
startDisplayStr();
|
|
|
}
|
|
|
} catch (e) {
|
|
|
@@ -975,6 +980,7 @@
|
|
|
if (done) {
|
|
|
console.info('done');
|
|
|
displayedText.value = '';
|
|
|
+ chartLoading.value = false;
|
|
|
if (isStopChat.value) {
|
|
|
setChatDataMeg(chatDataMeg);
|
|
|
} else {
|
|
|
@@ -1426,6 +1432,9 @@
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
+ :deep(.arco-spin-loading .arco-spin-mask-icon) {
|
|
|
+ left: 10%;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.right {
|