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.
@@ -64,7 +64,7 @@
64
64
  font-weight: 600;
65
65
  position: relative;
66
66
  padding-left: 36px;
67
-
67
+
68
68
  i {
69
69
  padding-right: 16px;
70
70
  color: #111;
@@ -240,7 +240,7 @@
240
240
  width: 100%;
241
241
  .main {
242
242
  max-width: 80%;
243
-
243
+
244
244
  .main_content_flag{
245
245
  width: 100%;
246
246
  }
@@ -340,7 +340,7 @@
340
340
 
341
341
  .main_content {
342
342
  position: relative;
343
-
343
+
344
344
  .content {
345
345
  position: relative;
346
346
  max-width: 100%;
@@ -359,6 +359,13 @@
359
359
  color: rgba(0, 0, 0, 0.85);
360
360
  }
361
361
 
362
+ li{
363
+ margin-top: 8px;
364
+ &:first-child{
365
+ margin-top: 0;
366
+ }
367
+ }
368
+
362
369
  & > h3 {
363
370
  font-size: 16px;
364
371
  font-weight: 600;
@@ -373,25 +380,30 @@
373
380
  }
374
381
 
375
382
  li p {
376
- padding: 4px 0;
383
+ // padding: 4px 0;
377
384
  font-size: 14px;
378
385
  font-weight: 600;
379
386
  }
380
387
  li > ul li {
381
- padding-top: 8px !important;
382
- padding-bottom: 8px;
388
+ // padding-bottom: 8px;
383
389
  list-style: inside;
384
390
  color: rgba(0, 0, 0, 0.85);
385
- &::marker{
391
+ &::marker{
386
392
  color: #D9D9D9 !important;
387
393
  }
394
+ &:first-child{
395
+ padding-top: 8px !important;
396
+ }
388
397
  }
389
398
  li > ol li {
390
- padding-top: 8px !important;
391
- padding-bottom: 8px;
392
- &::marker{
399
+ // padding-bottom: 8px;
400
+ &::marker{
393
401
  color: @color-text-tertiary-Tr !important;
394
402
  }
403
+
404
+ &:first-child{
405
+ padding-top: 8px !important;
406
+ }
395
407
  }
396
408
  > li:last-of-type{
397
409
  pre{
@@ -404,7 +416,7 @@
404
416
  // }
405
417
  // > * + ul, > * + ol {
406
418
  // margin-top:16px;
407
- // }
419
+ // }
408
420
  // > ul + *, > ol + * {
409
421
  // margin-top:16px;
410
422
  // }
@@ -428,6 +440,10 @@
428
440
  }
429
441
  > pre:last-of-type{
430
442
  margin-bottom:0 ;
443
+
444
+ &+ *{
445
+ margin-top: 8px;
446
+ }
431
447
  }
432
448
  }
433
449
  table {
@@ -460,7 +476,7 @@
460
476
  padding: 12px;
461
477
  line-height: 1.5;
462
478
  margin: 4px 0;
463
- margin-bottom: 16px;
479
+ margin-bottom: 8px;
464
480
  border-radius: 0 0 4px 4px;
465
481
  }
466
482
  // 最后一行操作按钮
@@ -509,7 +525,7 @@
509
525
  color: #fff;
510
526
  }
511
527
 
512
-
528
+
513
529
  // //视频摘要内容
514
530
  // .video_abstract{
515
531
  // .title{
@@ -529,9 +545,9 @@
529
545
  // background-color: @color-background-primary-weak-hover;
530
546
  // position: absolute;
531
547
  // bottom: 0px;
532
-
548
+
533
549
  // }
534
-
550
+
535
551
  // }
536
552
  // .abstract{
537
553
  // padding: 16px 0;
@@ -705,12 +721,12 @@
705
721
  cursor: pointer;
706
722
  list-style-type: none;
707
723
  }
708
-
724
+
709
725
  }
710
-
726
+
711
727
 
712
728
  .association_problem_flag{
713
-
729
+
714
730
  li{
715
731
  padding-left: 30px;
716
732
  position: relative;
@@ -742,7 +758,7 @@
742
758
  display: inline-block;
743
759
  height: 22px;
744
760
  }
745
-
761
+
746
762
  }
747
763
  }
748
764
 
@@ -778,7 +794,7 @@
778
794
  color: #fff;
779
795
  cursor: pointer;
780
796
  }
781
-
797
+
782
798
  }
783
799
  &:hover{
784
800
  .mask_zoom{
@@ -794,7 +810,7 @@
794
810
  height: fit-content;
795
811
  }
796
812
  }
797
-
813
+
798
814
  .copyCode{
799
815
  display: flex;
800
816
  justify-content: flex-end;
@@ -830,7 +846,7 @@
830
846
  }
831
847
  :global{
832
848
  .copy_success{
833
-
849
+
834
850
  .copyCode{
835
851
  color:@color-text-primary;
836
852
  }
@@ -844,7 +860,7 @@
844
860
  }
845
861
  }
846
862
  }
847
-
863
+
848
864
  }
849
865
  p>code{
850
866
  border: none;
@@ -976,7 +992,7 @@
976
992
  color: #fff;
977
993
  cursor: pointer;
978
994
  }
979
-
995
+
980
996
  }
981
997
  &:hover{
982
998
  .mask_zoom{
@@ -1106,7 +1122,7 @@
1106
1122
  margin-bottom: 16px;
1107
1123
  line-height: 1.5;
1108
1124
  display: inline-block;
1109
-
1125
+
1110
1126
  cursor: pointer;
1111
1127
  &:hover{
1112
1128
  background-color: @color-background-primary-weak;
@@ -1152,7 +1168,7 @@
1152
1168
  background-color: #fff !important;
1153
1169
  }
1154
1170
  }
1155
-
1171
+
1156
1172
  .picture_layout{
1157
1173
  display: flex;
1158
1174
  align-items: center;
@@ -1232,7 +1248,7 @@
1232
1248
  vertical-align: middle !important;
1233
1249
  }
1234
1250
  }
1235
-
1251
+
1236
1252
  svg{
1237
1253
  color: @color-text-Tr;
1238
1254
  font-size: 20px;
@@ -1600,7 +1616,7 @@
1600
1616
  }
1601
1617
  .teacher_layout_newlabo {
1602
1618
  top: 50px;
1603
- right: 0;
1619
+ right: 0;
1604
1620
  .top{
1605
1621
  svg{
1606
1622
  transform: rotate(180deg);
@@ -1611,7 +1627,7 @@
1611
1627
  // background: @color-background-info-weak !important;
1612
1628
  background-color: #D1E4FF;
1613
1629
  }
1614
- }
1630
+ }
1615
1631
  .teacher_layout_modal {
1616
1632
  width: 328px;
1617
1633
  height: calc(100% - 48px);
@@ -1819,7 +1835,7 @@
1819
1835
  height: 36px;
1820
1836
  border-radius: 50%;
1821
1837
  margin-right: 16px;
1822
-
1838
+
1823
1839
  img{
1824
1840
  width: 36px;
1825
1841
  height: 36px;
@@ -1849,7 +1865,7 @@
1849
1865
  color: @color-text-Secondary-Tr;
1850
1866
  font-size: 14px;
1851
1867
  font-weight: 400;
1852
- line-height: 150%;
1868
+ line-height: 150%;
1853
1869
  overflow: hidden;
1854
1870
  text-overflow: ellipsis;
1855
1871
  white-space: nowrap;
@@ -1926,7 +1942,7 @@
1926
1942
  // -webkit-box-orient: vertical;
1927
1943
  // -webkit-line-clamp: 2;
1928
1944
  // display: -webkit-box;
1929
-
1945
+
1930
1946
  max-height: 21px;
1931
1947
  white-space: nowrap;
1932
1948
  span {
@@ -1980,7 +1996,7 @@
1980
1996
  .anticon {
1981
1997
  vertical-align: 0;
1982
1998
  }
1983
- .bhd-spin-nested-loading {
1999
+ .bhd-spin-nested-loading {
1984
2000
  height: calc(100% - 72px - 57px);
1985
2001
  & >div>.bhd-spin{
1986
2002
  max-height:436px;
@@ -2059,7 +2075,7 @@
2059
2075
  }
2060
2076
 
2061
2077
  }
2062
-
2078
+
2063
2079
  .screenshot_Modal_btn{
2064
2080
  position: fixed !important;
2065
2081
  z-index: 999;
@@ -2104,4 +2120,4 @@
2104
2120
  }
2105
2121
  strong {
2106
2122
  font-weight: bold !important;
2107
- }
2123
+ }
@@ -55,15 +55,24 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
55
55
  });
56
56
  _define_property(_assert_this_initialized(_this), "moveActionClose", function() {
57
57
  setTimeout(function() {
58
- var rect = document.getElementById("viewImgBody_pic").getBoundingClientRect();
59
- if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
60
- _this.setState({
61
- actionCloseFlag: 0
62
- });
63
- } else {
64
- _this.setState({
65
- actionCloseFlag: 1
66
- });
58
+ var pic = document.getElementById("viewImgBody_pic");
59
+ if (pic) {
60
+ var rect = pic.getBoundingClientRect();
61
+ if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
62
+ _this.setState({
63
+ actionCloseFlag: 0
64
+ }, function() {
65
+ var actionCloseDom = document.getElementById("actionClose");
66
+ if (actionCloseDom) {
67
+ actionCloseDom.style.top = rect.top + "px";
68
+ actionCloseDom.style.left = rect.left + rect.width + 12 + "px";
69
+ }
70
+ });
71
+ } else {
72
+ _this.setState({
73
+ actionCloseFlag: 1
74
+ });
75
+ }
67
76
  }
68
77
  }, 10);
69
78
  });
@@ -211,11 +220,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
211
220
  imgTop: "auto",
212
221
  rotateValue: 0,
213
222
  scaleValue: 100
223
+ }, function() {
224
+ _this.moveActionClose();
214
225
  });
215
226
  });
216
227
  _define_property(_assert_this_initialized(_this), "rotate", function() {
217
228
  _this.setState({
218
229
  rotateValue: _this.state.rotateValue + 90
230
+ }, function() {
231
+ _this.moveActionClose();
219
232
  });
220
233
  });
221
234
  _define_property(_assert_this_initialized(_this), "close", function() {
@@ -259,6 +272,10 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
259
272
  _this1.setState({
260
273
  imgSrc: src,
261
274
  loading: false
275
+ }, function() {
276
+ setTimeout(function() {
277
+ _this1.moveActionClose();
278
+ }, 100);
262
279
  });
263
280
  return [
264
281
  2
@@ -317,11 +334,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
317
334
  _define_property(_assert_this_initialized(_this), "imgLoad", function() {
318
335
  _this.setState({
319
336
  imgError: false
337
+ }, function() {
338
+ _this.moveActionClose();
320
339
  });
321
340
  });
322
341
  _define_property(_assert_this_initialized(_this), "imgErr", function() {
323
342
  _this.setState({
324
343
  imgError: true
344
+ }, function() {
345
+ _this.moveActionClose();
325
346
  });
326
347
  });
327
348
  return _this;
@@ -344,6 +365,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
344
365
  document.oncontextmenu = function() {
345
366
  return false;
346
367
  };
368
+ this.moveActionClose();
347
369
  }
348
370
  },
349
371
  {
@@ -430,33 +452,57 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
430
452
  color: "#FFFFFF"
431
453
  },
432
454
  children: imgSrc ? "图片加载错误" : "暂无内容"
433
- }) : /*#__PURE__*/ _jsxs("div", {
434
- onMouseDown: this.moveImg,
435
- style: {
436
- transform: "scale(".concat(scaleValue / 100, ",").concat(scaleValue / 100, ")"),
437
- left: imgLeft == "auto" ? "auto" : imgLeft + "px",
438
- top: imgTop == "auto" ? "auto" : imgTop + "px"
439
- },
440
- className: styles.viewImgBody_pic,
455
+ }) : // <div onMouseDown={this.moveImg}
456
+ // style={{
457
+ // transform: `scale(${scaleValue / 100},${
458
+ // scaleValue / 100
459
+ // })`,
460
+ // left: imgLeft == "auto" ? "auto" : imgLeft + "px",
461
+ // top: imgTop == "auto" ? "auto" : imgTop + "px",
462
+ // }}
463
+ // className={styles.viewImgBody_pic}>
464
+ // <img
465
+ // id="viewImgBody_pic"
466
+ // key="img"
467
+ // src={imgSrc}
468
+ // alt="图片加载错误"
469
+ // draggable="false"
470
+ // style={{transform:`rotate(${rotateValue}deg)`}}
471
+ // onLoad={this.imgLoad}
472
+ // onError={this.imgErr}
473
+ // />
474
+ // {
475
+ // this.state.actionCloseFlag===0&&(
476
+ // <span
477
+ // id="actionClose"
478
+ // style={{right:`calc(-40px + (-12px * (1 / ${scaleValue / 100}) ))` ,transform: `scale(calc(1 / ${scaleValue / 100}),calc(1 / ${scaleValue / 100}))`,transformOrigin: `top left`}}
479
+ // className={styles.viewImgActionClose}
480
+ // title="关闭"
481
+ // onClick={this.close}>
482
+ // <CustomClose />
483
+ // </span>
484
+ // )
485
+ // }
486
+ // </div>
487
+ /*#__PURE__*/ _jsxs(_Fragment, {
441
488
  children: [
442
489
  /*#__PURE__*/ _jsx("img", {
443
490
  id: "viewImgBody_pic",
444
491
  src: imgSrc,
445
492
  alt: "图片加载错误",
446
493
  draggable: "false",
494
+ onMouseDown: this.moveImg,
447
495
  style: {
448
- transform: "rotate(".concat(rotateValue, "deg)")
496
+ transform: "scale(".concat(scaleValue / 100, ",").concat(scaleValue / 100, ") rotate(").concat(rotateValue, "deg)"),
497
+ left: imgLeft == "auto" ? "auto" : imgLeft + "px",
498
+ top: imgTop == "auto" ? "auto" : imgTop + "px"
449
499
  },
500
+ className: styles.viewImgBody_pic,
450
501
  onLoad: this.imgLoad,
451
502
  onError: this.imgErr
452
503
  }, "img"),
453
504
  this.state.actionCloseFlag === 0 && /*#__PURE__*/ _jsx("span", {
454
505
  id: "actionClose",
455
- style: {
456
- right: "calc(-40px + (-12px * (1 / ".concat(scaleValue / 100, ") ))"),
457
- transform: "scale(calc(1 / ".concat(scaleValue / 100, "),calc(1 / ").concat(scaleValue / 100, "))"),
458
- transformOrigin: "top left"
459
- },
460
506
  className: styles.viewImgActionClose,
461
507
  title: "关闭",
462
508
  onClick: this.close,
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.9.19",
3
+ "version": "0.9.21",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {