wargerm 0.2.43 → 0.3.3
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.
- package/dist/components/AutoScroll/index.d.ts +1 -0
- package/dist/components/ModalTips/dialog.d.ts +19 -0
- package/dist/components/ModalTips/index.d.ts +30 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/WebsocketHeart/index.d.ts +1 -0
- package/dist/index.css +94 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.css +94 -0
- package/dist/index.esm.js +341 -71
- package/dist/index.js +341 -70
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -7889,7 +7889,7 @@ var WForm = function WForm(props, ref) {
|
|
7889
7889
|
|
7890
7890
|
var WForm$1 = /*#__PURE__*/React.forwardRef(WForm);
|
7891
7891
|
|
7892
|
-
var _excluded$7 = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef"];
|
7892
|
+
var _excluded$7 = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
|
7893
7893
|
function Table(_ref) {
|
7894
7894
|
var _formSearchRef$curren3, _classnames2;
|
7895
7895
|
|
@@ -7919,6 +7919,7 @@ function Table(_ref) {
|
|
7919
7919
|
_ref$frameBoxDirectio = _ref.frameBoxDirection,
|
7920
7920
|
frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
|
7921
7921
|
formRef = _ref.formRef,
|
7922
|
+
none = _ref.none,
|
7922
7923
|
props = _objectWithoutProperties(_ref, _excluded$7);
|
7923
7924
|
|
7924
7925
|
var _useState = useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
|
@@ -8289,7 +8290,7 @@ function Table(_ref) {
|
|
8289
8290
|
}
|
8290
8291
|
}, _callee);
|
8291
8292
|
}))();
|
8292
|
-
}, [params, pageParams, pagination, tableList, formSearch]);
|
8293
|
+
}, [params, pageParams, pagination, tableList, formSearch, columns]);
|
8293
8294
|
|
8294
8295
|
var onFormSubmit = function onFormSubmit(values) {
|
8295
8296
|
onSubmit && onSubmit(values);
|
@@ -8365,7 +8366,7 @@ function Table(_ref) {
|
|
8365
8366
|
style: _objectSpread2({
|
8366
8367
|
height: (style === null || style === void 0 ? void 0 : style.height) ? "calc(".concat(style.height, " - ").concat(52 + (pagination === false ? 0 : 42), "px)") : '200px'
|
8367
8368
|
}, tbodyStyle)
|
8368
|
-
}, dataSource.map(function (record, index) {
|
8369
|
+
}, dataSource.length > 0 ? dataSource.map(function (record, index) {
|
8369
8370
|
var key = typeof rowKey === 'function' ? record[rowKey(record)] : record[rowKey];
|
8370
8371
|
return frameBoxTable ? /*#__PURE__*/React.createElement(FrameBox, {
|
8371
8372
|
key: key,
|
@@ -8374,7 +8375,15 @@ function Table(_ref) {
|
|
8374
8375
|
width: '100%'
|
8375
8376
|
}
|
8376
8377
|
}, renderTr(record, index, key)) : renderTr(record, index, key);
|
8377
|
-
})
|
8378
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
8379
|
+
style: {
|
8380
|
+
width: '100%',
|
8381
|
+
height: '100%',
|
8382
|
+
display: 'flex',
|
8383
|
+
justifyContent: 'center',
|
8384
|
+
alignItems: 'center'
|
8385
|
+
}
|
8386
|
+
}, none || '暂无数据')), _typeof(pagination) === 'object' && /*#__PURE__*/React.createElement(_Pagination, _objectSpread2({
|
8378
8387
|
style: {
|
8379
8388
|
textAlign: 'right',
|
8380
8389
|
marginTop: '10px'
|
@@ -8572,7 +8581,7 @@ var Index$8 = function Index(props) {
|
|
8572
8581
|
|
8573
8582
|
Index$8.defaultProps = {};
|
8574
8583
|
|
8575
|
-
var _excluded$a = ["list", "render", "partSize"];
|
8584
|
+
var _excluded$a = ["list", "render", "none", "partSize"];
|
8576
8585
|
|
8577
8586
|
function AutoScroll(props) {
|
8578
8587
|
var inner1 = useRef();
|
@@ -8654,83 +8663,90 @@ function AutoScroll(props) {
|
|
8654
8663
|
var Index$9 = function Index(_ref) {
|
8655
8664
|
var list = _ref.list,
|
8656
8665
|
render = _ref.render,
|
8666
|
+
none = _ref.none,
|
8657
8667
|
_ref$partSize = _ref.partSize,
|
8658
8668
|
partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
|
8659
8669
|
otherProps = _objectWithoutProperties(_ref, _excluded$a);
|
8660
8670
|
|
8661
|
-
|
8662
|
-
|
8663
|
-
|
8664
|
-
|
8665
|
-
setPatrA = _useState2[1];
|
8671
|
+
var _useState = useState([]),
|
8672
|
+
_useState2 = _slicedToArray(_useState, 2),
|
8673
|
+
partA = _useState2[0],
|
8674
|
+
setPatrA = _useState2[1];
|
8666
8675
|
|
8667
|
-
|
8668
|
-
|
8669
|
-
|
8670
|
-
|
8676
|
+
var _useState3 = useState([]),
|
8677
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
8678
|
+
partB = _useState4[0],
|
8679
|
+
setPatrB = _useState4[1]; // partA在items中的开始索引
|
8671
8680
|
|
8672
8681
|
|
8673
|
-
|
8674
|
-
|
8675
|
-
|
8676
|
-
|
8682
|
+
var _useState5 = useState(0),
|
8683
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
8684
|
+
partAStartIndex = _useState6[0],
|
8685
|
+
setPartAStartIndex = _useState6[1]; // partB在items中的开始索引
|
8677
8686
|
|
8678
8687
|
|
8679
|
-
|
8680
|
-
|
8681
|
-
|
8682
|
-
|
8688
|
+
var _useState7 = useState(partSize),
|
8689
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
8690
|
+
partBStartIndex = _useState8[0],
|
8691
|
+
setPartBStartIndex = _useState8[1];
|
8683
8692
|
|
8684
|
-
|
8693
|
+
var autoRef = useRef(); // 当滚动至一半的位置时,修改partAStartIndex
|
8685
8694
|
|
8686
|
-
|
8687
|
-
|
8688
|
-
|
8695
|
+
var handleHalf = function handleHalf() {
|
8696
|
+
setPartAStartIndex((partBStartIndex + partSize) % list.length);
|
8697
|
+
}; // 当滚动归位时,修改partBStartIndex
|
8689
8698
|
|
8690
8699
|
|
8691
|
-
|
8692
|
-
|
8693
|
-
|
8700
|
+
var handleComplete = function handleComplete() {
|
8701
|
+
setPartBStartIndex((partAStartIndex + partSize) % list.length);
|
8702
|
+
};
|
8694
8703
|
|
8695
|
-
|
8696
|
-
|
8697
|
-
|
8698
|
-
|
8699
|
-
|
8700
|
-
|
8701
|
-
|
8704
|
+
useEffect(function () {
|
8705
|
+
// partA中的数据
|
8706
|
+
if (list.length > partSize) {
|
8707
|
+
setPatrA(list);
|
8708
|
+
} else {
|
8709
|
+
setPatrA(list);
|
8710
|
+
} // partB中的数据
|
8702
8711
|
|
8703
8712
|
|
8704
|
-
|
8705
|
-
|
8706
|
-
|
8707
|
-
|
8708
|
-
|
8713
|
+
if (list.length > partSize) {
|
8714
|
+
setPatrB(list);
|
8715
|
+
} else {
|
8716
|
+
setPatrB([]);
|
8717
|
+
}
|
8709
8718
|
|
8710
|
-
|
8711
|
-
|
8712
|
-
|
8713
|
-
|
8714
|
-
}
|
8715
|
-
}, 0);
|
8716
|
-
}, [list]);
|
8717
|
-
useEffect(function () {
|
8718
|
-
setPartBStartIndex(partAStartIndex + partSize);
|
8719
|
-
}, []);
|
8720
|
-
return /*#__PURE__*/React.createElement(AutoScroll, _objectSpread2({
|
8721
|
-
cref: autoRef,
|
8722
|
-
complete: function complete() {
|
8723
|
-
return handleComplete;
|
8724
|
-
},
|
8725
|
-
half: function half() {
|
8726
|
-
return handleHalf;
|
8719
|
+
setTimeout(function () {
|
8720
|
+
//手动触发执行滚动
|
8721
|
+
if (autoRef.current) {
|
8722
|
+
autoRef.current.tryScroll();
|
8727
8723
|
}
|
8728
|
-
},
|
8729
|
-
|
8730
|
-
|
8731
|
-
|
8732
|
-
|
8733
|
-
|
8724
|
+
}, 0);
|
8725
|
+
}, [list]);
|
8726
|
+
useEffect(function () {
|
8727
|
+
setPartBStartIndex(partAStartIndex + partSize);
|
8728
|
+
}, []);
|
8729
|
+
return list.length > 0 ? /*#__PURE__*/React.createElement(AutoScroll, _objectSpread2({
|
8730
|
+
cref: autoRef,
|
8731
|
+
complete: function complete() {
|
8732
|
+
return handleComplete;
|
8733
|
+
},
|
8734
|
+
half: function half() {
|
8735
|
+
return handleHalf;
|
8736
|
+
}
|
8737
|
+
}, otherProps), partA && partA.map(function (item, index) {
|
8738
|
+
return render(item, index);
|
8739
|
+
}), partB && partB.map(function (item, index) {
|
8740
|
+
return render(item, index);
|
8741
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
8742
|
+
style: {
|
8743
|
+
width: '100%',
|
8744
|
+
height: '100%',
|
8745
|
+
display: 'flex',
|
8746
|
+
justifyContent: 'center',
|
8747
|
+
alignItems: 'center'
|
8748
|
+
}
|
8749
|
+
}, none || '暂无数据');
|
8734
8750
|
};
|
8735
8751
|
|
8736
8752
|
var _excluded$b = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
|
@@ -9699,7 +9715,255 @@ Modal.hidden = function () {
|
|
9699
9715
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
9700
9716
|
};
|
9701
9717
|
|
9702
|
-
var
|
9718
|
+
var controlShow$1 = function controlShow(f1, f2, value, timer) {
|
9719
|
+
f1(value);
|
9720
|
+
return setTimeout(function () {
|
9721
|
+
f2(value);
|
9722
|
+
}, timer);
|
9723
|
+
};
|
9724
|
+
|
9725
|
+
function DialogModel$1(props) {
|
9726
|
+
var width = props.width,
|
9727
|
+
visible = props.visible,
|
9728
|
+
closeCb = props.closeCb,
|
9729
|
+
onClose = props.onClose,
|
9730
|
+
_props$className = props.className,
|
9731
|
+
className = _props$className === void 0 ? 'default-dialog' : _props$className,
|
9732
|
+
style = props.style;
|
9733
|
+
|
9734
|
+
var _useState = useState(visible),
|
9735
|
+
_useState2 = _slicedToArray(_useState, 2),
|
9736
|
+
modelShow = _useState2[0],
|
9737
|
+
setModelShow = _useState2[1];
|
9738
|
+
|
9739
|
+
var _useState3 = useState(visible),
|
9740
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
9741
|
+
modelShowAync = _useState4[0],
|
9742
|
+
setModelShowAync = _useState4[1];
|
9743
|
+
|
9744
|
+
var _useState5 = useState(visible),
|
9745
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
9746
|
+
flag = _useState6[0],
|
9747
|
+
setFlag = _useState6[1];
|
9748
|
+
|
9749
|
+
var renderChildren = useMemo(function () {
|
9750
|
+
var _classNames;
|
9751
|
+
|
9752
|
+
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement("div", {
|
9753
|
+
className: "w100p h100p pa ",
|
9754
|
+
style: {
|
9755
|
+
display: modelShow ? 'block' : 'none',
|
9756
|
+
overflow: 'hidden',
|
9757
|
+
top: 0,
|
9758
|
+
left: 0
|
9759
|
+
}
|
9760
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9761
|
+
className: classnames((_classNames = {}, _defineProperty(_classNames, className, true), _defineProperty(_classNames, 'model_container-tips', true), _defineProperty(_classNames, "animate__animated", true), _defineProperty(_classNames, flag ? 'animate__bounceInDown' : 'animate__fadeOutRightBig', true), _classNames)),
|
9762
|
+
style: _objectSpread2({
|
9763
|
+
opacity: modelShowAync ? 1 : 0,
|
9764
|
+
width: typeof width == 'number' ? width + 'px' : width
|
9765
|
+
}, style)
|
9766
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9767
|
+
className: 'model_wrap-tips'
|
9768
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9769
|
+
style: {
|
9770
|
+
width: '100%',
|
9771
|
+
height: '100%',
|
9772
|
+
position: 'relative'
|
9773
|
+
}
|
9774
|
+
}, ' ', props.children, ' '))), /*#__PURE__*/React.createElement("div", {
|
9775
|
+
className: 'mask-tips',
|
9776
|
+
onClick: function onClick() {
|
9777
|
+
return onClose && onClose();
|
9778
|
+
},
|
9779
|
+
style: {
|
9780
|
+
opacity: modelShowAync ? 0.6 : 0
|
9781
|
+
}
|
9782
|
+
})), document.body);
|
9783
|
+
}, [modelShowAync, modelShow, props]);
|
9784
|
+
useEffect(function () {
|
9785
|
+
var timer;
|
9786
|
+
setFlag(visible);
|
9787
|
+
|
9788
|
+
if (visible) {
|
9789
|
+
timer = controlShow$1(setModelShow, setModelShowAync, visible, 30);
|
9790
|
+
} else {
|
9791
|
+
timer = controlShow$1(setModelShowAync, setModelShow, visible, 1000);
|
9792
|
+
}
|
9793
|
+
|
9794
|
+
return function () {
|
9795
|
+
timer && clearTimeout(timer);
|
9796
|
+
};
|
9797
|
+
}, [visible]);
|
9798
|
+
useEffect(function () {
|
9799
|
+
!modelShow && typeof closeCb === 'function' && closeCb();
|
9800
|
+
}, [modelShow]);
|
9801
|
+
return renderChildren;
|
9802
|
+
}
|
9803
|
+
|
9804
|
+
var _excluded$f = ["visible"];
|
9805
|
+
|
9806
|
+
var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
|
9807
|
+
_inherits(Modal, _React$PureComponent);
|
9808
|
+
|
9809
|
+
var _super = _createSuper(Modal);
|
9810
|
+
|
9811
|
+
function Modal() {
|
9812
|
+
var _this;
|
9813
|
+
|
9814
|
+
_classCallCheck(this, Modal);
|
9815
|
+
|
9816
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
9817
|
+
args[_key] = arguments[_key];
|
9818
|
+
}
|
9819
|
+
|
9820
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
9821
|
+
|
9822
|
+
_this.renderFooter = function () {
|
9823
|
+
var _this$props = _this.props,
|
9824
|
+
onOk = _this$props.onOk,
|
9825
|
+
onCancel = _this$props.onCancel,
|
9826
|
+
cancelText = _this$props.cancelText,
|
9827
|
+
okText = _this$props.okText,
|
9828
|
+
footer = _this$props.footer;
|
9829
|
+
if (footer && /*#__PURE__*/React.isValidElement(footer)) return footer;
|
9830
|
+
if (footer === false) return null;
|
9831
|
+
return /*#__PURE__*/React.createElement("div", {
|
9832
|
+
className: "model_bottom-tips"
|
9833
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9834
|
+
className: "model_btn_box",
|
9835
|
+
style: {
|
9836
|
+
display: 'flex'
|
9837
|
+
}
|
9838
|
+
}, /*#__PURE__*/React.createElement(WButton, {
|
9839
|
+
className: "okbtn",
|
9840
|
+
onClick: function onClick(e) {
|
9841
|
+
onOk && onOk(e);
|
9842
|
+
}
|
9843
|
+
}, okText || '确定'), /*#__PURE__*/React.createElement(WButton, {
|
9844
|
+
className: "concellbtn",
|
9845
|
+
style: {
|
9846
|
+
marginLeft: '10px'
|
9847
|
+
},
|
9848
|
+
onClick: function onClick(e) {
|
9849
|
+
onCancel && onCancel(e);
|
9850
|
+
}
|
9851
|
+
}, cancelText || '取消')));
|
9852
|
+
};
|
9853
|
+
|
9854
|
+
_this.renderTop = function () {
|
9855
|
+
var _this$props2 = _this.props,
|
9856
|
+
title = _this$props2.title,
|
9857
|
+
onClose = _this$props2.onClose;
|
9858
|
+
return /*#__PURE__*/React.createElement("div", {
|
9859
|
+
className: "model-header-tips"
|
9860
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9861
|
+
className: "model-title-tips"
|
9862
|
+
}, title), /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
9863
|
+
className: "model-closeIcon-tips",
|
9864
|
+
onClick: function onClick() {
|
9865
|
+
return onClose && onClose();
|
9866
|
+
}
|
9867
|
+
}));
|
9868
|
+
};
|
9869
|
+
|
9870
|
+
_this.renderContent = function () {
|
9871
|
+
var _this$props3 = _this.props,
|
9872
|
+
content = _this$props3.content,
|
9873
|
+
children = _this$props3.children;
|
9874
|
+
return /*#__PURE__*/React.isValidElement(content) ? content : children ? children : null;
|
9875
|
+
};
|
9876
|
+
|
9877
|
+
return _this;
|
9878
|
+
}
|
9879
|
+
|
9880
|
+
_createClass(Modal, [{
|
9881
|
+
key: "render",
|
9882
|
+
value: function render() {
|
9883
|
+
var _this$props4 = this.props,
|
9884
|
+
visible = _this$props4.visible,
|
9885
|
+
width = _this$props4.width,
|
9886
|
+
closeCb = _this$props4.closeCb,
|
9887
|
+
onClose = _this$props4.onClose,
|
9888
|
+
className = _this$props4.className,
|
9889
|
+
style = _this$props4.style;
|
9890
|
+
return /*#__PURE__*/React.createElement(DialogModel$1, {
|
9891
|
+
closeCb: closeCb,
|
9892
|
+
onClose: onClose,
|
9893
|
+
visible: visible,
|
9894
|
+
width: width,
|
9895
|
+
className: className,
|
9896
|
+
style: style
|
9897
|
+
}, this.renderTop(), /*#__PURE__*/React.createElement("div", {
|
9898
|
+
className: "model-content-tips"
|
9899
|
+
}, this.renderContent()), this.renderFooter());
|
9900
|
+
}
|
9901
|
+
}]);
|
9902
|
+
|
9903
|
+
return Modal;
|
9904
|
+
}(React.PureComponent);
|
9905
|
+
|
9906
|
+
Modal$1.show = void 0;
|
9907
|
+
Modal$1.hidden = void 0;
|
9908
|
+
var ModalContainer$1 = null;
|
9909
|
+
var modelSysbol$1 = Symbol('$$__model__Container_hidden');
|
9910
|
+
|
9911
|
+
Modal$1.show = function (config) {
|
9912
|
+
if (ModalContainer$1) return;
|
9913
|
+
|
9914
|
+
var props = _objectSpread2(_objectSpread2({}, config), {}, {
|
9915
|
+
visible: true
|
9916
|
+
});
|
9917
|
+
|
9918
|
+
var container = ModalContainer$1 = document.createElement('div');
|
9919
|
+
var manager = container[modelSysbol$1] = {
|
9920
|
+
setShow: null,
|
9921
|
+
mounted: false,
|
9922
|
+
hidden: function hidden() {
|
9923
|
+
var setShow = manager.setShow;
|
9924
|
+
setShow && setShow(false);
|
9925
|
+
},
|
9926
|
+
destory: function destory() {
|
9927
|
+
ReactDOM.unmountComponentAtNode(container);
|
9928
|
+
document.body.removeChild(container);
|
9929
|
+
ModalContainer$1 = null;
|
9930
|
+
}
|
9931
|
+
};
|
9932
|
+
|
9933
|
+
var ModelApp = function ModelApp(props) {
|
9934
|
+
var _useState = useState(false),
|
9935
|
+
_useState2 = _slicedToArray(_useState, 2),
|
9936
|
+
show = _useState2[0],
|
9937
|
+
setShow = _useState2[1];
|
9938
|
+
|
9939
|
+
manager.setShow = setShow;
|
9940
|
+
|
9941
|
+
var visible = props.visible,
|
9942
|
+
trueProps = _objectWithoutProperties(props, _excluded$f);
|
9943
|
+
|
9944
|
+
useEffect(function () {
|
9945
|
+
manager.mounted = true;
|
9946
|
+
setShow(visible);
|
9947
|
+
}, []);
|
9948
|
+
return /*#__PURE__*/React.createElement(Modal$1, _objectSpread2(_objectSpread2({}, trueProps), {}, {
|
9949
|
+
closeCb: function closeCb() {
|
9950
|
+
return manager.mounted && manager.destory();
|
9951
|
+
},
|
9952
|
+
visible: show
|
9953
|
+
}));
|
9954
|
+
};
|
9955
|
+
|
9956
|
+
document.body.appendChild(container);
|
9957
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(ModelApp, _objectSpread2({}, props)), container);
|
9958
|
+
return manager;
|
9959
|
+
};
|
9960
|
+
|
9961
|
+
Modal$1.hidden = function () {
|
9962
|
+
if (!ModalContainer$1) return;
|
9963
|
+
ModalContainer$1[modelSysbol$1] && ModalContainer$1[modelSysbol$1].hidden();
|
9964
|
+
};
|
9965
|
+
|
9966
|
+
var _excluded$g = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
|
9703
9967
|
|
9704
9968
|
var ModalForm = function ModalForm(props, ref) {
|
9705
9969
|
var columns = props.columns,
|
@@ -9713,7 +9977,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9713
9977
|
title = props.title,
|
9714
9978
|
record = props.record,
|
9715
9979
|
onFormChange = props.onFormChange,
|
9716
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
9980
|
+
extraProps = _objectWithoutProperties(props, _excluded$g);
|
9717
9981
|
|
9718
9982
|
var formRef = useRef(null);
|
9719
9983
|
|
@@ -9844,7 +10108,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9844
10108
|
|
9845
10109
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
9846
10110
|
|
9847
|
-
var _excluded$
|
10111
|
+
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
|
9848
10112
|
_excluded2$3 = ["actionMethod"];
|
9849
10113
|
|
9850
10114
|
var TabelCard = function TabelCard(props, ref) {
|
@@ -9860,7 +10124,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9860
10124
|
onFormChange = props.onFormChange,
|
9861
10125
|
modalConfig = props.modalConfig,
|
9862
10126
|
optionColumnConfig = props.optionColumnConfig,
|
9863
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
10127
|
+
extraProps = _objectWithoutProperties(props, _excluded$h);
|
9864
10128
|
|
9865
10129
|
var actionRef = useRef();
|
9866
10130
|
var formRef = useRef(null);
|
@@ -10418,9 +10682,9 @@ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
|
|
10418
10682
|
};
|
10419
10683
|
|
10420
10684
|
this.websocketOnmessage = function (e) {
|
10421
|
-
console.log('-----接收消息-------', e);
|
10685
|
+
// console.log('-----接收消息-------', e);
|
10686
|
+
// const data = e.data //解析对象
|
10422
10687
|
// To handle
|
10423
|
-
|
10424
10688
|
_this.onmessageCB(e); //心跳检测重置
|
10425
10689
|
|
10426
10690
|
|
@@ -10446,6 +10710,12 @@ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
|
|
10446
10710
|
}
|
10447
10711
|
};
|
10448
10712
|
|
10713
|
+
this.close = function () {
|
10714
|
+
_this.websock.close();
|
10715
|
+
|
10716
|
+
_this.lockReconnect = true;
|
10717
|
+
};
|
10718
|
+
|
10449
10719
|
this.reconnect = function () {
|
10450
10720
|
var that = _this;
|
10451
10721
|
if (that.lockReconnect) return;
|
@@ -10502,4 +10772,4 @@ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
|
|
10502
10772
|
this.heartCheck = null;
|
10503
10773
|
});
|
10504
10774
|
|
10505
|
-
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, Index$c 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, Index$7 as Number, NumericInput, Index$2 as Radio, Index$4 as Select, Index$a as Swiper, WSwitch as Switch, index$1 as TabelCard, Table, Index$6 as TreeSelect, Index$5 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
|
10775
|
+
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, Index$c 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, Index$4 as Select, Index$a as Swiper, WSwitch as Switch, index$1 as TabelCard, Table, Index$6 as TreeSelect, Index$5 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
|