bhd-components 0.9.6 → 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.
@@ -377,13 +377,17 @@
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
383
  color: rgba(0, 0, 0, 0.85);
382
384
  &::marker{
383
385
  color: #D9D9D9 !important;
384
386
  }
385
387
  }
386
- li > ol li {
388
+ li > ol li {
389
+ padding-top: 8px !important;
390
+ padding-bottom: 8px;
387
391
  &::marker{
388
392
  color: @color-text-tertiary-Tr !important;
389
393
  }
@@ -398,6 +402,46 @@
398
402
  // > ul + *, > ol + * {
399
403
  // margin-top:16px;
400
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;
413
+ }
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
+ }
401
445
  }
402
446
  pre {
403
447
  background: @color-background-fillquaternary;
@@ -599,6 +643,13 @@
599
643
  // }
600
644
  }
601
645
  }
646
+
647
+ &.bottom{
648
+ top:3px;
649
+ .operate{
650
+ box-shadow: 0px -4px 10px 0px rgba(0, 0, 0, 0.1);
651
+ }
652
+ }
602
653
  }
603
654
 
604
655
  }
@@ -884,6 +935,53 @@
884
935
  right: 0;
885
936
  }
886
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
+ }
887
985
  }
888
986
 
889
987
  .popover_content {
@@ -782,26 +782,43 @@ class ScreenShot {
782
782
  width: mediaWidth,
783
783
  height: mediaHeight
784
784
  }, displayConfig),
785
+ systemAudio: "exclude",
786
+ surfaceSwitching: "exclude",
787
+ monitorTypeSurfaces: "exclude",
788
+ selfBrowserSurface: "include",
785
789
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
786
790
  // @ts-ignore
787
791
  // 当前标签页默认true true:不需要选择 false:需要自己选择
788
792
  preferCurrentTab: this.curTabState
789
793
  });
794
+ const [track] = captureStream.getVideoTracks();
795
+ const displaySurface = track.getSettings().displaySurface;
796
+ // console.log('displaySurface',displaySurface)
797
+ // console.log('track',track)
798
+ if (displaySurface && displaySurface !== 'window') {
799
+ track.stop();
800
+ throw {
801
+ code: -2,
802
+ msg: '请选择窗口的内容',
803
+ errorInfo: '请选择窗口的内容'
804
+ };
805
+ }
790
806
  // 将MediaStream输出至video标签
791
807
  this.videoController.srcObject = captureStream;
792
808
  // 储存屏幕流数据
793
809
  this.captureStream = captureStream;
794
810
  } catch (err) {
811
+ console.log('catchcatchcatch', err);
795
812
  if (cancelCallback != null) {
796
- cancelCallback({
813
+ cancelCallback(_object_spread({
797
814
  code: -1,
798
815
  msg: "浏览器不支持webrtc或者用户未授权",
799
- errorInfo: err
800
- });
816
+ errorInfo: typeof err === 'string' ? err : err.errorInfo
817
+ }, err));
801
818
  }
802
819
  // 销毁截图组件
803
820
  this.data.destroyDOM();
804
- throw `浏览器不支持webrtc或者用户未授权( ${err} )`;
821
+ throw `浏览器不支持webrtc或者用户未授权( ${typeof err === 'string' ? err : err.errorInfo} )`;
805
822
  }
806
823
  return captureStream;
807
824
  });
@@ -3,7 +3,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
3
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
5
5
  import * as React from "react";
6
- import { useState, useLayoutEffect, useRef } from "react";
6
+ import { useState, useEffect, useLayoutEffect, useRef } from "react";
7
7
  import styles from "./index.module.less";
8
8
  import TitleBar from "../titleBar";
9
9
  import Pagination from "../pagination";
@@ -31,8 +31,11 @@ function BhdAppLayout(props) {
31
31
  var otherHeadRef = useRef(null);
32
32
  var otherContentRef = useRef(null);
33
33
  var filterRef = useRef(null);
34
- useLayoutEffect(function() {
35
- windowChange();
34
+ useEffect(function() {
35
+ window.addEventListener("resize", windowChange);
36
+ return function() {
37
+ window.removeEventListener("resize", windowChange);
38
+ };
36
39
  }, []);
37
40
  useLayoutEffect(function() {
38
41
  windowChange();
@@ -43,7 +46,7 @@ function BhdAppLayout(props) {
43
46
  (_otherContentRef = otherContentRef) === null || _otherContentRef === void 0 ? void 0 : (_otherContentRef_current = _otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight
44
47
  ]);
45
48
  return /*#__PURE__*/ _jsxs("div", {
46
- className: "".concat(styles.bhd_app_layout, " ").concat(styles.className, " ").concat(className || ""),
49
+ className: "".concat(styles.bhd_app_layout, " ").concat(className || ""),
47
50
  children: [
48
51
  /*#__PURE__*/ _jsx("header", {
49
52
  ref: headRef,