bhd-components 0.10.25 → 0.10.27

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.
@@ -14532,6 +14532,9 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
14532
14532
  setDataSource(function(data) {
14533
14533
  return _to_consumable_array(data).concat(_to_consumable_array(list));
14534
14534
  });
14535
+ setFirstItemIndex(function(num) {
14536
+ return num + 1;
14537
+ });
14535
14538
  // timerRef.current.scrollTimer = setTimeout(() => {
14536
14539
  scrollToBottom();
14537
14540
  // }, 100);
@@ -14549,12 +14552,18 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
14549
14552
  return getList(page, pageSize).then(function(listObj) {
14550
14553
  setLoading(false);
14551
14554
  setDataSource(function(data) {
14552
- return _to_consumable_array(data).concat(_to_consumable_array(listObj.dataSource));
14555
+ return _to_consumable_array(listObj.dataSource).concat(_to_consumable_array(data));
14553
14556
  });
14554
14557
  setTotal(listObj.total);
14555
14558
  setPage(page);
14556
14559
  setPageSize(pageSize);
14557
- setFirstItemIndex(listObj.total - pageSize * (page - 1));
14560
+ if (page === 1) {
14561
+ setFirstItemIndex(listObj.total);
14562
+ } else {
14563
+ setFirstItemIndex(function(prev) {
14564
+ return prev - listObj.dataSource.length;
14565
+ });
14566
+ }
14558
14567
  });
14559
14568
  };
14560
14569
  var getCls = function(clsName) {
@@ -14848,7 +14857,10 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
14848
14857
  // 只有最后一条才显示底部操作啦 且是左侧消息 且不是招呼语
14849
14858
  }
14850
14859
  if (location === "floatTop" || location === "floatBottom") {
14851
- if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing" && index === recordRef.current.dataSource.length - 1) return null;
14860
+ if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing" && index === recordRef.current.dataSource.length - 1) // return null;
14861
+ return /*#__PURE__*/ jsx("div", {
14862
+ className: "".concat(getCls("msgItem-action-empty"))
14863
+ });
14852
14864
  // 浮框
14853
14865
  return /*#__PURE__*/ jsx("div", {
14854
14866
  className: "".concat(getCls("msgItem-action-operate")),