| | |
| | | </template> |
| | | |
| | | <script setup lang="ts" name="UserMsg"> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { AnswerState, answerTypeMapCom, roleImageMap, type ChatMessage } from '../model/types'; |
| | | import { isSharePage } from '/@/stores/chatRoom'; |
| | | import { onClickOutside, useClipboard } from '@vueuse/core'; |
| | | |
| | | const emit = defineEmits<{ |
| | | (event: 'copyMsg', msgObj: ChatMessage): void; |
| | |
| | | type: Object, |
| | | }, |
| | | }); |
| | | const { copy } = useClipboard(); |
| | | |
| | | //用户复制问题 |
| | | const copyUserClick = (item) => { |
| | | emit('copyMsg', item); |
| | | const text = item.content.values; |
| | | copy(text); |
| | | ElMessage.success('复制成功'); |
| | | }; |
| | | //用户问题设置为常用语 |
| | | const setCommonQuestionClick = (item) => { |