bhd-components 0.11.9 → 0.11.10
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.
- package/dist/index.esm.es5.development.js +40 -24
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/virtuosoList/index.js +31 -23
- package/es2017/customerService/index.js +9 -1
- package/esm/AIMessageList/components/virtuosoList/index.js +31 -23
- package/esm/customerService/index.js +9 -1
- package/package.json +1 -1
|
@@ -10767,7 +10767,15 @@ var CustomerService = function(props) {
|
|
|
10767
10767
|
if (beforeTimeStr !== curTimeStr) {
|
|
10768
10768
|
// 跨天
|
|
10769
10769
|
// 显示日期+时间
|
|
10770
|
-
time =
|
|
10770
|
+
// time = `${timeObj.year}-${timeObj.month}-${timeObj.day} ${timeObj.hours}:${timeObj.minutes}`; //当天第一条展示年月日时分秒
|
|
10771
|
+
//判断是否当天
|
|
10772
|
+
if (curTimeStr === nowTimeStr) {
|
|
10773
|
+
// 当天,显示时间
|
|
10774
|
+
time = "".concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
10775
|
+
} else {
|
|
10776
|
+
// 非当天,显示日期+时间
|
|
10777
|
+
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
10778
|
+
}
|
|
10771
10779
|
} else {
|
|
10772
10780
|
//没有跨天 判断是否相隔超过10分钟
|
|
10773
10781
|
if (new Date(item.createdAt).valueOf() - new Date(beforeTime).valueOf() > 10 * 60 * 1000) {
|
|
@@ -15572,37 +15580,45 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15572
15580
|
var time = null;
|
|
15573
15581
|
var nowObj = parseDate(new Date().valueOf());
|
|
15574
15582
|
if (timeObj.year === nowObj.year && timeObj.month === nowObj.month && timeObj.day === nowObj.day) {
|
|
15583
|
+
// 当天显示 时分
|
|
15575
15584
|
time = "".concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15576
|
-
} else if (index === 0) {
|
|
15577
|
-
// 第一项 显示年月日 时分
|
|
15578
|
-
// time = "";
|
|
15579
|
-
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15580
15585
|
} else {
|
|
15581
|
-
//
|
|
15586
|
+
// 非当天 显示年月日 时分
|
|
15582
15587
|
var prevItem = recordRef.current.dataSource[index - 1];
|
|
15583
15588
|
if (prevItem) {
|
|
15584
15589
|
var beforeTime = prevItem.createTime;
|
|
15585
15590
|
var beforeTimeObj = parseDate(beforeTime);
|
|
15586
|
-
// 判断与上一条数据
|
|
15587
|
-
if (timeObj.
|
|
15588
|
-
// 显示 年月日 时分
|
|
15591
|
+
// 判断与上一条数据 是否超过10分钟
|
|
15592
|
+
if (timeObj.timestamp - beforeTimeObj.timestamp > 10 * 60 * 1000) {
|
|
15589
15593
|
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15590
|
-
} else {
|
|
15591
|
-
// 没有跨天 判断是否相隔超过10分钟
|
|
15592
|
-
if (timeObj.timestamp - beforeTimeObj.timestamp > 10 * 60 * 1000) {
|
|
15593
|
-
// 超过10分钟 显示
|
|
15594
|
-
var now = new Date();
|
|
15595
|
-
// 当天的日期
|
|
15596
|
-
var nowTimeStr = "".concat(now.getFullYear(), "-").concat(String(now.getMonth() + 1).padStart(2, "0"), "-").concat(String(now.getDate()).padStart(2, "0"));
|
|
15597
|
-
if (nowTimeStr === "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day)) {
|
|
15598
|
-
// 是当天 显示 时分
|
|
15599
|
-
time = "".concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15600
|
-
} else {
|
|
15601
|
-
// 不是当天 显示 年月日 时分
|
|
15602
|
-
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15603
|
-
}
|
|
15604
|
-
}
|
|
15605
15594
|
}
|
|
15595
|
+
// if (
|
|
15596
|
+
// timeObj.year !== beforeTimeObj.year ||
|
|
15597
|
+
// timeObj.month !== beforeTimeObj.month ||
|
|
15598
|
+
// timeObj.day !== beforeTimeObj.day
|
|
15599
|
+
// ) {
|
|
15600
|
+
// // 显示 年月日 时分
|
|
15601
|
+
// time = `${timeObj.year}-${timeObj.month}-${timeObj.day} ${timeObj.hours}:${timeObj.minutes}`;
|
|
15602
|
+
// } else {
|
|
15603
|
+
// // 没有跨天 判断是否相隔超过10分钟
|
|
15604
|
+
// if (timeObj.timestamp - beforeTimeObj.timestamp > 10 * 60 * 1000) {
|
|
15605
|
+
// // 超过10分钟 显示
|
|
15606
|
+
// // let now = new Date();
|
|
15607
|
+
// // // 当天的日期
|
|
15608
|
+
// // let nowTimeStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}`;
|
|
15609
|
+
// // if (
|
|
15610
|
+
// // nowTimeStr === `${timeObj.year}-${timeObj.month}-${timeObj.day}`
|
|
15611
|
+
// // ) {
|
|
15612
|
+
// // // 是当天 显示 时分
|
|
15613
|
+
// // time = `${timeObj.hours}:${timeObj.minutes}`;
|
|
15614
|
+
// // } else {
|
|
15615
|
+
// // // 不是当天 显示 年月日 时分
|
|
15616
|
+
// // time = `${timeObj.year}-${timeObj.month}-${timeObj.day} ${timeObj.hours}:${timeObj.minutes}`;
|
|
15617
|
+
// // }
|
|
15618
|
+
// }
|
|
15619
|
+
// }
|
|
15620
|
+
} else {
|
|
15621
|
+
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15606
15622
|
}
|
|
15607
15623
|
}
|
|
15608
15624
|
var result = time ? /*#__PURE__*/ jsx("div", {
|