wargerm 0.4.19 → 0.4.22

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.
@@ -27,6 +27,7 @@ declare class Modal extends React.PureComponent<Props> {
27
27
  destory(): void;
28
28
  } | undefined;
29
29
  static hidden: () => void;
30
+ static destory: () => void;
30
31
  renderFooter: () => JSX.Element | null;
31
32
  containerRef: React.RefObject<any>;
32
33
  titleRef: React.RefObject<any>;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ export declare enum DIRECTION {
3
+ HORIZONTAL = "horizontal",
4
+ VERTICAL = "vertical"
5
+ }
6
+ export interface ItemStyle {
7
+ position: 'absolute';
8
+ top?: number;
9
+ left: number;
10
+ width: string | number;
11
+ height?: number;
12
+ marginTop?: number;
13
+ marginLeft?: number;
14
+ marginRight?: number;
15
+ marginBottom?: number;
16
+ zIndex?: number;
17
+ }
18
+ export interface IProps {
19
+ width: number | string;
20
+ height: number | string;
21
+ itemCount: number;
22
+ itemSize: number;
23
+ renderItem(itemInfo: {
24
+ index: number;
25
+ style: ItemStyle;
26
+ }): React.ReactNode;
27
+ className?: string;
28
+ style?: React.CSSProperties;
29
+ scrollDirection?: DIRECTION;
30
+ overscanCount?: number;
31
+ scrollOffset?: number;
32
+ onScroll?(offset: number, event: Event): void;
33
+ }
34
+ declare const VirtualList: React.FC<IProps>;
35
+ export default VirtualList;
@@ -0,0 +1 @@
1
+ declare const HTML: any;
package/dist/index.css CHANGED
@@ -415,14 +415,35 @@
415
415
  font-size: 14px;
416
416
  font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
417
417
  font-weight: 400;
418
- color: #9cd0ef !important;
418
+ }
419
+ [data-prefers-color='dark'] .ant-radio-wrapper {
420
+ color: #bbdff0;
421
+ }
422
+ [data-prefers-color='dark'] .ant-radio-disabled + span {
423
+ color: rgba(255, 255, 255, 0.25);
419
424
  }
420
425
  [data-prefers-color='dark'] .ant-radio-button-wrapper {
421
- background: #1d2c4a !important;
426
+ background: rgba(81, 190, 246, 0.28) !important;
427
+ border: 1px solid #4383a4;
422
428
  font-size: 14px;
423
429
  font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
424
430
  font-weight: 400;
425
- color: #4383a4 !important;
431
+ color: #bbdff0;
432
+ }
433
+ [data-prefers-color='dark'] .ant-radio-button-wrapper:first-child {
434
+ border-left: 1px solid #4383a4;
435
+ }
436
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-disabled {
437
+ color: rgba(255, 255, 255, 0.25);
438
+ }
439
+ [data-prefers-color='dark'] .ant-radio-button-wrapper:not(:first-child)::before {
440
+ background-color: #4383a4;
441
+ }
442
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-checked {
443
+ color: rgba(21, 27, 37, 0.9) !important;
444
+ }
445
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-checked .ant-radio-button-checked {
446
+ background: #51bef6 !important;
426
447
  }
427
448
  [data-prefers-color='dark'] .ant-picker-input input::-webkit-input-placeholder {
428
449
  color: #4383a4;
@@ -655,6 +676,10 @@
655
676
  overflow: auto;
656
677
  min-height: 100px;
657
678
  }
679
+ [data-prefers-color='dark'] .autoScroll-outer {
680
+ overflow: auto;
681
+ min-height: 100px;
682
+ }
658
683
  @font-face {
659
684
  font-family: 'swiper-icons';
660
685
  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAA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UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
@@ -1441,6 +1466,15 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
1441
1466
  background: #0f6ab7;
1442
1467
  }
1443
1468
  [data-prefers-color='dark'] .videoContainer {
1469
+ min-width: 10px;
1470
+ min-height: 10px;
1471
+ width: 100%;
1472
+ height: 100%;
1473
+ display: flex;
1474
+ flex-direction: column;
1475
+ }
1476
+ [data-prefers-color='dark'] .videoContainer .videoContainer-grid {
1477
+ flex: 1;
1444
1478
  width: 100%;
1445
1479
  height: 100%;
1446
1480
  display: grid;
@@ -1921,6 +1955,10 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
1921
1955
  overflow: auto;
1922
1956
  min-height: 100px;
1923
1957
  }
1958
+ [data-prefers-color='light'] .autoScroll-outer {
1959
+ overflow: auto;
1960
+ min-height: 100px;
1961
+ }
1924
1962
  @font-face {
1925
1963
  font-family: 'swiper-icons';
1926
1964
  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYj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w3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
@@ -2856,6 +2894,15 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
2856
2894
  background: #0f6ab7;
2857
2895
  }
2858
2896
  [data-prefers-color='light'] .videoContainer {
2897
+ min-width: 10px;
2898
+ min-height: 10px;
2899
+ width: 100%;
2900
+ height: 100%;
2901
+ display: flex;
2902
+ flex-direction: column;
2903
+ }
2904
+ [data-prefers-color='light'] .videoContainer .videoContainer-grid {
2905
+ flex: 1;
2859
2906
  width: 100%;
2860
2907
  height: 100%;
2861
2908
  display: grid;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { default as WForm } from './components/WForm';
16
16
  export { default as NumericInput } from './components/NumericInput';
17
17
  export { default as Number } from './components/Number';
18
18
  export { default as CountUp } from './components/CountUp';
19
+ export { default as VirtualList } from './components/VirtualList';
19
20
  export { default as AutoScroll } from './components/AutoScroll';
20
21
  export { default as Swiper } from './components/Swiper';
21
22
  export { default as Breadcrumb } from './components/Breadcrumb';
@@ -415,14 +415,35 @@
415
415
  font-size: 14px;
416
416
  font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
417
417
  font-weight: 400;
418
- color: #9cd0ef !important;
418
+ }
419
+ [data-prefers-color='dark'] .ant-radio-wrapper {
420
+ color: #bbdff0;
421
+ }
422
+ [data-prefers-color='dark'] .ant-radio-disabled + span {
423
+ color: rgba(255, 255, 255, 0.25);
419
424
  }
420
425
  [data-prefers-color='dark'] .ant-radio-button-wrapper {
421
- background: #1d2c4a !important;
426
+ background: rgba(81, 190, 246, 0.28) !important;
427
+ border: 1px solid #4383a4;
422
428
  font-size: 14px;
423
429
  font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
424
430
  font-weight: 400;
425
- color: #4383a4 !important;
431
+ color: #bbdff0;
432
+ }
433
+ [data-prefers-color='dark'] .ant-radio-button-wrapper:first-child {
434
+ border-left: 1px solid #4383a4;
435
+ }
436
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-disabled {
437
+ color: rgba(255, 255, 255, 0.25);
438
+ }
439
+ [data-prefers-color='dark'] .ant-radio-button-wrapper:not(:first-child)::before {
440
+ background-color: #4383a4;
441
+ }
442
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-checked {
443
+ color: rgba(21, 27, 37, 0.9) !important;
444
+ }
445
+ [data-prefers-color='dark'] .ant-radio-button-wrapper-checked .ant-radio-button-checked {
446
+ background: #51bef6 !important;
426
447
  }
427
448
  [data-prefers-color='dark'] .ant-picker-input input::-webkit-input-placeholder {
428
449
  color: #4383a4;
@@ -655,6 +676,10 @@
655
676
  overflow: auto;
656
677
  min-height: 100px;
657
678
  }
679
+ [data-prefers-color='dark'] .autoScroll-outer {
680
+ overflow: auto;
681
+ min-height: 100px;
682
+ }
658
683
  @font-face {
659
684
  font-family: 'swiper-icons';
660
685
  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUG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XhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
@@ -1441,6 +1466,15 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
1441
1466
  background: #0f6ab7;
1442
1467
  }
1443
1468
  [data-prefers-color='dark'] .videoContainer {
1469
+ min-width: 10px;
1470
+ min-height: 10px;
1471
+ width: 100%;
1472
+ height: 100%;
1473
+ display: flex;
1474
+ flex-direction: column;
1475
+ }
1476
+ [data-prefers-color='dark'] .videoContainer .videoContainer-grid {
1477
+ flex: 1;
1444
1478
  width: 100%;
1445
1479
  height: 100%;
1446
1480
  display: grid;
@@ -1921,6 +1955,10 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
1921
1955
  overflow: auto;
1922
1956
  min-height: 100px;
1923
1957
  }
1958
+ [data-prefers-color='light'] .autoScroll-outer {
1959
+ overflow: auto;
1960
+ min-height: 100px;
1961
+ }
1924
1962
  @font-face {
1925
1963
  font-family: 'swiper-icons';
1926
1964
  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZ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iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
@@ -2856,6 +2894,15 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
2856
2894
  background: #0f6ab7;
2857
2895
  }
2858
2896
  [data-prefers-color='light'] .videoContainer {
2897
+ min-width: 10px;
2898
+ min-height: 10px;
2899
+ width: 100%;
2900
+ height: 100%;
2901
+ display: flex;
2902
+ flex-direction: column;
2903
+ }
2904
+ [data-prefers-color='light'] .videoContainer .videoContainer-grid {
2905
+ flex: 1;
2859
2906
  width: 100%;
2860
2907
  height: 100%;
2861
2908
  display: grid;
package/dist/index.esm.js CHANGED
@@ -8719,7 +8719,166 @@ var Index$8 = function Index(props) {
8719
8719
 
8720
8720
  Index$8.defaultProps = {};
8721
8721
 
8722
- var _excluded$a = ["list", "render", "none", "partSize"];
8722
+ var _excluded$a = ["width", "height", "itemCount", "itemSize", "renderItem", "style", "onScroll", "scrollOffset", "overscanCount", "scrollDirection"];
8723
+
8724
+ var _sizeProp, _positionProp;
8725
+ var DIRECTION;
8726
+
8727
+ (function (DIRECTION) {
8728
+ DIRECTION["HORIZONTAL"] = "horizontal";
8729
+ DIRECTION["VERTICAL"] = "vertical";
8730
+ })(DIRECTION || (DIRECTION = {}));
8731
+
8732
+ var STYLE_WRAPPER = {
8733
+ overflow: 'auto',
8734
+ willChange: 'transform',
8735
+ WebkitOverflowScrolling: 'touch'
8736
+ };
8737
+ var STYLE_INNER = {
8738
+ position: 'relative',
8739
+ minWidth: '100%',
8740
+ minHeight: '100%'
8741
+ };
8742
+ var sizeProp = (_sizeProp = {}, _defineProperty(_sizeProp, DIRECTION.VERTICAL, 'height'), _defineProperty(_sizeProp, DIRECTION.HORIZONTAL, 'width'), _sizeProp);
8743
+ var positionProp = (_positionProp = {}, _defineProperty(_positionProp, DIRECTION.VERTICAL, 'top'), _defineProperty(_positionProp, DIRECTION.HORIZONTAL, 'left'), _positionProp);
8744
+
8745
+ var VirtualList = function VirtualList(props) {
8746
+ var width = props.width,
8747
+ height = props.height,
8748
+ itemCount = props.itemCount,
8749
+ itemSize = props.itemSize,
8750
+ renderItem = props.renderItem,
8751
+ _props$style = props.style,
8752
+ style = _props$style === void 0 ? {} : _props$style,
8753
+ onScroll = props.onScroll,
8754
+ scrollOffset = props.scrollOffset,
8755
+ _props$overscanCount = props.overscanCount,
8756
+ overscanCount = _props$overscanCount === void 0 ? 3 : _props$overscanCount,
8757
+ _props$scrollDirectio = props.scrollDirection,
8758
+ scrollDirection = _props$scrollDirectio === void 0 ? DIRECTION.VERTICAL : _props$scrollDirectio,
8759
+ otherProps = _objectWithoutProperties(props, _excluded$a);
8760
+
8761
+ var rootNode = useRef(null);
8762
+
8763
+ var _useState = useState(scrollOffset || 0),
8764
+ _useState2 = _slicedToArray(_useState, 2),
8765
+ offset = _useState2[0],
8766
+ setOffset = _useState2[1];
8767
+
8768
+ var _useState3 = useState({}),
8769
+ _useState4 = _slicedToArray(_useState3, 1),
8770
+ styleCache = _useState4[0];
8771
+
8772
+ var _useState5 = useState(false),
8773
+ _useState6 = _slicedToArray(_useState5, 2),
8774
+ isMount = _useState6[0],
8775
+ setMount = _useState6[1];
8776
+
8777
+ useEffect(function () {
8778
+ var _rootNode$current;
8779
+
8780
+ if (!isMount) setMount(true); // 强制更新一次,供 getVisibleRange 方法获取 DOM 挂载后 containerSize
8781
+
8782
+ if (scrollOffset) scrollTo(scrollOffset);
8783
+ (_rootNode$current = rootNode.current) === null || _rootNode$current === void 0 ? void 0 : _rootNode$current.addEventListener('scroll', handleScroll, {
8784
+ passive: true // 用于优化浏览器页面滚动的性能
8785
+
8786
+ });
8787
+ return function () {
8788
+ var _rootNode$current2;
8789
+
8790
+ (_rootNode$current2 = rootNode.current) === null || _rootNode$current2 === void 0 ? void 0 : _rootNode$current2.removeEventListener('scroll', handleScroll);
8791
+ };
8792
+ }, []);
8793
+
8794
+ var handleScroll = function handleScroll(event) {
8795
+ var _rootNode$current3 = rootNode.current,
8796
+ _rootNode$current3$sc = _rootNode$current3.scrollTop,
8797
+ scrollTop = _rootNode$current3$sc === void 0 ? 0 : _rootNode$current3$sc,
8798
+ _rootNode$current3$sc2 = _rootNode$current3.scrollLeft,
8799
+ scrollLeft = _rootNode$current3$sc2 === void 0 ? 0 : _rootNode$current3$sc2;
8800
+ var newOffset = scrollDirection === DIRECTION.VERTICAL ? scrollTop : scrollLeft;
8801
+
8802
+ if (newOffset < 0 || newOffset === offset || event.target !== rootNode.current) {
8803
+ return;
8804
+ }
8805
+
8806
+ setOffset(newOffset);
8807
+
8808
+ if (typeof onScroll === 'function') {
8809
+ onScroll(offset, event);
8810
+ }
8811
+ };
8812
+
8813
+ var scrollTo = function scrollTo(value) {
8814
+ if (scrollDirection === DIRECTION.VERTICAL) {
8815
+ rootNode.current.scrollTop = value;
8816
+ } else {
8817
+ rootNode.current.scrollLeft = value;
8818
+ }
8819
+ };
8820
+
8821
+ var getVisibleRange = function getVisibleRange() {
8822
+ var _ref = rootNode.current || {},
8823
+ _ref$clientHeight = _ref.clientHeight,
8824
+ clientHeight = _ref$clientHeight === void 0 ? 0 : _ref$clientHeight,
8825
+ _ref$clientWidth = _ref.clientWidth,
8826
+ clientWidth = _ref$clientWidth === void 0 ? 0 : _ref$clientWidth;
8827
+
8828
+ var containerSize = scrollDirection === DIRECTION.VERTICAL ? clientHeight : clientWidth;
8829
+ var start = Math.floor(offset / itemSize - 1); // start --> 向下取整 (索引是从0开始,所以 - 1)
8830
+
8831
+ var stop = Math.ceil((offset + containerSize) / itemSize - 1); // stop --> 向上取整
8832
+
8833
+ return {
8834
+ start: Math.max(0, start - overscanCount),
8835
+ stop: Math.min(stop + overscanCount, itemCount - 1)
8836
+ };
8837
+ };
8838
+
8839
+ var getStyle = function getStyle(index) {
8840
+ var _styleCache$index;
8841
+
8842
+ var style = styleCache[index];
8843
+ if (style) return style;
8844
+ return styleCache[index] = (_styleCache$index = {
8845
+ position: 'absolute',
8846
+ top: 0,
8847
+ left: 0,
8848
+ width: '100%'
8849
+ }, _defineProperty(_styleCache$index, sizeProp[scrollDirection], props.itemSize), _defineProperty(_styleCache$index, positionProp[scrollDirection], props.itemSize * index), _styleCache$index);
8850
+ };
8851
+
8852
+ var wrapperStyle = _objectSpread2(_objectSpread2(_objectSpread2({}, STYLE_WRAPPER), style), {}, {
8853
+ height: height,
8854
+ width: width
8855
+ });
8856
+
8857
+ var innerStyle = _objectSpread2(_objectSpread2({}, STYLE_INNER), {}, _defineProperty({}, sizeProp[scrollDirection], itemCount * itemSize));
8858
+
8859
+ var items = [];
8860
+
8861
+ var _getVisibleRange = getVisibleRange(),
8862
+ start = _getVisibleRange.start,
8863
+ stop = _getVisibleRange.stop;
8864
+
8865
+ for (var index = start; index <= stop; index++) {
8866
+ items.push(renderItem({
8867
+ index: index,
8868
+ style: getStyle(index)
8869
+ }));
8870
+ }
8871
+
8872
+ return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({
8873
+ ref: rootNode
8874
+ }, otherProps), {}, {
8875
+ style: wrapperStyle
8876
+ }), /*#__PURE__*/React.createElement("div", {
8877
+ style: innerStyle
8878
+ }, items));
8879
+ };
8880
+
8881
+ var _excluded$b = ["list", "render", "none", "partSize"];
8723
8882
 
8724
8883
  function AutoScroll(props) {
8725
8884
  var inner1 = useRef();
@@ -8804,7 +8963,7 @@ var Index$9 = function Index(_ref) {
8804
8963
  none = _ref.none,
8805
8964
  _ref$partSize = _ref.partSize,
8806
8965
  partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
8807
- otherProps = _objectWithoutProperties(_ref, _excluded$a);
8966
+ otherProps = _objectWithoutProperties(_ref, _excluded$b);
8808
8967
 
8809
8968
  var _useState = useState([]),
8810
8969
  _useState2 = _slicedToArray(_useState, 2),
@@ -8887,7 +9046,7 @@ var Index$9 = function Index(_ref) {
8887
9046
  }, none || '暂无数据');
8888
9047
  };
8889
9048
 
8890
- var _excluded$b = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
9049
+ var _excluded$c = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
8891
9050
 
8892
9051
  SwiperCore.use([Pagination, Navigation, Autoplay, Virtual]);
8893
9052
 
@@ -8899,7 +9058,7 @@ var Index$a = function Index(props) {
8899
9058
  rowKey = props.rowKey,
8900
9059
  onSwiperChange = props.onSwiperChange,
8901
9060
  renderItem = props.renderItem,
8902
- extraProps = _objectWithoutProperties(props, _excluded$b);
9061
+ extraProps = _objectWithoutProperties(props, _excluded$c);
8903
9062
 
8904
9063
  var _useState = useState(null),
8905
9064
  _useState2 = _slicedToArray(_useState, 2),
@@ -9550,7 +9709,7 @@ function createBrowserHistory(props) {
9550
9709
  return history;
9551
9710
  }
9552
9711
 
9553
- var _excluded$c = ["routes", "className"];
9712
+ var _excluded$d = ["routes", "className"];
9554
9713
  var history = createBrowserHistory();
9555
9714
 
9556
9715
  function itemRender(route, params, routes, paths) {
@@ -9568,7 +9727,7 @@ function itemRender(route, params, routes, paths) {
9568
9727
  var Index$b = function Index(_ref) {
9569
9728
  var routes = _ref.routes,
9570
9729
  className = _ref.className,
9571
- props = _objectWithoutProperties(_ref, _excluded$c);
9730
+ props = _objectWithoutProperties(_ref, _excluded$d);
9572
9731
 
9573
9732
  return /*#__PURE__*/React.createElement(_Breadcrumb, _objectSpread2({
9574
9733
  className: className || 'default',
@@ -9578,7 +9737,7 @@ var Index$b = function Index(_ref) {
9578
9737
  }, props));
9579
9738
  };
9580
9739
 
9581
- var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9740
+ var _excluded$e = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9582
9741
 
9583
9742
  var Index$c = function Index(_ref, ref) {
9584
9743
  var _classNames;
@@ -9589,7 +9748,7 @@ var Index$c = function Index(_ref, ref) {
9589
9748
  headerTail = _ref.headerTail,
9590
9749
  headerCenter = _ref.headerCenter,
9591
9750
  sliderTabs = _ref.sliderTabs,
9592
- props = _objectWithoutProperties(_ref, _excluded$d);
9751
+ props = _objectWithoutProperties(_ref, _excluded$e);
9593
9752
 
9594
9753
  useImperativeHandle(ref, function () {
9595
9754
  return {
@@ -9608,13 +9767,13 @@ var Index$c = function Index(_ref, ref) {
9608
9767
  className: "container-in"
9609
9768
  }, /*#__PURE__*/React.createElement("div", {
9610
9769
  className: "container-in-border"
9611
- }, /*#__PURE__*/React.createElement("div", {
9770
+ }, title ? /*#__PURE__*/React.createElement("div", {
9612
9771
  className: "header"
9613
9772
  }, /*#__PURE__*/React.createElement("div", {
9614
9773
  className: "title"
9615
9774
  }, /*#__PURE__*/React.createElement("span", {
9616
9775
  className: "dot"
9617
- }), title), headerCenter, headerTail), /*#__PURE__*/React.createElement("div", {
9776
+ }), title), headerCenter, headerTail) : null, /*#__PURE__*/React.createElement("div", {
9618
9777
  className: "body"
9619
9778
  }, sliderTabs ? sliderTabs.components[activeTab] : props.children)), sliderTabs && /*#__PURE__*/React.createElement("div", {
9620
9779
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
@@ -9733,8 +9892,9 @@ function DialogModel(props, ref) {
9733
9892
  useEffect(function () {
9734
9893
  var containerEl = containerRef.current;
9735
9894
  var containerElWidth = containerEl.offsetWidth;
9736
- console.log(containerElWidth);
9895
+ var containerElHeight = containerEl.offsetHeight;
9737
9896
  containerEl.style.left = "calc(50% - ".concat(containerElWidth / 2, "px)");
9897
+ containerEl.style.top = "calc(50% - ".concat(containerElHeight / 2, "px)");
9738
9898
  }, [modelShow]);
9739
9899
  useEffect(function () {
9740
9900
  var containerEl = containerRef.current;
@@ -9830,7 +9990,7 @@ function DialogModel(props, ref) {
9830
9990
 
9831
9991
  var Dialog = /*#__PURE__*/React.forwardRef(DialogModel);
9832
9992
 
9833
- var _excluded$e = ["visible", "width", "closeCb", "onClose", "className", "style"],
9993
+ var _excluded$f = ["visible", "width", "closeCb", "onClose", "className", "style"],
9834
9994
  _excluded2$3 = ["visible"];
9835
9995
 
9836
9996
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
@@ -9947,7 +10107,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9947
10107
  onClose = _this$props4.onClose,
9948
10108
  className = _this$props4.className,
9949
10109
  style = _this$props4.style,
9950
- other = _objectWithoutProperties(_this$props4, _excluded$e);
10110
+ other = _objectWithoutProperties(_this$props4, _excluded$f);
9951
10111
 
9952
10112
  return /*#__PURE__*/React.createElement(Dialog, _objectSpread2({
9953
10113
  ref: this.containerRef,
@@ -9970,18 +10130,19 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9970
10130
 
9971
10131
  Modal.show = void 0;
9972
10132
  Modal.hidden = void 0;
10133
+ Modal.destory = void 0;
10134
+ var Modals = {};
9973
10135
 
9974
10136
  Modal.show = function (config) {
9975
- var ModalContainer = null;
9976
- var modelSysbol = Symbol('$$__model__Container_hidden');
9977
- if (ModalContainer) return;
10137
+ var modelSysbol = Math.random().toString(36).slice(2, 36);
10138
+ if (Modals[modelSysbol]) return;
9978
10139
 
9979
10140
  var props = _objectSpread2(_objectSpread2({}, config), {}, {
9980
10141
  visible: true
9981
10142
  });
9982
10143
 
9983
- var container = ModalContainer = document.createElement('div');
9984
- var manager = container[modelSysbol] = {
10144
+ var container = document.createElement('div');
10145
+ var manager = container[modelSysbol] = Modals[modelSysbol] = {
9985
10146
  setShow: null,
9986
10147
  mounted: false,
9987
10148
  hidden: function hidden() {
@@ -9990,8 +10151,12 @@ Modal.show = function (config) {
9990
10151
  },
9991
10152
  destory: function destory() {
9992
10153
  ReactDOM.unmountComponentAtNode(container);
9993
- document.body.removeChild(container);
9994
- ModalContainer = null;
10154
+
10155
+ if (document.body.contains(container)) {
10156
+ document.body.removeChild(container);
10157
+ }
10158
+
10159
+ delete Modals[modelSysbol];
9995
10160
  }
9996
10161
  };
9997
10162
 
@@ -10023,8 +10188,20 @@ Modal.show = function (config) {
10023
10188
  return manager;
10024
10189
  };
10025
10190
 
10026
- Modal.hidden = function () {// if (!ModalContainer) return;
10027
- // ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10191
+ Modal.hidden = function () {
10192
+ if (Object.keys(Modals).length == 0) return;
10193
+
10194
+ for (var key in Modals) {
10195
+ Modals[key].hidden();
10196
+ }
10197
+ };
10198
+
10199
+ Modal.destory = function () {
10200
+ if (Object.keys(Modals).length == 0) return;
10201
+
10202
+ for (var key in Modals) {
10203
+ Modals[key].destory();
10204
+ }
10028
10205
  };
10029
10206
 
10030
10207
  var controlShow$1 = function controlShow(f1, f2, value, timer) {
@@ -10113,7 +10290,7 @@ function DialogModel$1(props) {
10113
10290
  return renderChildren;
10114
10291
  }
10115
10292
 
10116
- var _excluded$f = ["visible"];
10293
+ var _excluded$g = ["visible"];
10117
10294
 
10118
10295
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
10119
10296
  _inherits(Modal, _React$PureComponent);
@@ -10253,7 +10430,7 @@ Modal$1.show = function (config) {
10253
10430
  manager.setShow = setShow;
10254
10431
 
10255
10432
  var visible = props.visible,
10256
- trueProps = _objectWithoutProperties(props, _excluded$f);
10433
+ trueProps = _objectWithoutProperties(props, _excluded$g);
10257
10434
 
10258
10435
  useEffect(function () {
10259
10436
  manager.mounted = true;
@@ -10277,7 +10454,7 @@ Modal$1.hidden = function () {
10277
10454
  ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10278
10455
  };
10279
10456
 
10280
- var _excluded$g = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
10457
+ var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
10281
10458
 
10282
10459
  var ModalForm = function ModalForm(props, ref) {
10283
10460
  var columns = props.columns,
@@ -10291,7 +10468,7 @@ var ModalForm = function ModalForm(props, ref) {
10291
10468
  title = props.title,
10292
10469
  record = props.record,
10293
10470
  onFormChange = props.onFormChange,
10294
- extraProps = _objectWithoutProperties(props, _excluded$g);
10471
+ extraProps = _objectWithoutProperties(props, _excluded$h);
10295
10472
 
10296
10473
  var formRef = useRef(null);
10297
10474
 
@@ -10422,7 +10599,7 @@ var ModalForm = function ModalForm(props, ref) {
10422
10599
 
10423
10600
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
10424
10601
 
10425
- var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination", "noBordered"];
10602
+ var _excluded$i = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination", "noBordered"];
10426
10603
 
10427
10604
  var TabelCard = function TabelCard(props, ref) {
10428
10605
  var columns = props.columns,
@@ -10439,7 +10616,7 @@ var TabelCard = function TabelCard(props, ref) {
10439
10616
  optionColumnConfig = props.optionColumnConfig,
10440
10617
  pagination = props.pagination,
10441
10618
  noBordered = props.noBordered,
10442
- extraProps = _objectWithoutProperties(props, _excluded$h);
10619
+ extraProps = _objectWithoutProperties(props, _excluded$i);
10443
10620
 
10444
10621
  var actionRef = useRef();
10445
10622
  var modalFormRef = useRef(null);
@@ -11112,15 +11289,9 @@ function Xgplay(_ref, fRef) {
11112
11289
  setRef = _ref.setRef;
11113
11290
  var ref = useRef(null);
11114
11291
  var playerRef = useRef(null);
11115
-
11116
- var _useState = useState(null),
11117
- _useState2 = _slicedToArray(_useState, 2),
11118
- player = _useState2[0],
11119
- setPlayer = _useState2[1];
11120
-
11121
11292
  useEffect(function () {
11122
11293
  if (ref.current) {
11123
- if (type.indexOf('hls') !== -1) {
11294
+ if ((type === null || type === void 0 ? void 0 : type.indexOf('hls')) !== -1) {
11124
11295
  playerRef.current = new HlsJsPlayer(_objectSpread2({
11125
11296
  el: ref.current,
11126
11297
  width: '100%',
@@ -11129,7 +11300,7 @@ function Xgplay(_ref, fRef) {
11129
11300
  isLive: true,
11130
11301
  autoplayMuted: true
11131
11302
  }, config));
11132
- } else if (type.indexOf('flv') !== -1) {
11303
+ } else if ((type === null || type === void 0 ? void 0 : type.indexOf('flv')) !== -1) {
11133
11304
  playerRef.current = new FlvPlayer(_objectSpread2({
11134
11305
  el: ref.current,
11135
11306
  width: '100%',
@@ -11138,7 +11309,7 @@ function Xgplay(_ref, fRef) {
11138
11309
  isLive: true,
11139
11310
  autoplayMuted: true
11140
11311
  }, config));
11141
- } else if (type.indexOf('mp4') !== -1) {
11312
+ } else if ((type === null || type === void 0 ? void 0 : type.indexOf('mp4')) !== -1) {
11142
11313
  playerRef.current = new Player(_objectSpread2({
11143
11314
  el: ref.current,
11144
11315
  width: '100%',
@@ -11203,11 +11374,7 @@ var IconFont = createFromIconfontCN({
11203
11374
  function VideoPlayer(_ref, ref) {
11204
11375
  var _ref$footer = _ref.footer,
11205
11376
  footer = _ref$footer === void 0 ? true : _ref$footer,
11206
- _ref$style = _ref.style,
11207
- style = _ref$style === void 0 ? {
11208
- width: 400,
11209
- height: 400
11210
- } : _ref$style,
11377
+ style = _ref.style,
11211
11378
  _ref$config = _ref.config,
11212
11379
  config = _ref$config === void 0 ? {} : _ref$config,
11213
11380
  layoutIndex = _ref.layoutIndex,
@@ -11251,20 +11418,25 @@ function VideoPlayer(_ref, ref) {
11251
11418
  currentLayoutIndex = _useState2[0],
11252
11419
  setCurrentLayoutIndex = _useState2[1];
11253
11420
 
11421
+ var _useState3 = useState(url),
11422
+ _useState4 = _slicedToArray(_useState3, 2),
11423
+ urls = _useState4[0],
11424
+ setUrls = _useState4[1];
11425
+
11254
11426
  var initPlayerIndex = layouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : layouts[layoutIndex || 0].span - 1;
11255
11427
 
11256
- var _useState3 = useState(initPlayerIndex),
11257
- _useState4 = _slicedToArray(_useState3, 2),
11258
- currentPlayerIndex = _useState4[0],
11259
- setCurrentPlayerIndex = _useState4[1];
11428
+ var _useState5 = useState(initPlayerIndex),
11429
+ _useState6 = _slicedToArray(_useState5, 2),
11430
+ currentPlayerIndex = _useState6[0],
11431
+ setCurrentPlayerIndex = _useState6[1];
11260
11432
 
11261
11433
  var domRef = useRef(null);
11262
11434
  var playerRef = useRef({});
11263
11435
 
11264
- var _useState5 = useState([]),
11265
- _useState6 = _slicedToArray(_useState5, 2),
11266
- players = _useState6[0],
11267
- setPlayers = _useState6[1];
11436
+ var _useState7 = useState([]),
11437
+ _useState8 = _slicedToArray(_useState7, 2),
11438
+ players = _useState8[0],
11439
+ setPlayers = _useState8[1];
11268
11440
 
11269
11441
  var renderDom = useMemo(function () {
11270
11442
  var arr = new Array(layouts[currentLayoutIndex].span).fill(0);
@@ -11275,16 +11447,16 @@ function VideoPlayer(_ref, ref) {
11275
11447
  onClickCapture: function onClickCapture() {
11276
11448
  setCurrentPlayerIndex(index);
11277
11449
  }
11278
- }, url[index] ? /*#__PURE__*/React.createElement(Xgplay$1, {
11450
+ }, urls[index] ? /*#__PURE__*/React.createElement(Xgplay$1, {
11279
11451
  setRef: function setRef(ref) {
11280
11452
  return setPlayers(function (players) {
11281
11453
  players[index] = ref;
11282
11454
  return players;
11283
11455
  });
11284
11456
  },
11285
- type: url[index],
11457
+ type: urls[index],
11286
11458
  config: _objectSpread2({
11287
- url: url[index],
11459
+ url: urls[index],
11288
11460
  fluid: true
11289
11461
  }, config)
11290
11462
  }) : /*#__PURE__*/React.createElement("div", {
@@ -11297,7 +11469,7 @@ function VideoPlayer(_ref, ref) {
11297
11469
  }
11298
11470
  }));
11299
11471
  });
11300
- }, [currentLayoutIndex, currentPlayerIndex, playerRef, url]);
11472
+ }, [currentLayoutIndex, currentPlayerIndex, playerRef, urls]);
11301
11473
 
11302
11474
  function exitFullscreen() {
11303
11475
  if (document.exitFullscreen) {
@@ -11324,10 +11496,13 @@ function VideoPlayer(_ref, ref) {
11324
11496
  var currentPlayer = players[currentPlayerIndex];
11325
11497
 
11326
11498
  if (currentPlayer) {
11327
- console.log(currentPlayer, 'currentPlayer');
11328
- currentPlayer.src = url; // debugger
11329
- // currentPlayer.start(url)
11499
+ currentPlayer.src = url;
11330
11500
  }
11501
+
11502
+ setUrls(function (urls) {
11503
+ urls[currentPlayerIndex] = url;
11504
+ return _toConsumableArray(urls);
11505
+ });
11331
11506
  };
11332
11507
 
11333
11508
  useImperativeHandle(ref, function () {
@@ -11335,14 +11510,16 @@ function VideoPlayer(_ref, ref) {
11335
11510
  players: players,
11336
11511
  currentLayoutIndex: currentLayoutIndex,
11337
11512
  currentPlayerIndex: currentPlayerIndex,
11513
+ urls: urls,
11338
11514
  loadCamera: loadCamera
11339
11515
  };
11340
11516
  });
11341
11517
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
11518
+ className: "videoContainer",
11342
11519
  style: style
11343
11520
  }, /*#__PURE__*/React.createElement("div", {
11344
11521
  ref: domRef,
11345
- className: "videoContainer",
11522
+ className: "videoContainer-grid",
11346
11523
  style: layouts[currentLayoutIndex].style
11347
11524
  }, renderDom), footer ? /*#__PURE__*/React.createElement("div", {
11348
11525
  className: "tools"
@@ -11364,4 +11541,4 @@ function VideoPlayer(_ref, ref) {
11364
11541
 
11365
11542
  var index$3 = /*#__PURE__*/forwardRef(VideoPlayer);
11366
11543
 
11367
- export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, index$1 as Card, WCascader as Cascader, Index$3 as Checkbox, Index$8 as CountUp, Index$1 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$7 as Number, NumericInput, Index$2 as Radio, Select, Index$a as Swiper, WSwitch as Switch, index$2 as TabelCard, Table, Index$6 as TreeSelect, index$3 as VideoPlayer, Index$5 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
11544
+ export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, index$1 as Card, WCascader as Cascader, Index$3 as Checkbox, Index$8 as CountUp, Index$1 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$7 as Number, NumericInput, Index$2 as Radio, Select, Index$a as Swiper, WSwitch as Switch, index$2 as TabelCard, Table, Index$6 as TreeSelect, index$3 as VideoPlayer, VirtualList, Index$5 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
package/dist/index.js CHANGED
@@ -8757,7 +8757,166 @@ var Index$8 = function Index(props) {
8757
8757
 
8758
8758
  Index$8.defaultProps = {};
8759
8759
 
8760
- var _excluded$a = ["list", "render", "none", "partSize"];
8760
+ var _excluded$a = ["width", "height", "itemCount", "itemSize", "renderItem", "style", "onScroll", "scrollOffset", "overscanCount", "scrollDirection"];
8761
+
8762
+ var _sizeProp, _positionProp;
8763
+ var DIRECTION;
8764
+
8765
+ (function (DIRECTION) {
8766
+ DIRECTION["HORIZONTAL"] = "horizontal";
8767
+ DIRECTION["VERTICAL"] = "vertical";
8768
+ })(DIRECTION || (DIRECTION = {}));
8769
+
8770
+ var STYLE_WRAPPER = {
8771
+ overflow: 'auto',
8772
+ willChange: 'transform',
8773
+ WebkitOverflowScrolling: 'touch'
8774
+ };
8775
+ var STYLE_INNER = {
8776
+ position: 'relative',
8777
+ minWidth: '100%',
8778
+ minHeight: '100%'
8779
+ };
8780
+ var sizeProp = (_sizeProp = {}, _defineProperty(_sizeProp, DIRECTION.VERTICAL, 'height'), _defineProperty(_sizeProp, DIRECTION.HORIZONTAL, 'width'), _sizeProp);
8781
+ var positionProp = (_positionProp = {}, _defineProperty(_positionProp, DIRECTION.VERTICAL, 'top'), _defineProperty(_positionProp, DIRECTION.HORIZONTAL, 'left'), _positionProp);
8782
+
8783
+ var VirtualList = function VirtualList(props) {
8784
+ var width = props.width,
8785
+ height = props.height,
8786
+ itemCount = props.itemCount,
8787
+ itemSize = props.itemSize,
8788
+ renderItem = props.renderItem,
8789
+ _props$style = props.style,
8790
+ style = _props$style === void 0 ? {} : _props$style,
8791
+ onScroll = props.onScroll,
8792
+ scrollOffset = props.scrollOffset,
8793
+ _props$overscanCount = props.overscanCount,
8794
+ overscanCount = _props$overscanCount === void 0 ? 3 : _props$overscanCount,
8795
+ _props$scrollDirectio = props.scrollDirection,
8796
+ scrollDirection = _props$scrollDirectio === void 0 ? DIRECTION.VERTICAL : _props$scrollDirectio,
8797
+ otherProps = _objectWithoutProperties(props, _excluded$a);
8798
+
8799
+ var rootNode = React.useRef(null);
8800
+
8801
+ var _useState = React.useState(scrollOffset || 0),
8802
+ _useState2 = _slicedToArray(_useState, 2),
8803
+ offset = _useState2[0],
8804
+ setOffset = _useState2[1];
8805
+
8806
+ var _useState3 = React.useState({}),
8807
+ _useState4 = _slicedToArray(_useState3, 1),
8808
+ styleCache = _useState4[0];
8809
+
8810
+ var _useState5 = React.useState(false),
8811
+ _useState6 = _slicedToArray(_useState5, 2),
8812
+ isMount = _useState6[0],
8813
+ setMount = _useState6[1];
8814
+
8815
+ React.useEffect(function () {
8816
+ var _rootNode$current;
8817
+
8818
+ if (!isMount) setMount(true); // 强制更新一次,供 getVisibleRange 方法获取 DOM 挂载后 containerSize
8819
+
8820
+ if (scrollOffset) scrollTo(scrollOffset);
8821
+ (_rootNode$current = rootNode.current) === null || _rootNode$current === void 0 ? void 0 : _rootNode$current.addEventListener('scroll', handleScroll, {
8822
+ passive: true // 用于优化浏览器页面滚动的性能
8823
+
8824
+ });
8825
+ return function () {
8826
+ var _rootNode$current2;
8827
+
8828
+ (_rootNode$current2 = rootNode.current) === null || _rootNode$current2 === void 0 ? void 0 : _rootNode$current2.removeEventListener('scroll', handleScroll);
8829
+ };
8830
+ }, []);
8831
+
8832
+ var handleScroll = function handleScroll(event) {
8833
+ var _rootNode$current3 = rootNode.current,
8834
+ _rootNode$current3$sc = _rootNode$current3.scrollTop,
8835
+ scrollTop = _rootNode$current3$sc === void 0 ? 0 : _rootNode$current3$sc,
8836
+ _rootNode$current3$sc2 = _rootNode$current3.scrollLeft,
8837
+ scrollLeft = _rootNode$current3$sc2 === void 0 ? 0 : _rootNode$current3$sc2;
8838
+ var newOffset = scrollDirection === DIRECTION.VERTICAL ? scrollTop : scrollLeft;
8839
+
8840
+ if (newOffset < 0 || newOffset === offset || event.target !== rootNode.current) {
8841
+ return;
8842
+ }
8843
+
8844
+ setOffset(newOffset);
8845
+
8846
+ if (typeof onScroll === 'function') {
8847
+ onScroll(offset, event);
8848
+ }
8849
+ };
8850
+
8851
+ var scrollTo = function scrollTo(value) {
8852
+ if (scrollDirection === DIRECTION.VERTICAL) {
8853
+ rootNode.current.scrollTop = value;
8854
+ } else {
8855
+ rootNode.current.scrollLeft = value;
8856
+ }
8857
+ };
8858
+
8859
+ var getVisibleRange = function getVisibleRange() {
8860
+ var _ref = rootNode.current || {},
8861
+ _ref$clientHeight = _ref.clientHeight,
8862
+ clientHeight = _ref$clientHeight === void 0 ? 0 : _ref$clientHeight,
8863
+ _ref$clientWidth = _ref.clientWidth,
8864
+ clientWidth = _ref$clientWidth === void 0 ? 0 : _ref$clientWidth;
8865
+
8866
+ var containerSize = scrollDirection === DIRECTION.VERTICAL ? clientHeight : clientWidth;
8867
+ var start = Math.floor(offset / itemSize - 1); // start --> 向下取整 (索引是从0开始,所以 - 1)
8868
+
8869
+ var stop = Math.ceil((offset + containerSize) / itemSize - 1); // stop --> 向上取整
8870
+
8871
+ return {
8872
+ start: Math.max(0, start - overscanCount),
8873
+ stop: Math.min(stop + overscanCount, itemCount - 1)
8874
+ };
8875
+ };
8876
+
8877
+ var getStyle = function getStyle(index) {
8878
+ var _styleCache$index;
8879
+
8880
+ var style = styleCache[index];
8881
+ if (style) return style;
8882
+ return styleCache[index] = (_styleCache$index = {
8883
+ position: 'absolute',
8884
+ top: 0,
8885
+ left: 0,
8886
+ width: '100%'
8887
+ }, _defineProperty(_styleCache$index, sizeProp[scrollDirection], props.itemSize), _defineProperty(_styleCache$index, positionProp[scrollDirection], props.itemSize * index), _styleCache$index);
8888
+ };
8889
+
8890
+ var wrapperStyle = _objectSpread2(_objectSpread2(_objectSpread2({}, STYLE_WRAPPER), style), {}, {
8891
+ height: height,
8892
+ width: width
8893
+ });
8894
+
8895
+ var innerStyle = _objectSpread2(_objectSpread2({}, STYLE_INNER), {}, _defineProperty({}, sizeProp[scrollDirection], itemCount * itemSize));
8896
+
8897
+ var items = [];
8898
+
8899
+ var _getVisibleRange = getVisibleRange(),
8900
+ start = _getVisibleRange.start,
8901
+ stop = _getVisibleRange.stop;
8902
+
8903
+ for (var index = start; index <= stop; index++) {
8904
+ items.push(renderItem({
8905
+ index: index,
8906
+ style: getStyle(index)
8907
+ }));
8908
+ }
8909
+
8910
+ return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread2(_objectSpread2({
8911
+ ref: rootNode
8912
+ }, otherProps), {}, {
8913
+ style: wrapperStyle
8914
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
8915
+ style: innerStyle
8916
+ }, items));
8917
+ };
8918
+
8919
+ var _excluded$b = ["list", "render", "none", "partSize"];
8761
8920
 
8762
8921
  function AutoScroll(props) {
8763
8922
  var inner1 = React.useRef();
@@ -8842,7 +9001,7 @@ var Index$9 = function Index(_ref) {
8842
9001
  none = _ref.none,
8843
9002
  _ref$partSize = _ref.partSize,
8844
9003
  partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
8845
- otherProps = _objectWithoutProperties(_ref, _excluded$a);
9004
+ otherProps = _objectWithoutProperties(_ref, _excluded$b);
8846
9005
 
8847
9006
  var _useState = React.useState([]),
8848
9007
  _useState2 = _slicedToArray(_useState, 2),
@@ -8925,7 +9084,7 @@ var Index$9 = function Index(_ref) {
8925
9084
  }, none || '暂无数据');
8926
9085
  };
8927
9086
 
8928
- var _excluded$b = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
9087
+ var _excluded$c = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
8929
9088
 
8930
9089
  SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay, SwiperCore.Virtual]);
8931
9090
 
@@ -8937,7 +9096,7 @@ var Index$a = function Index(props) {
8937
9096
  rowKey = props.rowKey,
8938
9097
  onSwiperChange = props.onSwiperChange,
8939
9098
  renderItem = props.renderItem,
8940
- extraProps = _objectWithoutProperties(props, _excluded$b);
9099
+ extraProps = _objectWithoutProperties(props, _excluded$c);
8941
9100
 
8942
9101
  var _useState = React.useState(null),
8943
9102
  _useState2 = _slicedToArray(_useState, 2),
@@ -9588,7 +9747,7 @@ function createBrowserHistory(props) {
9588
9747
  return history;
9589
9748
  }
9590
9749
 
9591
- var _excluded$c = ["routes", "className"];
9750
+ var _excluded$d = ["routes", "className"];
9592
9751
  var history = createBrowserHistory();
9593
9752
 
9594
9753
  function itemRender(route, params, routes, paths) {
@@ -9606,7 +9765,7 @@ function itemRender(route, params, routes, paths) {
9606
9765
  var Index$b = function Index(_ref) {
9607
9766
  var routes = _ref.routes,
9608
9767
  className = _ref.className,
9609
- props = _objectWithoutProperties(_ref, _excluded$c);
9768
+ props = _objectWithoutProperties(_ref, _excluded$d);
9610
9769
 
9611
9770
  return /*#__PURE__*/React__default['default'].createElement(_Breadcrumb__default['default'], _objectSpread2({
9612
9771
  className: className || 'default',
@@ -9616,7 +9775,7 @@ var Index$b = function Index(_ref) {
9616
9775
  }, props));
9617
9776
  };
9618
9777
 
9619
- var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9778
+ var _excluded$e = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9620
9779
 
9621
9780
  var Index$c = function Index(_ref, ref) {
9622
9781
  var _classNames;
@@ -9627,7 +9786,7 @@ var Index$c = function Index(_ref, ref) {
9627
9786
  headerTail = _ref.headerTail,
9628
9787
  headerCenter = _ref.headerCenter,
9629
9788
  sliderTabs = _ref.sliderTabs,
9630
- props = _objectWithoutProperties(_ref, _excluded$d);
9789
+ props = _objectWithoutProperties(_ref, _excluded$e);
9631
9790
 
9632
9791
  React.useImperativeHandle(ref, function () {
9633
9792
  return {
@@ -9646,13 +9805,13 @@ var Index$c = function Index(_ref, ref) {
9646
9805
  className: "container-in"
9647
9806
  }, /*#__PURE__*/React__default['default'].createElement("div", {
9648
9807
  className: "container-in-border"
9649
- }, /*#__PURE__*/React__default['default'].createElement("div", {
9808
+ }, title ? /*#__PURE__*/React__default['default'].createElement("div", {
9650
9809
  className: "header"
9651
9810
  }, /*#__PURE__*/React__default['default'].createElement("div", {
9652
9811
  className: "title"
9653
9812
  }, /*#__PURE__*/React__default['default'].createElement("span", {
9654
9813
  className: "dot"
9655
- }), title), headerCenter, headerTail), /*#__PURE__*/React__default['default'].createElement("div", {
9814
+ }), title), headerCenter, headerTail) : null, /*#__PURE__*/React__default['default'].createElement("div", {
9656
9815
  className: "body"
9657
9816
  }, sliderTabs ? sliderTabs.components[activeTab] : props.children)), sliderTabs && /*#__PURE__*/React__default['default'].createElement("div", {
9658
9817
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
@@ -9771,8 +9930,9 @@ function DialogModel(props, ref) {
9771
9930
  React.useEffect(function () {
9772
9931
  var containerEl = containerRef.current;
9773
9932
  var containerElWidth = containerEl.offsetWidth;
9774
- console.log(containerElWidth);
9933
+ var containerElHeight = containerEl.offsetHeight;
9775
9934
  containerEl.style.left = "calc(50% - ".concat(containerElWidth / 2, "px)");
9935
+ containerEl.style.top = "calc(50% - ".concat(containerElHeight / 2, "px)");
9776
9936
  }, [modelShow]);
9777
9937
  React.useEffect(function () {
9778
9938
  var containerEl = containerRef.current;
@@ -9868,7 +10028,7 @@ function DialogModel(props, ref) {
9868
10028
 
9869
10029
  var Dialog = /*#__PURE__*/React__default['default'].forwardRef(DialogModel);
9870
10030
 
9871
- var _excluded$e = ["visible", "width", "closeCb", "onClose", "className", "style"],
10031
+ var _excluded$f = ["visible", "width", "closeCb", "onClose", "className", "style"],
9872
10032
  _excluded2$3 = ["visible"];
9873
10033
 
9874
10034
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
@@ -9985,7 +10145,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9985
10145
  onClose = _this$props4.onClose,
9986
10146
  className = _this$props4.className,
9987
10147
  style = _this$props4.style,
9988
- other = _objectWithoutProperties(_this$props4, _excluded$e);
10148
+ other = _objectWithoutProperties(_this$props4, _excluded$f);
9989
10149
 
9990
10150
  return /*#__PURE__*/React__default['default'].createElement(Dialog, _objectSpread2({
9991
10151
  ref: this.containerRef,
@@ -10008,18 +10168,19 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
10008
10168
 
10009
10169
  Modal.show = void 0;
10010
10170
  Modal.hidden = void 0;
10171
+ Modal.destory = void 0;
10172
+ var Modals = {};
10011
10173
 
10012
10174
  Modal.show = function (config) {
10013
- var ModalContainer = null;
10014
- var modelSysbol = Symbol('$$__model__Container_hidden');
10015
- if (ModalContainer) return;
10175
+ var modelSysbol = Math.random().toString(36).slice(2, 36);
10176
+ if (Modals[modelSysbol]) return;
10016
10177
 
10017
10178
  var props = _objectSpread2(_objectSpread2({}, config), {}, {
10018
10179
  visible: true
10019
10180
  });
10020
10181
 
10021
- var container = ModalContainer = document.createElement('div');
10022
- var manager = container[modelSysbol] = {
10182
+ var container = document.createElement('div');
10183
+ var manager = container[modelSysbol] = Modals[modelSysbol] = {
10023
10184
  setShow: null,
10024
10185
  mounted: false,
10025
10186
  hidden: function hidden() {
@@ -10028,8 +10189,12 @@ Modal.show = function (config) {
10028
10189
  },
10029
10190
  destory: function destory() {
10030
10191
  ReactDOM__default['default'].unmountComponentAtNode(container);
10031
- document.body.removeChild(container);
10032
- ModalContainer = null;
10192
+
10193
+ if (document.body.contains(container)) {
10194
+ document.body.removeChild(container);
10195
+ }
10196
+
10197
+ delete Modals[modelSysbol];
10033
10198
  }
10034
10199
  };
10035
10200
 
@@ -10061,8 +10226,20 @@ Modal.show = function (config) {
10061
10226
  return manager;
10062
10227
  };
10063
10228
 
10064
- Modal.hidden = function () {// if (!ModalContainer) return;
10065
- // ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10229
+ Modal.hidden = function () {
10230
+ if (Object.keys(Modals).length == 0) return;
10231
+
10232
+ for (var key in Modals) {
10233
+ Modals[key].hidden();
10234
+ }
10235
+ };
10236
+
10237
+ Modal.destory = function () {
10238
+ if (Object.keys(Modals).length == 0) return;
10239
+
10240
+ for (var key in Modals) {
10241
+ Modals[key].destory();
10242
+ }
10066
10243
  };
10067
10244
 
10068
10245
  var controlShow$1 = function controlShow(f1, f2, value, timer) {
@@ -10151,7 +10328,7 @@ function DialogModel$1(props) {
10151
10328
  return renderChildren;
10152
10329
  }
10153
10330
 
10154
- var _excluded$f = ["visible"];
10331
+ var _excluded$g = ["visible"];
10155
10332
 
10156
10333
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
10157
10334
  _inherits(Modal, _React$PureComponent);
@@ -10291,7 +10468,7 @@ Modal$1.show = function (config) {
10291
10468
  manager.setShow = setShow;
10292
10469
 
10293
10470
  var visible = props.visible,
10294
- trueProps = _objectWithoutProperties(props, _excluded$f);
10471
+ trueProps = _objectWithoutProperties(props, _excluded$g);
10295
10472
 
10296
10473
  React.useEffect(function () {
10297
10474
  manager.mounted = true;
@@ -10315,7 +10492,7 @@ Modal$1.hidden = function () {
10315
10492
  ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10316
10493
  };
10317
10494
 
10318
- var _excluded$g = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
10495
+ var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
10319
10496
 
10320
10497
  var ModalForm = function ModalForm(props, ref) {
10321
10498
  var columns = props.columns,
@@ -10329,7 +10506,7 @@ var ModalForm = function ModalForm(props, ref) {
10329
10506
  title = props.title,
10330
10507
  record = props.record,
10331
10508
  onFormChange = props.onFormChange,
10332
- extraProps = _objectWithoutProperties(props, _excluded$g);
10509
+ extraProps = _objectWithoutProperties(props, _excluded$h);
10333
10510
 
10334
10511
  var formRef = React.useRef(null);
10335
10512
 
@@ -10460,7 +10637,7 @@ var ModalForm = function ModalForm(props, ref) {
10460
10637
 
10461
10638
  var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
10462
10639
 
10463
- var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination", "noBordered"];
10640
+ var _excluded$i = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination", "noBordered"];
10464
10641
 
10465
10642
  var TabelCard = function TabelCard(props, ref) {
10466
10643
  var columns = props.columns,
@@ -10477,7 +10654,7 @@ var TabelCard = function TabelCard(props, ref) {
10477
10654
  optionColumnConfig = props.optionColumnConfig,
10478
10655
  pagination = props.pagination,
10479
10656
  noBordered = props.noBordered,
10480
- extraProps = _objectWithoutProperties(props, _excluded$h);
10657
+ extraProps = _objectWithoutProperties(props, _excluded$i);
10481
10658
 
10482
10659
  var actionRef = React.useRef();
10483
10660
  var modalFormRef = React.useRef(null);
@@ -11150,15 +11327,9 @@ function Xgplay(_ref, fRef) {
11150
11327
  setRef = _ref.setRef;
11151
11328
  var ref = React.useRef(null);
11152
11329
  var playerRef = React.useRef(null);
11153
-
11154
- var _useState = React.useState(null),
11155
- _useState2 = _slicedToArray(_useState, 2),
11156
- player = _useState2[0],
11157
- setPlayer = _useState2[1];
11158
-
11159
11330
  React.useEffect(function () {
11160
11331
  if (ref.current) {
11161
- if (type.indexOf('hls') !== -1) {
11332
+ if ((type === null || type === void 0 ? void 0 : type.indexOf('hls')) !== -1) {
11162
11333
  playerRef.current = new HlsJsPlayer__default['default'](_objectSpread2({
11163
11334
  el: ref.current,
11164
11335
  width: '100%',
@@ -11167,7 +11338,7 @@ function Xgplay(_ref, fRef) {
11167
11338
  isLive: true,
11168
11339
  autoplayMuted: true
11169
11340
  }, config));
11170
- } else if (type.indexOf('flv') !== -1) {
11341
+ } else if ((type === null || type === void 0 ? void 0 : type.indexOf('flv')) !== -1) {
11171
11342
  playerRef.current = new FlvPlayer__default['default'](_objectSpread2({
11172
11343
  el: ref.current,
11173
11344
  width: '100%',
@@ -11176,7 +11347,7 @@ function Xgplay(_ref, fRef) {
11176
11347
  isLive: true,
11177
11348
  autoplayMuted: true
11178
11349
  }, config));
11179
- } else if (type.indexOf('mp4') !== -1) {
11350
+ } else if ((type === null || type === void 0 ? void 0 : type.indexOf('mp4')) !== -1) {
11180
11351
  playerRef.current = new Player__default['default'](_objectSpread2({
11181
11352
  el: ref.current,
11182
11353
  width: '100%',
@@ -11241,11 +11412,7 @@ var IconFont = icons.createFromIconfontCN({
11241
11412
  function VideoPlayer(_ref, ref) {
11242
11413
  var _ref$footer = _ref.footer,
11243
11414
  footer = _ref$footer === void 0 ? true : _ref$footer,
11244
- _ref$style = _ref.style,
11245
- style = _ref$style === void 0 ? {
11246
- width: 400,
11247
- height: 400
11248
- } : _ref$style,
11415
+ style = _ref.style,
11249
11416
  _ref$config = _ref.config,
11250
11417
  config = _ref$config === void 0 ? {} : _ref$config,
11251
11418
  layoutIndex = _ref.layoutIndex,
@@ -11289,20 +11456,25 @@ function VideoPlayer(_ref, ref) {
11289
11456
  currentLayoutIndex = _useState2[0],
11290
11457
  setCurrentLayoutIndex = _useState2[1];
11291
11458
 
11459
+ var _useState3 = React.useState(url),
11460
+ _useState4 = _slicedToArray(_useState3, 2),
11461
+ urls = _useState4[0],
11462
+ setUrls = _useState4[1];
11463
+
11292
11464
  var initPlayerIndex = layouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : layouts[layoutIndex || 0].span - 1;
11293
11465
 
11294
- var _useState3 = React.useState(initPlayerIndex),
11295
- _useState4 = _slicedToArray(_useState3, 2),
11296
- currentPlayerIndex = _useState4[0],
11297
- setCurrentPlayerIndex = _useState4[1];
11466
+ var _useState5 = React.useState(initPlayerIndex),
11467
+ _useState6 = _slicedToArray(_useState5, 2),
11468
+ currentPlayerIndex = _useState6[0],
11469
+ setCurrentPlayerIndex = _useState6[1];
11298
11470
 
11299
11471
  var domRef = React.useRef(null);
11300
11472
  var playerRef = React.useRef({});
11301
11473
 
11302
- var _useState5 = React.useState([]),
11303
- _useState6 = _slicedToArray(_useState5, 2),
11304
- players = _useState6[0],
11305
- setPlayers = _useState6[1];
11474
+ var _useState7 = React.useState([]),
11475
+ _useState8 = _slicedToArray(_useState7, 2),
11476
+ players = _useState8[0],
11477
+ setPlayers = _useState8[1];
11306
11478
 
11307
11479
  var renderDom = React.useMemo(function () {
11308
11480
  var arr = new Array(layouts[currentLayoutIndex].span).fill(0);
@@ -11313,16 +11485,16 @@ function VideoPlayer(_ref, ref) {
11313
11485
  onClickCapture: function onClickCapture() {
11314
11486
  setCurrentPlayerIndex(index);
11315
11487
  }
11316
- }, url[index] ? /*#__PURE__*/React__default['default'].createElement(Xgplay$1, {
11488
+ }, urls[index] ? /*#__PURE__*/React__default['default'].createElement(Xgplay$1, {
11317
11489
  setRef: function setRef(ref) {
11318
11490
  return setPlayers(function (players) {
11319
11491
  players[index] = ref;
11320
11492
  return players;
11321
11493
  });
11322
11494
  },
11323
- type: url[index],
11495
+ type: urls[index],
11324
11496
  config: _objectSpread2({
11325
- url: url[index],
11497
+ url: urls[index],
11326
11498
  fluid: true
11327
11499
  }, config)
11328
11500
  }) : /*#__PURE__*/React__default['default'].createElement("div", {
@@ -11335,7 +11507,7 @@ function VideoPlayer(_ref, ref) {
11335
11507
  }
11336
11508
  }));
11337
11509
  });
11338
- }, [currentLayoutIndex, currentPlayerIndex, playerRef, url]);
11510
+ }, [currentLayoutIndex, currentPlayerIndex, playerRef, urls]);
11339
11511
 
11340
11512
  function exitFullscreen() {
11341
11513
  if (document.exitFullscreen) {
@@ -11362,10 +11534,13 @@ function VideoPlayer(_ref, ref) {
11362
11534
  var currentPlayer = players[currentPlayerIndex];
11363
11535
 
11364
11536
  if (currentPlayer) {
11365
- console.log(currentPlayer, 'currentPlayer');
11366
- currentPlayer.src = url; // debugger
11367
- // currentPlayer.start(url)
11537
+ currentPlayer.src = url;
11368
11538
  }
11539
+
11540
+ setUrls(function (urls) {
11541
+ urls[currentPlayerIndex] = url;
11542
+ return _toConsumableArray(urls);
11543
+ });
11369
11544
  };
11370
11545
 
11371
11546
  React.useImperativeHandle(ref, function () {
@@ -11373,14 +11548,16 @@ function VideoPlayer(_ref, ref) {
11373
11548
  players: players,
11374
11549
  currentLayoutIndex: currentLayoutIndex,
11375
11550
  currentPlayerIndex: currentPlayerIndex,
11551
+ urls: urls,
11376
11552
  loadCamera: loadCamera
11377
11553
  };
11378
11554
  });
11379
11555
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11556
+ className: "videoContainer",
11380
11557
  style: style
11381
11558
  }, /*#__PURE__*/React__default['default'].createElement("div", {
11382
11559
  ref: domRef,
11383
- className: "videoContainer",
11560
+ className: "videoContainer-grid",
11384
11561
  style: layouts[currentLayoutIndex].style
11385
11562
  }, renderDom), footer ? /*#__PURE__*/React__default['default'].createElement("div", {
11386
11563
  className: "tools"
@@ -11426,6 +11603,7 @@ exports.TabelCard = index$2;
11426
11603
  exports.Table = Table;
11427
11604
  exports.TreeSelect = Index$6;
11428
11605
  exports.VideoPlayer = index$3;
11606
+ exports.VirtualList = VirtualList;
11429
11607
  exports.WDatePicker = Index$5;
11430
11608
  exports.WForm = WForm$1;
11431
11609
  exports.WebsocketHeart = WebsocketHeart;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.4.19",
4
+ "version": "0.4.22",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",
@@ -81,4 +81,4 @@
81
81
  "react": "^16.12.0",
82
82
  "yorkie": "^2.0.0"
83
83
  }
84
- }
84
+ }