import React from 'react'; import { IRoomItemProps } from './components/RoomItem'; import { IChatItemProps } from './components/ChatItem'; export interface IChatRoomProps { /** * 操作按钮组件 */ operationRenderProps?: (info?: any) => React.ReactNode; /** * 房间列表数据 */ roomList?: IRoomItem[]; /** * 当前房间的聊天信息 */ chatList?: IChatItem[]; /** * 如何判断当前消息是否由自己发出 */ isMeHandle: IIsMeHandle; /** * 默认选中房间 */ defaultRoomId?: string; /** * 房间改变时 触发事件 */ onChangeRoom?: IOnChangeRoom; /** * 点击发送按钮 */ onSend: IOnSend; } export declare type IOnChangeRoom = (roomId: string, rommInfo?: any) => void; export interface IRoomItem extends Omit { id: string; } export declare type IIsMeHandle = (chatItem: IChatItem) => boolean; export interface IChatItem extends Omit { id: string; /** 消息发送的时间 */ timer?: string | number; } export declare type IOnSend = (msg?: string) => Promise;