bhd-components 0.11.23 → 0.11.24

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.
@@ -383,6 +383,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
383
383
  });
384
384
  }
385
385
  }
386
+ let actionNode = renderAction("node", item);
386
387
  // 是否显示时间
387
388
  let itemNode = /*#__PURE__*/ _jsx("div", {
388
389
  className: `${getCls("msgItem")} ${item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right")} ${isLast ? getCls("msgItem-last") : ""}`,
@@ -406,7 +407,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
406
407
  }),
407
408
  item.location === "left" && renderAction("floatBottom", item),
408
409
  renderReference(item),
409
- renderItemBottom && renderItemBottom(item)
410
+ renderItemBottom && renderItemBottom(item, actionNode)
410
411
  ]
411
412
  })
412
413
  });
@@ -593,6 +594,26 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
593
594
  }
594
595
  }
595
596
  let index = recordRef.current.dataSource.findIndex((ite)=>ite.id == item.id);
597
+ if (location === "node") {
598
+ if (item.id !== "helloMsg" && item.id !== "inputing") {
599
+ return /*#__PURE__*/ _jsxs("div", {
600
+ className: `${getCls("msgItem-action")}`,
601
+ children: [
602
+ /*#__PURE__*/ _jsx("div", {
603
+ className: `${getCls("msgItem-action-left")}`,
604
+ children: leftNodes
605
+ }),
606
+ /*#__PURE__*/ _jsxs("div", {
607
+ className: `${getCls("msgItem-action-right")}`,
608
+ children: [
609
+ RefreshNode,
610
+ rightNodes
611
+ ]
612
+ })
613
+ ]
614
+ });
615
+ }
616
+ }
596
617
  if (location === "bottom") {
597
618
  if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
598
619
  if (index === recordRef.current.dataSource.length - 1) {
@@ -79,7 +79,7 @@ export interface contentConfigProps {
79
79
  onSendedHelloMsg?: () => void; //发送招呼语之后
80
80
  onInit?: () => void; //组件初始化
81
81
  renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
82
- renderItemBottom?: (item: dataItemType) => React.ReactNode;
82
+ renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
83
83
  renderItemTop?: (item: dataItemType) => React.ReactNode;
84
84
  scrollOffset?: number;
85
85
  renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
@@ -391,6 +391,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
391
391
  });
392
392
  }
393
393
  }
394
+ var actionNode = renderAction("node", item);
394
395
  // 是否显示时间
395
396
  var itemNode = /*#__PURE__*/ _jsx("div", {
396
397
  className: "".concat(getCls("msgItem"), " ").concat(item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right"), " ").concat(isLast ? getCls("msgItem-last") : ""),
@@ -418,7 +419,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
418
419
  }),
419
420
  item.location === "left" && renderAction("floatBottom", item),
420
421
  renderReference(item),
421
- renderItemBottom && renderItemBottom(item)
422
+ renderItemBottom && renderItemBottom(item, actionNode)
422
423
  ]
423
424
  })
424
425
  });
@@ -609,6 +610,26 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
609
610
  var index = recordRef.current.dataSource.findIndex(function(ite) {
610
611
  return ite.id == item.id;
611
612
  });
613
+ if (location === "node") {
614
+ if (item.id !== "helloMsg" && item.id !== "inputing") {
615
+ return /*#__PURE__*/ _jsxs("div", {
616
+ className: "".concat(getCls("msgItem-action")),
617
+ children: [
618
+ /*#__PURE__*/ _jsx("div", {
619
+ className: "".concat(getCls("msgItem-action-left")),
620
+ children: leftNodes
621
+ }),
622
+ /*#__PURE__*/ _jsxs("div", {
623
+ className: "".concat(getCls("msgItem-action-right")),
624
+ children: [
625
+ RefreshNode,
626
+ rightNodes
627
+ ]
628
+ })
629
+ ]
630
+ });
631
+ }
632
+ }
612
633
  if (location === "bottom") {
613
634
  if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
614
635
  if (index === recordRef.current.dataSource.length - 1) {
@@ -79,7 +79,7 @@ export interface contentConfigProps {
79
79
  onSendedHelloMsg?: () => void; //发送招呼语之后
80
80
  onInit?: () => void; //组件初始化
81
81
  renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
82
- renderItemBottom?: (item: dataItemType) => React.ReactNode;
82
+ renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
83
83
  renderItemTop?: (item: dataItemType) => React.ReactNode;
84
84
  scrollOffset?: number;
85
85
  renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.11.23",
3
+ "version": "0.11.24",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {