@crmchatreactcomponent/quick-messages 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,14 @@ import { FC } from "react";
2
2
  import { MessagesEditTableProps } from "../components/MessagesEditTable";
3
3
  import { MessagesGroupType } from "../types";
4
4
  export type MessageConfigsPanelProps = {
5
+ /**
6
+ * 快捷消息数据
7
+ */
5
8
  data: MessagesGroupType[];
9
+ /**
10
+ * 快捷消息数据改变时回调
11
+ * @param data
12
+ */
6
13
  onChange: (data: MessagesGroupType[]) => void;
7
14
  } & Pick<MessagesEditTableProps, "tableHeight" | "limitation">;
8
15
  declare const MessageConfigsPanel: FC<MessageConfigsPanelProps>;
@@ -4,6 +4,9 @@ export type MessagesEditTableProps = {
4
4
  data: MessagesRecordType[];
5
5
  onChange: (data: MessagesRecordType[]) => void;
6
6
  tableHeight?: number | string;
7
+ /**
8
+ * 字数限制
9
+ */
7
10
  limitation?: {
8
11
  title?: number;
9
12
  content?: number;
@@ -2,10 +2,26 @@ import { FC } from "react";
2
2
  import { MessageConfigsPanelProps } from "../components/MessageConfigsPanel";
3
3
  import { MessagesRecordType, SlotType } from "../types";
4
4
  export type QuickMessagesProps = {
5
+ /**
6
+ * 当快捷消息点击时回调
7
+ * @param message
8
+ */
5
9
  onSelect?: (message: MessagesRecordType) => void;
10
+ /**
11
+ * 最大显示标题长度
12
+ */
6
13
  displayTitleMaxLength?: number;
14
+ /**
15
+ * 最大显示一行多少个
16
+ */
7
17
  displayMaxLength?: number;
18
+ /**
19
+ * 快捷消息左侧 slot
20
+ */
8
21
  SlotContentPrefixSlot?: SlotType;
22
+ /**
23
+ * 快捷消息右侧 slot
24
+ */
9
25
  SlotContentSuffixSlot?: SlotType;
10
26
  } & MessageConfigsPanelProps;
11
27
  declare const QuickMessages: FC<QuickMessagesProps>;