| | |
| | | :key="index" |
| | | @click="roomClick(item)" |
| | | > |
| | | <div class="ywicon icon-xiaoxi flex-0 mr-2.5"></div> |
| | | <div class="ywifont ywicon-xiaoxi1 flex-0 mr-2.5"></div> |
| | | <div class="flex-auto text-ellipsis text-nowrap text-sm group-hover:text-[#0084ff]">{{ item.title }}</div> |
| | | <div class="text-gray-100 flex items-center space-x-2 ml-1"> |
| | | <!-- <div class="ywicon invisible icon-bianji group-hover:visible !text-sm"></div> --> |
| | | <!-- <div class="ywifont invisible ywicon-bianji group-hover:visible !text-sm"></div> --> |
| | | |
| | | <el-popconfirm title="确定删除聊天记录?" @confirm.stop="confirmDeleteChatRoom(item)" width="180"> |
| | | <template #reference> |
| | | <div class="ywicon invisible icon-shanchu3 group-hover:visible"></div> |
| | | <div class="ywifont invisible ywicon-shanchu3 group-hover:visible"></div> |
| | | </template> |
| | | </el-popconfirm> |
| | | </div> |
| | |
| | | |
| | | const newChatRoomClick = async () => { |
| | | const res = await CreateHistoryGroup({ |
| | | group_title: 'chat room', |
| | | group_title: '新建对话开始', |
| | | }); |
| | | |
| | | const newRoom = { |
| | | id: res.history_group_id, |
| | | isInitial: true, |
| | | title: 'chat room', |
| | | title: '新建对话开始', |
| | | }; |
| | | if (!chatRoomList.value) { |
| | | chatRoomList.value = [newRoom]; |
| | |
| | | isInitial: Number(item.chat_count) === 0, |
| | | }; |
| | | }); |
| | | if (!chatRoomList.value || chatRoomList.value.length === 0 || !chatRoomList.value?.[0].isInitial) { |
| | | if (!chatRoomList.value || chatRoomList.value.length === 0 ) { |
| | | newChatRoomClick(); |
| | | } else { |
| | | roomClick(chatRoomList.value[0]); |