bhd-components 0.11.7 → 0.11.9

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.
@@ -9545,6 +9545,10 @@ var CustomerService = function(props) {
9545
9545
  finishedRef.current = true;
9546
9546
  setFinished(true);
9547
9547
  ctrl.current.abort();
9548
+ if (handleRenderMsgTimer.current) {
9549
+ cancelAnimationFrame(handleRenderMsgTimer.current);
9550
+ handleRenderMsgTimer.current = null;
9551
+ }
9548
9552
  setHistoryMessageList(function(historyMessageList) {
9549
9553
  return historyMessageList.concat({
9550
9554
  roomId: roomId,
@@ -9657,6 +9661,10 @@ var CustomerService = function(props) {
9657
9661
  });
9658
9662
  });
9659
9663
  ctrl.current.abort();
9664
+ if (handleRenderMsgTimer.current) {
9665
+ cancelAnimationFrame(handleRenderMsgTimer.current);
9666
+ handleRenderMsgTimer.current = null;
9667
+ }
9660
9668
  }
9661
9669
  if (res.status == 200) {
9662
9670
  finishedRef.current = true;
@@ -10673,6 +10681,10 @@ var CustomerService = function(props) {
10673
10681
  try {
10674
10682
  if (ctrl && ctrl.current) {
10675
10683
  ctrl.current.abort();
10684
+ if (handleRenderMsgTimer.current) {
10685
+ cancelAnimationFrame(handleRenderMsgTimer.current);
10686
+ handleRenderMsgTimer.current = null;
10687
+ }
10676
10688
  }
10677
10689
  finishedRef.current = true;
10678
10690
  setFinished(true);
@@ -11562,6 +11574,10 @@ var CustomerService = function(props) {
11562
11574
  try {
11563
11575
  if (ctrl && ctrl.current) {
11564
11576
  ctrl.current.abort();
11577
+ if (handleRenderMsgTimer.current) {
11578
+ cancelAnimationFrame(handleRenderMsgTimer.current);
11579
+ handleRenderMsgTimer.current = null;
11580
+ }
11565
11581
  }
11566
11582
  } catch (error) {}
11567
11583
  clearTimeout(receiveMessageTimer.current);
@@ -11582,6 +11598,10 @@ var CustomerService = function(props) {
11582
11598
  try {
11583
11599
  if (ctrl && ctrl.current) {
11584
11600
  ctrl.current.abort();
11601
+ if (handleRenderMsgTimer.current) {
11602
+ cancelAnimationFrame(handleRenderMsgTimer.current);
11603
+ handleRenderMsgTimer.current = null;
11604
+ }
11585
11605
  }
11586
11606
  } catch (error) {}
11587
11607
  clearTimeout(receiveMessageTimer.current);
@@ -13508,6 +13528,12 @@ var BhdModalCropper = /*#__PURE__*/ forwardRef(function(props, ref) {
13508
13528
  }
13509
13529
  };
13510
13530
  var customRequest = function(files) {
13531
+ if (props.customRequest) {
13532
+ props.customRequest(files).then(function(src) {
13533
+ setImgSrc(src);
13534
+ });
13535
+ return;
13536
+ }
13511
13537
  var file = files.file;
13512
13538
  var flag = false;
13513
13539
  for(var i = 0; i < accept.length; i++){
@@ -13520,9 +13546,9 @@ var BhdModalCropper = /*#__PURE__*/ forwardRef(function(props, ref) {
13520
13546
  if (file.size > uploadMaxSize || !flag) {
13521
13547
  var uploadMaxSizeStr = "";
13522
13548
  if (uploadMaxSize < 1024 * 1024) {
13523
- uploadMaxSizeStr = "".concat(uploadMaxSize / 1024, "K");
13549
+ uploadMaxSizeStr = "".concat((uploadMaxSize / 1024).toFixed(0), "K");
13524
13550
  } else {
13525
- uploadMaxSizeStr = "".concat(uploadMaxSize / 1024 / 1024, "M");
13551
+ uploadMaxSizeStr = "".concat((uploadMaxSize / 1024 / 1024).toFixed(0), "M");
13526
13552
  }
13527
13553
  BhdTipModal$1.warning({
13528
13554
  title: "提示",
@@ -15544,8 +15570,11 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
15544
15570
  });
15545
15571
  var timeObj = parseDate(item.createTime);
15546
15572
  var time = null;
15547
- if (index === 0) {
15548
- // 第一项 显示年月日 时分 第一条不显示时间
15573
+ var nowObj = parseDate(new Date().valueOf());
15574
+ if (timeObj.year === nowObj.year && timeObj.month === nowObj.month && timeObj.day === nowObj.day) {
15575
+ time = "".concat(timeObj.hours, ":").concat(timeObj.minutes);
15576
+ } else if (index === 0) {
15577
+ // 第一项 显示年月日 时分
15549
15578
  // time = "";
15550
15579
  time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
15551
15580
  } else {