瀏覽代碼

fix: Fixed the issue where the conversation list was not displayed on the conversation page #2625 (#2638)

### What problem does this PR solve?

fix: Fixed the issue where the conversation list was not displayed on
the conversation page #2625

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.12.0
balibabu 1 年之前
父節點
當前提交
ff9c11c970
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 15 行新增8 行删除
  1. 6
    0
      web/src/assets/svg/plus-circle-fill.svg
  2. 0
    1
      web/src/hooks/chat-hooks.ts
  3. 9
    7
      web/src/pages/chat/index.tsx

+ 6
- 0
web/src/assets/svg/plus-circle-fill.svg 查看文件

<svg t="1727489529326" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4261"
width="200" height="200">
<path
d="M448 448H192v128h256v256h128V576h256V448H576V192H448v256z m64 576A512 512 0 1 1 512 0a512 512 0 0 1 0 1024z"
fill="#1677ff" p-id="4262"></path>
</svg>

+ 0
- 1
web/src/hooks/chat-hooks.ts 查看文件

initialData: [], initialData: [],
gcTime: 0, gcTime: 0,
refetchOnWindowFocus: false, refetchOnWindowFocus: false,
refetchOnMount: false,
queryFn: async (...params) => { queryFn: async (...params) => {
console.log('🚀 ~ queryFn: ~ params:', params); console.log('🚀 ~ queryFn: ~ params:', params);
const { data } = await chatService.listDialog(); const { data } = await chatService.listDialog();

+ 9
- 7
web/src/pages/chat/index.tsx 查看文件

import { ReactComponent as ChatAppCube } from '@/assets/svg/chat-app-cube.svg'; import { ReactComponent as ChatAppCube } from '@/assets/svg/chat-app-cube.svg';
import RenameModal from '@/components/rename-modal'; import RenameModal from '@/components/rename-modal';
import {
CloudOutlined,
DeleteOutlined,
EditOutlined,
PlusOutlined,
} from '@ant-design/icons';
import { CloudOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons';
import { import {
Avatar, Avatar,
Button, Button,
} from './hooks'; } from './hooks';


import ChatOverviewModal from '@/components/api-service/chat-overview-modal'; import ChatOverviewModal from '@/components/api-service/chat-overview-modal';
import SvgIcon from '@/components/svg-icon';
import { import {
useClickConversationCard, useClickConversationCard,
useClickDialogCard, useClickDialogCard,
<Tag>{conversationList.length}</Tag> <Tag>{conversationList.length}</Tag>
</Space> </Space>
<Tooltip title={t('newChat')}> <Tooltip title={t('newChat')}>
<PlusOutlined onClick={handleCreateTemporaryConversation} />
<div>
<SvgIcon
name="plus-circle-fill"
width={20}
onClick={handleCreateTemporaryConversation}
></SvgIcon>
</div>
</Tooltip> </Tooltip>
</Flex> </Flex>
<Divider></Divider> <Divider></Divider>

Loading…
取消
儲存