bhd-components 0.9.5 → 0.9.7

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.
@@ -351,6 +351,7 @@
351
351
  .content_child {
352
352
  padding: 0;
353
353
  line-height: 1;
354
+
354
355
  p{
355
356
  word-break: break-all;
356
357
  white-space: break-spaces;
@@ -380,11 +381,73 @@
380
381
  font-weight: 600;
381
382
  }
382
383
  li > ul li {
384
+ padding-top: 8px !important;
385
+ padding-bottom: 8px;
383
386
  list-style: inside;
384
- color: rgba(0, 0, 0, 0.65);
387
+ color: rgba(0, 0, 0, 0.85);
388
+ &::marker{
389
+ color: #D9D9D9 !important;
390
+ }
391
+ }
392
+ li > ol li {
393
+ padding-top: 8px !important;
394
+ padding-bottom: 8px;
395
+ &::marker{
396
+ color: @color-text-tertiary-Tr !important;
397
+ }
398
+ }
399
+ }
400
+ // li{
401
+ // margin-top:16px;
402
+ // }
403
+ // > * + ul, > * + ol {
404
+ // margin-top:16px;
405
+ // }
406
+ // > ul + *, > ol + * {
407
+ // margin-top:16px;
408
+ // }
409
+ > *:not(pre){
410
+ padding-top: 8px;
411
+ padding-bottom: 8px;
412
+ &:first-child{
413
+ padding-top: 0 !important;
414
+ }
415
+ &:last-child{
416
+ padding-bottom: 0 !important;
385
417
  }
386
418
  }
419
+ > h3,> h4{
420
+ padding-top: 4px;
421
+ padding-bottom: 4px;
422
+ }
423
+ > p + p{
424
+ padding-top: 4px;
425
+ padding-bottom: 4px;
426
+ }
427
+ }
428
+ table {
429
+ width: 100%;
430
+ padding: 0 !important;
431
+ margin: 8px 0;
432
+ border-collapse: separate;
433
+ border-top: 1px solid #dfe6ec;
434
+ border-left: 1px solid #dfe6ec;
435
+ thead tr th {
436
+ background-color: #f8f8f9;
437
+ padding: 8px;
438
+ text-align: center;
439
+ border-bottom: 1px solid #dfe6ec;
440
+ border-right: 1px solid #dfe6ec;
441
+ }
442
+ tbody tr td {
443
+ padding: 8px;
444
+ line-height: 21px;
445
+ height: 37px;//设置单元格最小高度
446
+ border-bottom: 1px solid #dfe6ec;
447
+ border-right: 1px solid #dfe6ec;
448
+ }
387
449
  }
450
+
388
451
  pre {
389
452
  background: @color-background-fillquaternary;
390
453
  border: 1px solid @color-border-secondary-Tr;
@@ -585,6 +648,13 @@
585
648
  // }
586
649
  }
587
650
  }
651
+
652
+ &.bottom{
653
+ top:3px;
654
+ .operate{
655
+ box-shadow: 0px -4px 10px 0px rgba(0, 0, 0, 0.1);
656
+ }
657
+ }
588
658
  }
589
659
 
590
660
  }
@@ -787,11 +857,13 @@
787
857
  }
788
858
  :global{
789
859
  ::marker {
790
- font-weight: 600 !important;
860
+ // font-weight: 600 !important;
861
+ color: rgba(0, 0, 0, 0.85);
791
862
  }
792
863
  }
793
864
  ::marker {
794
- font-weight: 600 !important;
865
+ // font-weight: 600 !important;
866
+ color: rgba(0, 0, 0, 0.85);
795
867
  }
796
868
  p{
797
869
  font-weight: 400 !important;
@@ -804,6 +876,7 @@
804
876
  }
805
877
 
806
878
  }
879
+
807
880
  }
808
881
 
809
882
  .time {
@@ -867,6 +940,53 @@
867
940
  right: 0;
868
941
  }
869
942
  }
943
+ .img_con{
944
+ width: 100%;
945
+ text-align: center;
946
+ position: relative;
947
+ border-radius: 4px;
948
+ overflow: hidden;
949
+ display: inline-flex;
950
+ margin-top: 12px;
951
+ width: 240px;
952
+ max-height: 134px;
953
+ img{
954
+ width: 240px;
955
+ height: fit-content;
956
+ }
957
+ .mask_zoom{
958
+ position: absolute;
959
+ top: 0;
960
+ left: 0;
961
+
962
+ width: 100%;
963
+ height: 100%;
964
+ background-color: rgba(0, 0, 0, 0.3);
965
+ border-radius: 4px;
966
+ display: none;
967
+ align-items: center;
968
+ justify-content: center;
969
+ svg{
970
+ font-size: 20px;
971
+ color: #fff;
972
+ cursor: pointer;
973
+ }
974
+
975
+ }
976
+ &:hover{
977
+ .mask_zoom{
978
+ display: flex;
979
+ }
980
+ }
981
+ }
982
+ .img_con2{
983
+ width: 300px;
984
+ max-height: 168px;
985
+ img{
986
+ width: 300px;
987
+ height: fit-content;
988
+ }
989
+ }
870
990
  }
871
991
 
872
992
  .popover_content {
@@ -1182,6 +1302,7 @@
1182
1302
  img{
1183
1303
  margin-right: 8px;
1184
1304
  width: 60px;
1305
+ object-fit: cover;
1185
1306
  }
1186
1307
  }
1187
1308
  }
@@ -377,10 +377,71 @@
377
377
  font-weight: 600;
378
378
  }
379
379
  li > ul li {
380
+ padding-top: 8px !important;
381
+ padding-bottom: 8px;
380
382
  list-style: inside;
381
- color: rgba(0, 0, 0, 0.65);
383
+ color: rgba(0, 0, 0, 0.85);
384
+ &::marker{
385
+ color: #D9D9D9 !important;
386
+ }
387
+ }
388
+ li > ol li {
389
+ padding-top: 8px !important;
390
+ padding-bottom: 8px;
391
+ &::marker{
392
+ color: @color-text-tertiary-Tr !important;
393
+ }
394
+ }
395
+ }
396
+ // li{
397
+ // margin-top:16px;
398
+ // }
399
+ // > * + ul, > * + ol {
400
+ // margin-top:16px;
401
+ // }
402
+ // > ul + *, > ol + * {
403
+ // margin-top:16px;
404
+ // }
405
+ > *:not(pre){
406
+ padding-top: 8px;
407
+ padding-bottom: 8px;
408
+ &:first-child{
409
+ padding-top: 0 !important;
410
+ }
411
+ &:last-child{
412
+ padding-bottom: 0 !important;
382
413
  }
383
414
  }
415
+ > h3,> h4{
416
+ padding-top: 4px;
417
+ padding-bottom: 4px;
418
+ }
419
+ > p + p{
420
+ padding-top: 4px;
421
+ padding-bottom: 4px;
422
+ }
423
+ }
424
+ table {
425
+ width: 100%;
426
+ padding: 0 !important;
427
+ margin: 8px 0;
428
+ border-collapse: separate;
429
+ border-top: 1px solid #dfe6ec;
430
+ border-left: 1px solid #dfe6ec;
431
+ thead tr th {
432
+ background-color: #f8f8f9;
433
+ padding: 8px;
434
+ text-align: center;
435
+ border-bottom: 1px solid #dfe6ec;
436
+ border-right: 1px solid #dfe6ec;
437
+ }
438
+ tbody tr td {
439
+ padding: 8px;
440
+ line-height: 21px;
441
+ height: 37px;//设置单元格最小高度
442
+ border-bottom: 1px solid #dfe6ec;
443
+ border-right: 1px solid #dfe6ec;
444
+ }
384
445
  }
385
446
  pre {
386
447
  background: @color-background-fillquaternary;
@@ -582,6 +643,13 @@
582
643
  // }
583
644
  }
584
645
  }
646
+
647
+ &.bottom{
648
+ top:3px;
649
+ .operate{
650
+ box-shadow: 0px -4px 10px 0px rgba(0, 0, 0, 0.1);
651
+ }
652
+ }
585
653
  }
586
654
 
587
655
  }
@@ -785,11 +853,13 @@
785
853
  }
786
854
  :global{
787
855
  ::marker {
788
- font-weight: 600 !important;
856
+ // font-weight: 600 !important;
857
+ color: rgba(0, 0, 0, 0.85);
789
858
  }
790
859
  }
791
860
  ::marker {
792
- font-weight: 600 !important;
861
+ // font-weight: 600 !important;
862
+ color: rgba(0, 0, 0, 0.85);
793
863
  }
794
864
  p{
795
865
  font-weight: 400 !important;
@@ -865,6 +935,53 @@
865
935
  right: 0;
866
936
  }
867
937
  }
938
+ .img_con{
939
+ width: 100%;
940
+ text-align: center;
941
+ position: relative;
942
+ border-radius: 4px;
943
+ overflow: hidden;
944
+ display: inline-flex;
945
+ margin-top: 12px;
946
+ width: 240px;
947
+ max-height: 134px;
948
+ img{
949
+ width: 240px;
950
+ height: fit-content;
951
+ }
952
+ .mask_zoom{
953
+ position: absolute;
954
+ top: 0;
955
+ left: 0;
956
+
957
+ width: 100%;
958
+ height: 100%;
959
+ background-color: rgba(0, 0, 0, 0.3);
960
+ border-radius: 4px;
961
+ display: none;
962
+ align-items: center;
963
+ justify-content: center;
964
+ svg{
965
+ font-size: 20px;
966
+ color: #fff;
967
+ cursor: pointer;
968
+ }
969
+
970
+ }
971
+ &:hover{
972
+ .mask_zoom{
973
+ display: flex;
974
+ }
975
+ }
976
+ }
977
+ .img_con2{
978
+ width: 300px;
979
+ max-height: 168px;
980
+ img{
981
+ width: 300px;
982
+ height: fit-content;
983
+ }
984
+ }
868
985
  }
869
986
 
870
987
  .popover_content {
@@ -4,6 +4,7 @@ import { _ as _create_class } from "@swc/helpers/_/_create_class";
4
4
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
5
5
  import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
6
6
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
7
+ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
7
8
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
8
9
  import CreateDom from "./lib/main-entrance/CreateDom";
9
10
  // 导入截图所需样式
@@ -161,7 +162,7 @@ var ScreenShot = /*#__PURE__*/ function() {
161
162
  // 开始捕捉屏幕
162
163
  _define_property(this, "startCapture", function() {
163
164
  var _ref = _async_to_generator(function(cancelCallback) {
164
- var captureStream, mediaWidth, mediaHeight, displayConfig, err;
165
+ var captureStream, mediaWidth, mediaHeight, displayConfig, _captureStream_getVideoTracks, track, displaySurface, err;
165
166
  return _ts_generator(this, function(_state) {
166
167
  switch(_state.label){
167
168
  case 0:
@@ -194,6 +195,10 @@ var ScreenShot = /*#__PURE__*/ function() {
194
195
  width: mediaWidth,
195
196
  height: mediaHeight
196
197
  }, displayConfig),
198
+ systemAudio: "exclude",
199
+ surfaceSwitching: "exclude",
200
+ monitorTypeSurfaces: "exclude",
201
+ selfBrowserSurface: "include",
197
202
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
198
203
  // @ts-ignore
199
204
  // 当前标签页默认true true:不需要选择 false:需要自己选择
@@ -204,6 +209,18 @@ var ScreenShot = /*#__PURE__*/ function() {
204
209
  // console.log("开始捕捉屏幕", { mediaWidth, mediaHeight });
205
210
  // 捕获屏幕
206
211
  captureStream = _state.sent();
212
+ _captureStream_getVideoTracks = _sliced_to_array(captureStream.getVideoTracks(), 1), track = _captureStream_getVideoTracks[0];
213
+ displaySurface = track.getSettings().displaySurface;
214
+ // console.log('displaySurface',displaySurface)
215
+ // console.log('track',track)
216
+ if (displaySurface && displaySurface !== "window") {
217
+ track.stop();
218
+ throw {
219
+ code: -2,
220
+ msg: "请选择窗口的内容",
221
+ errorInfo: "请选择窗口的内容"
222
+ };
223
+ }
207
224
  // 将MediaStream输出至video标签
208
225
  _this1.videoController.srcObject = captureStream;
209
226
  // 储存屏幕流数据
@@ -214,16 +231,17 @@ var ScreenShot = /*#__PURE__*/ function() {
214
231
  ];
215
232
  case 3:
216
233
  err = _state.sent();
234
+ console.log("catchcatchcatch", err);
217
235
  if (cancelCallback != null) {
218
- cancelCallback({
236
+ cancelCallback(_object_spread({
219
237
  code: -1,
220
238
  msg: "浏览器不支持webrtc或者用户未授权",
221
- errorInfo: err
222
- });
239
+ errorInfo: typeof err === "string" ? err : err.errorInfo
240
+ }, err));
223
241
  }
224
242
  // 销毁截图组件
225
243
  _this1.data.destroyDOM();
226
- throw "浏览器不支持webrtc或者用户未授权( ".concat(err, " )");
244
+ throw "浏览器不支持webrtc或者用户未授权( ".concat(typeof err === "string" ? err : err.errorInfo, " )");
227
245
  case 4:
228
246
  return [
229
247
  2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.9.5",
3
+ "version": "0.9.7",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {