/** * @author linhd * @date 2023/11/27 13:52 * @description 快捷回复 */ import React, { FunctionComponent } from 'react'; import QuickReplyCode from "./QuickReplyCode"; import './index.scss'; export interface QuickReplyCodeListProps { label?: string; value?: string; [name: string]: any; } export interface QuickReplyCodeProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 行唯一key,默认id */ rowKey?: string; /** 显示值key, 默认label */ labelKey?: string; /** 每行值的key,默认label */ valueKey?: string; /** 列表选项 */ list?: QuickReplyCodeListProps[]; /** 提示语 */ placeholder?: string; /** 添加 */ add?: boolean; /** 输入框长度限制 */ limitLength?: number; /** 编辑 */ edit?: boolean; /** 删除 */ del?: boolean; /** 排序 */ sort?: boolean; /** 宽度,默认440px */ width?: number | string; /** 最小高度,默认200px */ minHeight?: number | string; /** 最大高度,默认320px */ maxHeight?: number | string; /** 改变list */ onChange?: (arr: QuickReplyCodeListProps[]) => void; /** 选择list */ onSelect?: (item: QuickReplyCodeListProps) => void; /** 删除 */ onShowDelete?: (bol: boolean) => void; } export interface QuickReplyProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 行唯一key,默认id */ rowKey?: string; /** 显示值key, 默认label */ labelKey?: string; /** 每行值的key,默认label */ valueKey?: string; /** 列表选项 */ list?: QuickReplyCodeListProps[]; /** 输入框行 */ rows?: number; /** 值, 可控 */ value?: string; /** 默认值 不受控 */ defaultValue?: string; /** 提示语 */ placeholder?: string; /** 选择器参数 * select -> 快捷回复 * setting -> 设置 * */ quickReplyCodeProps?: (type: 'select' | 'setting') => QuickReplyCodeProps; /** 快捷回复按钮 */ renderQuickReplyBtn?: React.ReactNode; /** 改变list */ onChangeList?: (arr: QuickReplyCodeListProps[]) => void; /** 改变值 */ onChange?: (val: string) => void; } export declare const QuickReply: FunctionComponent; export { QuickReplyCode }; export default QuickReply;