/// export type Prompt = { /** * 预设提示词 * @type { string } * @default undefined */ prompt: string; /** * 图标 * @type { string | React.ReactElement } * @default undefined */ icon?: string | React.ReactElement; /** * 标签 * @type { string } * @default undefined */ label: string; /** * 是否禁用 * @type { boolean } * @default false */ disabled?: boolean; }; export interface PromptProps { /** * 提示词列表 * @type { Prompt[] } * @default undefined */ items: Prompt[]; /** * 方向 * @type { 'horizontal' | 'vertical' } * @default 'horizontal' */ direction?: 'horizontal' | 'vertical'; /** * 是否换行 * @type { boolean } * @default false */ wrap?: boolean; /** * 自定义类名 * @type { string } * @default undefined */ className?: string; /** * 自定义样式 * @type { React.CSSProperties } * @default undefined */ style?: React.CSSProperties; /** * 点击回调 * @type { (item: Prompt) => void } * @default undefined */ onClick?: (item: Prompt) => void; /** * 自定义渲染提示项 * @type { (item: Prompt) => React.ReactNode } * @default undefined */ itemRender?: (item: Prompt) => React.ReactNode; }