bhd-components 0.9.19 → 0.9.21

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.
@@ -25,6 +25,7 @@ class ViewImage extends React.Component {
25
25
  document.oncontextmenu = function() {
26
26
  return false;
27
27
  };
28
+ this.moveActionClose();
28
29
  }
29
30
  componentWillUnmount() {
30
31
  document.oncontextmenu = null;
@@ -104,33 +105,57 @@ class ViewImage extends React.Component {
104
105
  color: "#FFFFFF"
105
106
  },
106
107
  children: imgSrc ? "图片加载错误" : "暂无内容"
107
- }) : /*#__PURE__*/ _jsxs("div", {
108
- onMouseDown: this.moveImg,
109
- style: {
110
- transform: `scale(${scaleValue / 100},${scaleValue / 100})`,
111
- left: imgLeft == "auto" ? "auto" : imgLeft + "px",
112
- top: imgTop == "auto" ? "auto" : imgTop + "px"
113
- },
114
- className: styles.viewImgBody_pic,
108
+ }) : // <div onMouseDown={this.moveImg}
109
+ // style={{
110
+ // transform: `scale(${scaleValue / 100},${
111
+ // scaleValue / 100
112
+ // })`,
113
+ // left: imgLeft == "auto" ? "auto" : imgLeft + "px",
114
+ // top: imgTop == "auto" ? "auto" : imgTop + "px",
115
+ // }}
116
+ // className={styles.viewImgBody_pic}>
117
+ // <img
118
+ // id="viewImgBody_pic"
119
+ // key="img"
120
+ // src={imgSrc}
121
+ // alt="图片加载错误"
122
+ // draggable="false"
123
+ // style={{transform:`rotate(${rotateValue}deg)`}}
124
+ // onLoad={this.imgLoad}
125
+ // onError={this.imgErr}
126
+ // />
127
+ // {
128
+ // this.state.actionCloseFlag===0&&(
129
+ // <span
130
+ // id="actionClose"
131
+ // style={{right:`calc(-40px + (-12px * (1 / ${scaleValue / 100}) ))` ,transform: `scale(calc(1 / ${scaleValue / 100}),calc(1 / ${scaleValue / 100}))`,transformOrigin: `top left`}}
132
+ // className={styles.viewImgActionClose}
133
+ // title="关闭"
134
+ // onClick={this.close}>
135
+ // <CustomClose />
136
+ // </span>
137
+ // )
138
+ // }
139
+ // </div>
140
+ /*#__PURE__*/ _jsxs(_Fragment, {
115
141
  children: [
116
142
  /*#__PURE__*/ _jsx("img", {
117
143
  id: "viewImgBody_pic",
118
144
  src: imgSrc,
119
145
  alt: "图片加载错误",
120
146
  draggable: "false",
147
+ onMouseDown: this.moveImg,
121
148
  style: {
122
- transform: `rotate(${rotateValue}deg)`
149
+ transform: `scale(${scaleValue / 100},${scaleValue / 100}) rotate(${rotateValue}deg)`,
150
+ left: imgLeft == "auto" ? "auto" : imgLeft + "px",
151
+ top: imgTop == "auto" ? "auto" : imgTop + "px"
123
152
  },
153
+ className: styles.viewImgBody_pic,
124
154
  onLoad: this.imgLoad,
125
155
  onError: this.imgErr
126
156
  }, "img"),
127
157
  this.state.actionCloseFlag === 0 && /*#__PURE__*/ _jsx("span", {
128
158
  id: "actionClose",
129
- style: {
130
- right: `calc(-40px + (-12px * (1 / ${scaleValue / 100}) ))`,
131
- transform: `scale(calc(1 / ${scaleValue / 100}),calc(1 / ${scaleValue / 100}))`,
132
- transformOrigin: `top left`
133
- },
134
159
  className: styles.viewImgActionClose,
135
160
  title: "关闭",
136
161
  onClick: this.close,
@@ -195,15 +220,24 @@ class ViewImage extends React.Component {
195
220
  });
196
221
  _define_property(this, "moveActionClose", ()=>{
197
222
  setTimeout(()=>{
198
- const rect = document.getElementById('viewImgBody_pic').getBoundingClientRect();
199
- if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
200
- this.setState({
201
- actionCloseFlag: 0
202
- });
203
- } else {
204
- this.setState({
205
- actionCloseFlag: 1
206
- });
223
+ const pic = document.getElementById('viewImgBody_pic');
224
+ if (pic) {
225
+ const rect = pic.getBoundingClientRect();
226
+ if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
227
+ this.setState({
228
+ actionCloseFlag: 0
229
+ }, ()=>{
230
+ const actionCloseDom = document.getElementById('actionClose');
231
+ if (actionCloseDom) {
232
+ actionCloseDom.style.top = rect.top + 'px';
233
+ actionCloseDom.style.left = rect.left + rect.width + 12 + 'px';
234
+ }
235
+ });
236
+ } else {
237
+ this.setState({
238
+ actionCloseFlag: 1
239
+ });
240
+ }
207
241
  }
208
242
  }, 10);
209
243
  });
@@ -350,11 +384,15 @@ class ViewImage extends React.Component {
350
384
  imgTop: "auto",
351
385
  rotateValue: 0,
352
386
  scaleValue: 100
387
+ }, ()=>{
388
+ this.moveActionClose();
353
389
  });
354
390
  });
355
391
  _define_property(this, "rotate", ()=>{
356
392
  this.setState({
357
393
  rotateValue: this.state.rotateValue + 90
394
+ }, ()=>{
395
+ this.moveActionClose();
358
396
  });
359
397
  });
360
398
  _define_property(this, "close", ()=>{
@@ -375,6 +413,10 @@ class ViewImage extends React.Component {
375
413
  this.setState({
376
414
  imgSrc: src,
377
415
  loading: false
416
+ }, ()=>{
417
+ setTimeout(()=>{
418
+ this.moveActionClose();
419
+ }, 100);
378
420
  });
379
421
  });
380
422
  _define_property(this, "preChange", async ()=>{
@@ -390,11 +432,15 @@ class ViewImage extends React.Component {
390
432
  _define_property(this, "imgLoad", ()=>{
391
433
  this.setState({
392
434
  imgError: false
435
+ }, ()=>{
436
+ this.moveActionClose();
393
437
  });
394
438
  });
395
439
  _define_property(this, "imgErr", ()=>{
396
440
  this.setState({
397
441
  imgError: true
442
+ }, ()=>{
443
+ this.moveActionClose();
398
444
  });
399
445
  });
400
446
  }
@@ -75,19 +75,19 @@
75
75
  }
76
76
  .viewImgBody_pic {
77
77
  max-width: 80%;
78
- max-height: 80%;
78
+ max-height: 80%;
79
79
  cursor: move;
80
80
  position: absolute;
81
81
  user-select: none;
82
- img{
83
- width: 100%;
84
- height: 100%;
85
- }
82
+ // img{
83
+ // width: 100%;
84
+ // height: 100%;
85
+ // }
86
86
  }
87
87
  .viewImgActionClose{
88
88
  position: absolute;
89
- top: 0;
90
- right: -52px;
89
+ top: 40px;
90
+ right: 40px;
91
91
  display: flex;
92
92
  width: 40px;
93
93
  height: 40px;
@@ -9,6 +9,7 @@ import React, { useEffect, useState, useRef } from "react";
9
9
  import { Modal, Drawer, Input, Tooltip } from "antd";
10
10
  import message from "../message";
11
11
  import ViewImage from "../viewImage";
12
+ // import html2canvas from "html2canvas";
12
13
  import cssStyle from "./index.module.less";
13
14
  import cssStyleOnline from "./index2.module.less";
14
15
  var styles = cssStyle;
@@ -3035,6 +3036,7 @@ var CustomerService = function(props) {
3035
3036
  var disabled = false;
3036
3037
  if (!finished) {
3037
3038
  placeholder = "答案生成中,请稍后再发送...";
3039
+ disabled = false;
3038
3040
  }
3039
3041
  if (screenshotBese64) {
3040
3042
  placeholder = "在发送之前,请输入需要对这个图片做的操作...";
@@ -3138,6 +3140,9 @@ var CustomerService = function(props) {
3138
3140
  // console.log('发送内容22222',props)
3139
3141
  // console.log(roomList,roomId,'发送内容22222wewewewewewewe');
3140
3142
  if (!e.shiftKey && !e.altKey && !e.ctrlKey && keyWord.trim() != "") {
3143
+ if (!finished) {
3144
+ return;
3145
+ }
3141
3146
  e.stopPropagation();
3142
3147
  e.preventDefault();
3143
3148
  clearTimeout(timer.current);
@@ -3165,7 +3170,7 @@ var CustomerService = function(props) {
3165
3170
  onFocus: function() {
3166
3171
  onEvent(serverName + serverUrl(), "click_智能问答_输入框", "提交");
3167
3172
  },
3168
- disabled: !disabled || !finished,
3173
+ // disabled={!disabled || !finished}
3169
3174
  maxLength: 1000,
3170
3175
  id: "con_textarea"
3171
3176
  }),
@@ -3226,9 +3231,9 @@ var CustomerService = function(props) {
3226
3231
  /*#__PURE__*/ _jsx("p", {
3227
3232
  className: "".concat(styles.sending),
3228
3233
  children: /*#__PURE__*/ _jsx("i", {
3229
- className: "".concat(!disabled || keyWord.trim() == "" ? styles.disabled : ""),
3234
+ className: "".concat(!finished || keyWord.trim() == "" ? styles.disabled : ""),
3230
3235
  onClick: function() {
3231
- if (disabled && keyWord.trim() == "") return;
3236
+ if (!finished || keyWord.trim() == "") return;
3232
3237
  setCitationContent({});
3233
3238
  setButtomHei(45);
3234
3239
  if (keyWord.trim() != "") {
@@ -8,7 +8,7 @@
8
8
  // }
9
9
  // .ant-drawer-body{
10
10
  // padding: 0 !important;
11
- // }
11
+ // }
12
12
  // }
13
13
 
14
14
  .service_ChatWindow_Drawer,
@@ -67,7 +67,7 @@
67
67
  font-weight: 600;
68
68
  position: relative;
69
69
  padding-left: 36px;
70
-
70
+
71
71
  i {
72
72
  padding-right: 16px;
73
73
  color: #111;
@@ -243,7 +243,7 @@
243
243
  width: 100%;
244
244
  .main {
245
245
  max-width: 80%;
246
-
246
+
247
247
  .main_content_flag{
248
248
  width: 100%;
249
249
  }
@@ -343,7 +343,7 @@
343
343
 
344
344
  .main_content {
345
345
  position: relative;
346
-
346
+
347
347
  .content {
348
348
  position: relative;
349
349
  max-width: 100%;
@@ -363,6 +363,13 @@
363
363
  color: rgba(0, 0, 0, 0.85);
364
364
  }
365
365
 
366
+ li{
367
+ margin-top: 8px;
368
+ &:first-child{
369
+ margin-top: 0;
370
+ }
371
+ }
372
+
366
373
  & > h3 {
367
374
  font-size: 16px;
368
375
  font-weight: 600;
@@ -377,25 +384,30 @@
377
384
  }
378
385
 
379
386
  li p {
380
- padding: 4px 0;
387
+ // padding: 4px 0;
381
388
  font-size: 14px;
382
389
  font-weight: 600;
383
390
  }
384
391
  li > ul li {
385
- padding-top: 8px !important;
386
- padding-bottom: 8px;
392
+ // padding-bottom: 8px;
387
393
  list-style: inside;
388
394
  color: rgba(0, 0, 0, 0.85);
389
- &::marker{
395
+ &::marker{
390
396
  color: #D9D9D9 !important;
391
397
  }
398
+ &:first-child{
399
+ padding-top: 8px !important;
400
+ }
392
401
  }
393
- li > ol li {
394
- padding-top: 8px !important;
395
- padding-bottom: 8px;
396
- &::marker{
402
+ li > ol li {
403
+ // padding-bottom: 8px;
404
+ &::marker{
397
405
  color: @color-text-tertiary-Tr !important;
398
406
  }
407
+
408
+ &:first-child{
409
+ padding-top: 8px !important;
410
+ }
399
411
  }
400
412
  > li:last-of-type{
401
413
  pre{
@@ -408,7 +420,7 @@
408
420
  // }
409
421
  // > * + ul, > * + ol {
410
422
  // margin-top:16px;
411
- // }
423
+ // }
412
424
  // > ul + *, > ol + * {
413
425
  // margin-top:16px;
414
426
  // }
@@ -433,6 +445,10 @@
433
445
 
434
446
  > pre:last-of-type{
435
447
  margin-bottom:0 ;
448
+
449
+ &+ *{
450
+ margin-top: 8px;
451
+ }
436
452
  }
437
453
  }
438
454
  table {
@@ -466,7 +482,7 @@
466
482
  padding: 12px;
467
483
  line-height: 1.5;
468
484
  margin: 4px 0;
469
- margin-bottom: 16px;
485
+ margin-bottom: 8px;
470
486
  border-radius: 0 0 4px 4px;
471
487
  }
472
488
  // 最后一行操作按钮
@@ -515,7 +531,7 @@
515
531
  color: #fff;
516
532
  }
517
533
 
518
-
534
+
519
535
  // //视频摘要内容
520
536
  // .video_abstract{
521
537
  // .title{
@@ -535,9 +551,9 @@
535
551
  // background-color: @color-background-primary-weak-hover;
536
552
  // position: absolute;
537
553
  // bottom: 0px;
538
-
554
+
539
555
  // }
540
-
556
+
541
557
  // }
542
558
  // .abstract{
543
559
  // padding: 16px 0;
@@ -711,12 +727,12 @@
711
727
  cursor: pointer;
712
728
  list-style-type: none;
713
729
  }
714
-
730
+
715
731
  }
716
-
732
+
717
733
 
718
734
  .association_problem_flag{
719
-
735
+
720
736
  li{
721
737
  padding-left: 30px;
722
738
  position: relative;
@@ -748,7 +764,7 @@
748
764
  display: inline-block;
749
765
  height: 22px;
750
766
  }
751
-
767
+
752
768
  }
753
769
  }
754
770
 
@@ -784,7 +800,7 @@
784
800
  color: #fff;
785
801
  cursor: pointer;
786
802
  }
787
-
803
+
788
804
  }
789
805
  &:hover{
790
806
  .mask_zoom{
@@ -800,7 +816,7 @@
800
816
  height: fit-content;
801
817
  }
802
818
  }
803
-
819
+
804
820
  .copyCode{
805
821
  display: flex;
806
822
  justify-content: flex-end;
@@ -836,7 +852,7 @@
836
852
  }
837
853
  :global{
838
854
  .copy_success{
839
-
855
+
840
856
  .copyCode{
841
857
  color:@color-text-primary;
842
858
  }
@@ -887,7 +903,7 @@
887
903
  }
888
904
 
889
905
  }
890
-
906
+
891
907
  }
892
908
 
893
909
  .time {
@@ -982,7 +998,7 @@
982
998
  color: #fff;
983
999
  cursor: pointer;
984
1000
  }
985
-
1001
+
986
1002
  }
987
1003
  &:hover{
988
1004
  .mask_zoom{
@@ -1112,7 +1128,7 @@
1112
1128
  margin-bottom: 16px;
1113
1129
  line-height: 1.5;
1114
1130
  display: inline-block;
1115
-
1131
+
1116
1132
  cursor: pointer;
1117
1133
  &:hover{
1118
1134
  background-color: @color-background-primary-weak;
@@ -1158,7 +1174,7 @@
1158
1174
  background-color: #fff !important;
1159
1175
  }
1160
1176
  }
1161
-
1177
+
1162
1178
  .picture_layout{
1163
1179
  display: flex;
1164
1180
  align-items: center;
@@ -1238,7 +1254,7 @@
1238
1254
  vertical-align: middle !important;
1239
1255
  }
1240
1256
  }
1241
-
1257
+
1242
1258
  svg{
1243
1259
  color: @color-text-Tr;
1244
1260
  font-size: 20px;
@@ -1607,7 +1623,7 @@
1607
1623
  }
1608
1624
  .teacher_layout_newlabo {
1609
1625
  top: 50px;
1610
- right: 0;
1626
+ right: 0;
1611
1627
  .top{
1612
1628
  svg{
1613
1629
  transform: rotate(180deg);
@@ -1618,7 +1634,7 @@
1618
1634
  // background: @color-background-info-weak !important;
1619
1635
  background-color: #D1E4FF;
1620
1636
  }
1621
- }
1637
+ }
1622
1638
  .teacher_layout_modal {
1623
1639
  width: 328px;
1624
1640
  height: calc(100% - 48px);
@@ -1826,7 +1842,7 @@
1826
1842
  height: 36px;
1827
1843
  border-radius: 50%;
1828
1844
  margin-right: 16px;
1829
-
1845
+
1830
1846
  img{
1831
1847
  width: 36px;
1832
1848
  height: 36px;
@@ -1856,7 +1872,7 @@
1856
1872
  color: @color-text-Secondary-Tr;
1857
1873
  font-size: 14px;
1858
1874
  font-weight: 400;
1859
- line-height: 150%;
1875
+ line-height: 150%;
1860
1876
  overflow: hidden;
1861
1877
  text-overflow: ellipsis;
1862
1878
  white-space: nowrap;
@@ -1937,7 +1953,7 @@
1937
1953
  // -webkit-box-orient: vertical;
1938
1954
  // -webkit-line-clamp: 2;
1939
1955
  // display: -webkit-box;
1940
-
1956
+
1941
1957
  max-height: 21px;
1942
1958
  white-space: nowrap;
1943
1959
  span {
@@ -1991,7 +2007,7 @@
1991
2007
  .anticon {
1992
2008
  vertical-align: 0;
1993
2009
  }
1994
- .bhd-spin-nested-loading {
2010
+ .bhd-spin-nested-loading {
1995
2011
  height: calc(100% - 72px - 57px);
1996
2012
  & >div>.bhd-spin{
1997
2013
  max-height:436px;
@@ -2024,7 +2040,7 @@
2024
2040
  // .list{
2025
2041
  // margin: 8px 16px 17px;
2026
2042
  // }
2027
-
2043
+
2028
2044
 
2029
2045
  }
2030
2046
  }
@@ -2078,7 +2094,7 @@
2078
2094
  }
2079
2095
 
2080
2096
  }
2081
-
2097
+
2082
2098
  .screenshot_Modal_btn{
2083
2099
  position: fixed !important;
2084
2100
  z-index: 999;
@@ -2124,4 +2140,4 @@
2124
2140
 
2125
2141
  strong {
2126
2142
  font-weight: bold !important;
2127
- }
2143
+ }