wargerm 0.4.21 → 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.
@@ -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+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+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d3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
@@ -1930,6 +1955,10 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
1930
1955
  overflow: auto;
1931
1956
  min-height: 100px;
1932
1957
  }
1958
+ [data-prefers-color='light'] .autoScroll-outer {
1959
+ overflow: auto;
1960
+ min-height: 100px;
1961
+ }
1933
1962
  @font-face {
1934
1963
  font-family: 'swiper-icons';
1935
1964
  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAW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VqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
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, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAA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color='dark'] .swiper-pagination-bullet {
1930
1955
  overflow: auto;
1931
1956
  min-height: 100px;
1932
1957
  }
1958
+ [data-prefers-color='light'] .autoScroll-outer {
1959
+ overflow: auto;
1960
+ min-height: 100px;
1961
+ }
1933
1962
  @font-face {
1934
1963
  font-family: 'swiper-icons';
1935
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+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDA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AeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');
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 || ''))
@@ -9831,7 +9990,7 @@ function DialogModel(props, ref) {
9831
9990
 
9832
9991
  var Dialog = /*#__PURE__*/React.forwardRef(DialogModel);
9833
9992
 
9834
- var _excluded$e = ["visible", "width", "closeCb", "onClose", "className", "style"],
9993
+ var _excluded$f = ["visible", "width", "closeCb", "onClose", "className", "style"],
9835
9994
  _excluded2$3 = ["visible"];
9836
9995
 
9837
9996
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
@@ -9948,7 +10107,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9948
10107
  onClose = _this$props4.onClose,
9949
10108
  className = _this$props4.className,
9950
10109
  style = _this$props4.style,
9951
- other = _objectWithoutProperties(_this$props4, _excluded$e);
10110
+ other = _objectWithoutProperties(_this$props4, _excluded$f);
9952
10111
 
9953
10112
  return /*#__PURE__*/React.createElement(Dialog, _objectSpread2({
9954
10113
  ref: this.containerRef,
@@ -10131,7 +10290,7 @@ function DialogModel$1(props) {
10131
10290
  return renderChildren;
10132
10291
  }
10133
10292
 
10134
- var _excluded$f = ["visible"];
10293
+ var _excluded$g = ["visible"];
10135
10294
 
10136
10295
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
10137
10296
  _inherits(Modal, _React$PureComponent);
@@ -10271,7 +10430,7 @@ Modal$1.show = function (config) {
10271
10430
  manager.setShow = setShow;
10272
10431
 
10273
10432
  var visible = props.visible,
10274
- trueProps = _objectWithoutProperties(props, _excluded$f);
10433
+ trueProps = _objectWithoutProperties(props, _excluded$g);
10275
10434
 
10276
10435
  useEffect(function () {
10277
10436
  manager.mounted = true;
@@ -10295,7 +10454,7 @@ Modal$1.hidden = function () {
10295
10454
  ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10296
10455
  };
10297
10456
 
10298
- 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"];
10299
10458
 
10300
10459
  var ModalForm = function ModalForm(props, ref) {
10301
10460
  var columns = props.columns,
@@ -10309,7 +10468,7 @@ var ModalForm = function ModalForm(props, ref) {
10309
10468
  title = props.title,
10310
10469
  record = props.record,
10311
10470
  onFormChange = props.onFormChange,
10312
- extraProps = _objectWithoutProperties(props, _excluded$g);
10471
+ extraProps = _objectWithoutProperties(props, _excluded$h);
10313
10472
 
10314
10473
  var formRef = useRef(null);
10315
10474
 
@@ -10440,7 +10599,7 @@ var ModalForm = function ModalForm(props, ref) {
10440
10599
 
10441
10600
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
10442
10601
 
10443
- 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"];
10444
10603
 
10445
10604
  var TabelCard = function TabelCard(props, ref) {
10446
10605
  var columns = props.columns,
@@ -10457,7 +10616,7 @@ var TabelCard = function TabelCard(props, ref) {
10457
10616
  optionColumnConfig = props.optionColumnConfig,
10458
10617
  pagination = props.pagination,
10459
10618
  noBordered = props.noBordered,
10460
- extraProps = _objectWithoutProperties(props, _excluded$h);
10619
+ extraProps = _objectWithoutProperties(props, _excluded$i);
10461
10620
 
10462
10621
  var actionRef = useRef();
10463
10622
  var modalFormRef = useRef(null);
@@ -11382,4 +11541,4 @@ function VideoPlayer(_ref, ref) {
11382
11541
 
11383
11542
  var index$3 = /*#__PURE__*/forwardRef(VideoPlayer);
11384
11543
 
11385
- 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 || ''))
@@ -9869,7 +10028,7 @@ function DialogModel(props, ref) {
9869
10028
 
9870
10029
  var Dialog = /*#__PURE__*/React__default['default'].forwardRef(DialogModel);
9871
10030
 
9872
- var _excluded$e = ["visible", "width", "closeCb", "onClose", "className", "style"],
10031
+ var _excluded$f = ["visible", "width", "closeCb", "onClose", "className", "style"],
9873
10032
  _excluded2$3 = ["visible"];
9874
10033
 
9875
10034
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
@@ -9986,7 +10145,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9986
10145
  onClose = _this$props4.onClose,
9987
10146
  className = _this$props4.className,
9988
10147
  style = _this$props4.style,
9989
- other = _objectWithoutProperties(_this$props4, _excluded$e);
10148
+ other = _objectWithoutProperties(_this$props4, _excluded$f);
9990
10149
 
9991
10150
  return /*#__PURE__*/React__default['default'].createElement(Dialog, _objectSpread2({
9992
10151
  ref: this.containerRef,
@@ -10169,7 +10328,7 @@ function DialogModel$1(props) {
10169
10328
  return renderChildren;
10170
10329
  }
10171
10330
 
10172
- var _excluded$f = ["visible"];
10331
+ var _excluded$g = ["visible"];
10173
10332
 
10174
10333
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
10175
10334
  _inherits(Modal, _React$PureComponent);
@@ -10309,7 +10468,7 @@ Modal$1.show = function (config) {
10309
10468
  manager.setShow = setShow;
10310
10469
 
10311
10470
  var visible = props.visible,
10312
- trueProps = _objectWithoutProperties(props, _excluded$f);
10471
+ trueProps = _objectWithoutProperties(props, _excluded$g);
10313
10472
 
10314
10473
  React.useEffect(function () {
10315
10474
  manager.mounted = true;
@@ -10333,7 +10492,7 @@ Modal$1.hidden = function () {
10333
10492
  ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
10334
10493
  };
10335
10494
 
10336
- 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"];
10337
10496
 
10338
10497
  var ModalForm = function ModalForm(props, ref) {
10339
10498
  var columns = props.columns,
@@ -10347,7 +10506,7 @@ var ModalForm = function ModalForm(props, ref) {
10347
10506
  title = props.title,
10348
10507
  record = props.record,
10349
10508
  onFormChange = props.onFormChange,
10350
- extraProps = _objectWithoutProperties(props, _excluded$g);
10509
+ extraProps = _objectWithoutProperties(props, _excluded$h);
10351
10510
 
10352
10511
  var formRef = React.useRef(null);
10353
10512
 
@@ -10478,7 +10637,7 @@ var ModalForm = function ModalForm(props, ref) {
10478
10637
 
10479
10638
  var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
10480
10639
 
10481
- 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"];
10482
10641
 
10483
10642
  var TabelCard = function TabelCard(props, ref) {
10484
10643
  var columns = props.columns,
@@ -10495,7 +10654,7 @@ var TabelCard = function TabelCard(props, ref) {
10495
10654
  optionColumnConfig = props.optionColumnConfig,
10496
10655
  pagination = props.pagination,
10497
10656
  noBordered = props.noBordered,
10498
- extraProps = _objectWithoutProperties(props, _excluded$h);
10657
+ extraProps = _objectWithoutProperties(props, _excluded$i);
10499
10658
 
10500
10659
  var actionRef = React.useRef();
10501
10660
  var modalFormRef = React.useRef(null);
@@ -11444,6 +11603,7 @@ exports.TabelCard = index$2;
11444
11603
  exports.Table = Table;
11445
11604
  exports.TreeSelect = Index$6;
11446
11605
  exports.VideoPlayer = index$3;
11606
+ exports.VirtualList = VirtualList;
11447
11607
  exports.WDatePicker = Index$5;
11448
11608
  exports.WForm = WForm$1;
11449
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.21",
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
+ }