Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test
| | |
| | | <el-tooltip effect="dark" content="分享" placement="top"> |
| | | <div class="flex items-center justify-center size-[15px]"> |
| | | <i |
| | | :class="{ 'text-[#0284ff]': item.state === AnswerState.Unlike }" |
| | | class="p-2 ywifont ywicon-fenxiang cursor-pointer hover:text-[#0284ff] !text-[15px] hover:!text-[18px]" |
| | | @click="shareClick(item)" |
| | | /> |
| | |
| | | }; |
| | | |
| | | const { loadRangeData, onChatListScroll, moreIsLoading, nextUserMsgEndIndex } = useScrollLoad({ |
| | | isSharePage: isSharePage, |
| | | container: chatListDom, |
| | | historyGroupId: currentRouteId, |
| | | messageList, |
| | |
| | | :class="{ |
| | | 'bg-[#1677ff]': parseInt(item) === quickPickValue, |
| | | 'text-white': parseInt(item) === quickPickValue, |
| | | 'bg-[#f5f7fa]': isSharePage, |
| | | 'text-[#a9acb3]': isSharePage, |
| | | 'border-[#dcdfe6]': isSharePage, |
| | | '!cursor-not-allowed': isSharePage, |
| | | 'bg-[#f5f7fa]': disabled, |
| | | 'text-[#a9acb3]': disabled, |
| | | 'border-[#dcdfe6]': disabled, |
| | | '!cursor-not-allowed': disabled, |
| | | }" |
| | | v-for="item in Object.keys(timeRangeMapTitle)" |
| | | :key="item" |
| | |
| | | import { AnswerType, ChatContent, ChatMessage, RoleEnum, StepEnum, StepItem } from '../model/types'; |
| | | import { GetHistoryAnswer, QueryHistoryDetail, getShareChatJsonByPost } from '/@/api/ai/chat'; |
| | | import router from '/@/router'; |
| | | import { isSharePage } from '/@/stores/chatRoom'; |
| | | type UseScrollLoadOption = { |
| | | container: ShallowRef<HTMLDivElement>; |
| | | historyGroupId: string | Ref<string>; |
| | | messageList: Ref<ChatMessage[]>; |
| | | parseAnswerContent: (res: any) => ChatContent; |
| | | isSharePage: Ref<boolean>; |
| | | }; |
| | | |
| | | export const convertProcessItem = (processItem: any) => { |
| | |
| | | * @returns |
| | | */ |
| | | export const useScrollLoad = (option: UseScrollLoadOption) => { |
| | | const { container, historyGroupId, messageList, parseAnswerContent, isSharePage } = option; |
| | | const { container, historyGroupId, messageList, parseAnswerContent } = option; |
| | | const moreIsLoading = ref(false); |
| | | |
| | | /** @description 下次需要加载的用户结束索引(倒着数) */ |
| | |
| | | }); |
| | | |
| | | const msgValue = res?.values; |
| | | if (!msgValue) return undefined; |
| | | if (!msgValue) { |
| | | messageList.value = []; |
| | | return; |
| | | } |
| | | const userMsg: ChatMessage = { |
| | | historyId: msgValue.history_id, |
| | | role: RoleEnum.user, |