bhd-components 0.7.28 → 0.7.30

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.
@@ -136,9 +136,11 @@ const getBase64Image = (src)=>{
136
136
  const formatDate = (dateStr)=>{
137
137
  const today = new Date();
138
138
  const date = new Date(dateStr);
139
+ let isSameDay = today.getFullYear() === date.getFullYear() && today.getMonth() === date.getMonth() && today.getDate() === date.getDate();
139
140
  const dayDiff = Math.ceil((today - date) / (1000 * 60 * 60 * 24)); // 计算天数差
141
+ // 判断当前的日期 是否于传入的日期为同一天 同一天则显示时间 不是同一天则判断是否超过一周
140
142
  // console.log(dayDiff,'dayDiffdayDiff',today,'___',date);
141
- if (dayDiff === 0 || dayDiff === 1) {
143
+ if (isSameDay) {
142
144
  // 今天
143
145
  return date.toLocaleTimeString('zh-CN', {
144
146
  hour12: false
@@ -2659,11 +2659,11 @@ const CustomerService = (props)=>{
2659
2659
  children: [
2660
2660
  /*#__PURE__*/ _jsxs("p", {
2661
2661
  onClick: ()=>{
2662
- sendScreenshotData('讲解图片里的知识点;');
2662
+ sendScreenshotData('讲解图片里的知识点');
2663
2663
  },
2664
2664
  children: [
2665
2665
  /*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
2666
- "讲解图片里的知识点;"
2666
+ "讲解图片里的知识点"
2667
2667
  ]
2668
2668
  }),
2669
2669
  /*#__PURE__*/ _jsx("br", {}),
@@ -778,6 +778,13 @@
778
778
  padding: 0 2px;
779
779
  }
780
780
  li{
781
+ &>code{
782
+ border: none;
783
+ background-color: @color-background-fillsecondary-Tr;
784
+ border-radius: 2px;
785
+ color: #000;
786
+ padding: 0 2px;
787
+ }
781
788
  :global{
782
789
  ::marker {
783
790
  font-weight: 600 !important;
@@ -766,6 +766,13 @@
766
766
  }
767
767
  }
768
768
  }
769
+ code{
770
+ border: none;
771
+ background-color: @color-background-fillsecondary-Tr;
772
+ border-radius: 2px;
773
+ color: #000;
774
+ padding: 0 2px;
775
+ }
769
776
  }
770
777
  p>code{
771
778
  border: none;
@@ -140,9 +140,11 @@ var getBase64Image = function(src) {
140
140
  var formatDate = function(dateStr) {
141
141
  var today = new Date();
142
142
  var date = new Date(dateStr);
143
+ var isSameDay = today.getFullYear() === date.getFullYear() && today.getMonth() === date.getMonth() && today.getDate() === date.getDate();
143
144
  var dayDiff = Math.ceil((today - date) / (1000 * 60 * 60 * 24)); // 计算天数差
145
+ // 判断当前的日期 是否于传入的日期为同一天 同一天则显示时间 不是同一天则判断是否超过一周
144
146
  // console.log(dayDiff,'dayDiffdayDiff',today,'___',date);
145
- if (dayDiff === 0 || dayDiff === 1) {
147
+ if (isSameDay) {
146
148
  // 今天
147
149
  return date.toLocaleTimeString("zh-CN", {
148
150
  hour12: false
@@ -2714,11 +2714,11 @@ var CustomerService = function(props) {
2714
2714
  children: [
2715
2715
  /*#__PURE__*/ _jsxs("p", {
2716
2716
  onClick: function() {
2717
- sendScreenshotData("讲解图片里的知识点;");
2717
+ sendScreenshotData("讲解图片里的知识点");
2718
2718
  },
2719
2719
  children: [
2720
2720
  /*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
2721
- "讲解图片里的知识点;"
2721
+ "讲解图片里的知识点"
2722
2722
  ]
2723
2723
  }),
2724
2724
  /*#__PURE__*/ _jsx("br", {}),
@@ -778,6 +778,13 @@
778
778
  padding: 0 2px;
779
779
  }
780
780
  li{
781
+ &>code{
782
+ border: none;
783
+ background-color: @color-background-fillsecondary-Tr;
784
+ border-radius: 2px;
785
+ color: #000;
786
+ padding: 0 2px;
787
+ }
781
788
  :global{
782
789
  ::marker {
783
790
  font-weight: 600 !important;
@@ -766,6 +766,13 @@
766
766
  }
767
767
  }
768
768
  }
769
+ code{
770
+ border: none;
771
+ background-color: @color-background-fillsecondary-Tr;
772
+ border-radius: 2px;
773
+ color: #000;
774
+ padding: 0 2px;
775
+ }
769
776
  }
770
777
  p>code{
771
778
  border: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.7.28",
3
+ "version": "0.7.30",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",