import type { BubbleProps } from './interface'; import React from 'react'; export interface BubbleListRef { /** * @description 滚动到列表底部的方法,用于自动滚动到最新消息 * @descriptionEn Method to scroll to the bottom of the list for auto-scrolling to latest messages */ scrollToBottom(): void; } export type BubbleDataType = BubbleProps & { key?: string | number; role?: string; id?: string; }; export interface BubbleListProps extends React.HTMLAttributes { /** * @description 气泡消息数据数组,用于渲染消息列表 * @descriptionEn Bubble message data array for rendering message list */ items?: BubbleDataType[]; /** * @description 自定义子元素,用于扩展组件功能或自定义渲染 * @descriptionEn Custom child elements for extending component functionality or custom rendering */ children?: React.ReactNode | React.ReactNode[]; /** * @description 语义化CSS类名,用于为不同区域添加自定义类名 * @descriptionEn Semantic CSS class names for adding custom classes to different areas */ classNames?: { wrapper?: string; list?: string; }; order?: 'asc' | 'desc'; /** * @description 后端分页加载更多的回调函数,提供时将开启分页模式 * @descriptionEn Callback for backend pagination load-more. When provided, pagination mode is enabled */ onLoadMore?: () => Promise; /** * @description 是否还有更多数据,配合 onLoadMore 使用 * @descriptionEn Whether there is more data, used together with onLoadMore */ noMore?: boolean; } declare const ForwardBubbleList: React.ForwardRefExoticComponent>; export default ForwardBubbleList;