| | |
| | | /> |
| | | </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> |
| | |
| | | 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('未命名会话'); |
| | |
| | | const startChat = async (valMsg) => { |
| | | chatDis.value = true; |
| | | loading.value = true; |
| | | chartLoading.value = true; |
| | | toStop = false; |
| | | sessionDetailList.value.push({ |
| | | content: valMsg, |
| | |
| | | if (typeof d !== 'boolean') { |
| | | // console.info("data:", d); |
| | | streamStr.value = d.content; |
| | | chartLoading.value = false; |
| | | startDisplayStr(); |
| | | } |
| | | } catch (e) { |
| | |
| | | if (done) { |
| | | console.info('done'); |
| | | displayedText.value = ''; |
| | | chartLoading.value = false; |
| | | if (isStopChat.value) { |
| | | setChatDataMeg(chatDataMeg); |
| | | } else { |
| | |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | :deep(.arco-spin-loading .arco-spin-mask-icon) { |
| | | left: 10%; |
| | | } |
| | | } |
| | | |
| | | .right { |