/// export type ThoughtChainItemType = Partial<{ /** * 标题 * @type { string } * @default undefined */ title: string; /** * 内容 * @type { string } * @default undefined */ children: React.ReactNode; /** * 状态 * @type { 'success' | 'error' | 'loading' | 'abort' } * @default undefined */ status: 'success' | 'error' | 'loading' | 'abort'; /** * 是否可折叠 * @type { boolean } * @default false */ collapsible: boolean; /** * 是否闪动 * @type { boolean } * @default false */ blink: boolean; /** * 样式 * @type { React.CSSProperties } * @default undefined */ style: React.CSSProperties & { [key: string]: any; }; /** * 类名 * @type { string } * @default undefined */ className: string; /** * 折叠状态变化回调 * @type { (collapsed: boolean) => void } * @default undefined * @returns { void } */ onCollapse?: (collapsed: boolean) => void; }>; export interface ThoughtChainProps { /** * 内容 * @type { ThoughtChainItemType[] } * @default undefined */ items: ThoughtChainItemType[]; /** * 是否可折叠 * @type { boolean } * @default false */ collapsible?: boolean; /** * 是否闪动 * @type { boolean } * @default false */ blink?: boolean; /** * 样式 * @type { React.CSSProperties } * @default undefined */ style?: React.CSSProperties & { [key: string]: any; }; /** * 类名 * @type { string } * @default undefined */ className?: string; /** * 折叠状态变化回调 * @type { (collapsed: boolean, item: ThoughtChainItemType) => void } * @default undefined * @returns { void } */ onCollapse?: (collapsed: boolean, item: ThoughtChainItemType) => void; }