wargerm 0.2.15 → 0.2.19
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/WDatePicker/index.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +142 -48
- package/dist/index.js +148 -53
- package/package.json +2 -2
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DatePickerProps, RangePickerProps } from 'antd/lib/date-picker';
|
3
|
+
export declare type IndexComponent = React.FC<DatePickerProps> & {
|
4
|
+
RangePicker: React.FC<RangePickerProps>;
|
5
|
+
};
|
6
|
+
declare const Index: IndexComponent;
|
7
|
+
export default Index;
|
package/dist/index.d.ts
CHANGED
@@ -8,6 +8,7 @@ export { default as Checkbox } from './components/Checkbox';
|
|
8
8
|
export { default as Radio } from './components/Radio';
|
9
9
|
export { default as Select } from './components/Select';
|
10
10
|
export { default as DatePicker } from './components/DatePicker';
|
11
|
+
export { default as WDatePicker } from './components/WDatePicker';
|
11
12
|
export { default as Switch } from './components/Switch';
|
12
13
|
export { default as TreeSelect } from './components/TreeSelect';
|
13
14
|
export { default as WForm } from './components/WForm';
|
package/dist/index.esm.js
CHANGED
@@ -523,6 +523,11 @@ var WSelect = function WSelect(props) {
|
|
523
523
|
valueEnumList = _useState4[0],
|
524
524
|
setValueEnumList = _useState4[1];
|
525
525
|
|
526
|
+
var _useState5 = useState(null),
|
527
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
528
|
+
resList = _useState6[0],
|
529
|
+
setResList = _useState6[1];
|
530
|
+
|
526
531
|
useEffect(function () {
|
527
532
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
528
533
|
var res, node;
|
@@ -531,7 +536,7 @@ var WSelect = function WSelect(props) {
|
|
531
536
|
switch (_context.prev = _context.next) {
|
532
537
|
case 0:
|
533
538
|
if (!request) {
|
534
|
-
_context.next =
|
539
|
+
_context.next = 8;
|
535
540
|
break;
|
536
541
|
}
|
537
542
|
|
@@ -540,6 +545,7 @@ var WSelect = function WSelect(props) {
|
|
540
545
|
|
541
546
|
case 3:
|
542
547
|
res = _context.sent;
|
548
|
+
setResList(res);
|
543
549
|
onLoad && onLoad(res);
|
544
550
|
node = res.map(function (item) {
|
545
551
|
return /*#__PURE__*/React.createElement(_Select.Option, {
|
@@ -549,7 +555,7 @@ var WSelect = function WSelect(props) {
|
|
549
555
|
});
|
550
556
|
setChildrenNode(node);
|
551
557
|
|
552
|
-
case
|
558
|
+
case 8:
|
553
559
|
case "end":
|
554
560
|
return _context.stop();
|
555
561
|
}
|
@@ -585,7 +591,7 @@ var WSelect = function WSelect(props) {
|
|
585
591
|
|
586
592
|
onLoad && onLoad(options);
|
587
593
|
setValueEnumList(valueEnumNode);
|
588
|
-
}, []);
|
594
|
+
}, [JSON.stringify(resList)]);
|
589
595
|
return /*#__PURE__*/React.createElement(_Select, _objectSpread2({}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
590
596
|
};
|
591
597
|
|
@@ -7532,8 +7538,65 @@ Table.defaultProps = {
|
|
7532
7538
|
rowKey: 'key'
|
7533
7539
|
};
|
7534
7540
|
|
7535
|
-
var _excluded$5 = ["
|
7536
|
-
|
7541
|
+
var _excluded$5 = ["defaultValue", "format", "value", "onChange"],
|
7542
|
+
_excluded2$1 = ["defaultValue", "value", "format", "onChange"];
|
7543
|
+
|
7544
|
+
var momentValue = function momentValue(value) {
|
7545
|
+
if (value) {
|
7546
|
+
return hooks(value);
|
7547
|
+
}
|
7548
|
+
};
|
7549
|
+
|
7550
|
+
var WDatePicker$1 = function WDatePicker(props) {
|
7551
|
+
var defaultValue = props.defaultValue,
|
7552
|
+
format = props.format,
|
7553
|
+
value = props.value,
|
7554
|
+
_onChange = props.onChange,
|
7555
|
+
extraProps = _objectWithoutProperties(props, _excluded$5);
|
7556
|
+
|
7557
|
+
return (
|
7558
|
+
/*#__PURE__*/
|
7559
|
+
// <ConfigProvider locale={zhCN}>
|
7560
|
+
React.createElement(_DatePicker, _objectSpread2({
|
7561
|
+
defaultValue: momentValue(defaultValue),
|
7562
|
+
value: momentValue(value),
|
7563
|
+
onChange: function onChange(v) {
|
7564
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(v, momentValue(v).format(format || 'YYYY-MM-DD'));
|
7565
|
+
}
|
7566
|
+
}, extraProps)) // </ConfigProvider>
|
7567
|
+
|
7568
|
+
);
|
7569
|
+
};
|
7570
|
+
|
7571
|
+
WDatePicker$1.defaultProps = {};
|
7572
|
+
|
7573
|
+
var RangePicker$2 = function RangePicker(props) {
|
7574
|
+
var defaultValue = props.defaultValue,
|
7575
|
+
value = props.value,
|
7576
|
+
format = props.format,
|
7577
|
+
_onChange2 = props.onChange,
|
7578
|
+
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
7579
|
+
|
7580
|
+
return (
|
7581
|
+
/*#__PURE__*/
|
7582
|
+
// <ConfigProvider locale={zhCN}>
|
7583
|
+
React.createElement(_DatePicker.RangePicker, _objectSpread2({
|
7584
|
+
defaultValue: momentValue(defaultValue),
|
7585
|
+
value: momentValue(value),
|
7586
|
+
onChange: function onChange(v) {
|
7587
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2(v, momentValue(v).format(format || 'YYYY-MM-DD'));
|
7588
|
+
}
|
7589
|
+
}, extraProps)) // </ConfigProvider>
|
7590
|
+
|
7591
|
+
);
|
7592
|
+
};
|
7593
|
+
|
7594
|
+
RangePicker$2.defaultProps = {};
|
7595
|
+
var Index$6 = WDatePicker$1;
|
7596
|
+
Index$6.RangePicker = RangePicker$2;
|
7597
|
+
|
7598
|
+
var _excluded$6 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onFormChange", "onSubmit", "onReset"];
|
7599
|
+
var RangePicker$3 = Index$6.RangePicker;
|
7537
7600
|
|
7538
7601
|
var WForm = function WForm(props, ref) {
|
7539
7602
|
var columns = props.columns,
|
@@ -7546,7 +7609,7 @@ var WForm = function WForm(props, ref) {
|
|
7546
7609
|
onFormChange = props.onFormChange,
|
7547
7610
|
onSubmit = props.onSubmit,
|
7548
7611
|
onReset = props.onReset,
|
7549
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
7612
|
+
extraProps = _objectWithoutProperties(props, _excluded$6);
|
7550
7613
|
|
7551
7614
|
var _Form$useForm = _Form.useForm(),
|
7552
7615
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
@@ -7710,7 +7773,7 @@ var WForm = function WForm(props, ref) {
|
|
7710
7773
|
name: c.dataIndex,
|
7711
7774
|
label: c.title,
|
7712
7775
|
labelCol: _labelCol2
|
7713
|
-
}), /*#__PURE__*/React.createElement(Index$
|
7776
|
+
}), /*#__PURE__*/React.createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
|
7714
7777
|
disabled: disabled,
|
7715
7778
|
placeholder: "\u8BF7\u8F93\u5165"
|
7716
7779
|
}, picker), showTime), c.fieldProps))));
|
@@ -7746,7 +7809,7 @@ var WForm = function WForm(props, ref) {
|
|
7746
7809
|
name: c.dataIndex,
|
7747
7810
|
label: c.title,
|
7748
7811
|
labelCol: _labelCol3
|
7749
|
-
}), /*#__PURE__*/React.createElement(RangePicker$
|
7812
|
+
}), /*#__PURE__*/React.createElement(RangePicker$3, _objectSpread2(_objectSpread2({
|
7750
7813
|
disabled: disabled
|
7751
7814
|
}, _showTime), c.fieldProps))));
|
7752
7815
|
} else if (c.valueType === 'checkbox') {
|
@@ -8173,7 +8236,7 @@ var WForm = function WForm(props, ref) {
|
|
8173
8236
|
name: c.dataIndex,
|
8174
8237
|
label: c.title,
|
8175
8238
|
labelCol: _labelCol13
|
8176
|
-
}), /*#__PURE__*/React.createElement(Index$
|
8239
|
+
}), /*#__PURE__*/React.createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
|
8177
8240
|
disabled: disabled,
|
8178
8241
|
placeholder: "\u8BF7\u8F93\u5165"
|
8179
8242
|
}, picker), showTime), c.fieldProps))));
|
@@ -8209,7 +8272,7 @@ var WForm = function WForm(props, ref) {
|
|
8209
8272
|
name: c.dataIndex,
|
8210
8273
|
label: c.title,
|
8211
8274
|
labelCol: _labelCol14
|
8212
|
-
}), /*#__PURE__*/React.createElement(RangePicker$
|
8275
|
+
}), /*#__PURE__*/React.createElement(RangePicker$3, _objectSpread2(_objectSpread2({
|
8213
8276
|
disabled: disabled
|
8214
8277
|
}, _showTime2), c.fieldProps))));
|
8215
8278
|
} else if (c.valueType === 'checkbox') {
|
@@ -8636,8 +8699,8 @@ var WForm = function WForm(props, ref) {
|
|
8636
8699
|
|
8637
8700
|
var WForm$1 = /*#__PURE__*/React.forwardRef(WForm);
|
8638
8701
|
|
8639
|
-
var _excluded$
|
8640
|
-
_excluded2$
|
8702
|
+
var _excluded$7 = ["height", "width", "count", "style", "numberStyle"],
|
8703
|
+
_excluded2$2 = ["count", "width", "height", "marginRight"];
|
8641
8704
|
|
8642
8705
|
var Number = function Number(_ref) {
|
8643
8706
|
var height = _ref.height,
|
@@ -8646,7 +8709,7 @@ var Number = function Number(_ref) {
|
|
8646
8709
|
count = _ref$count === void 0 ? 0 : _ref$count,
|
8647
8710
|
style = _ref.style,
|
8648
8711
|
numberStyle = _ref.numberStyle,
|
8649
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
8712
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
8650
8713
|
|
8651
8714
|
// 上次的值
|
8652
8715
|
var _useState = useState(0),
|
@@ -8766,13 +8829,13 @@ Number.defaultProps = {
|
|
8766
8829
|
height: 40
|
8767
8830
|
};
|
8768
8831
|
|
8769
|
-
var Index$
|
8832
|
+
var Index$7 = function Index(props) {
|
8770
8833
|
var count = props.count,
|
8771
8834
|
width = props.width,
|
8772
8835
|
height = props.height,
|
8773
8836
|
_props$marginRight = props.marginRight,
|
8774
8837
|
marginRight = _props$marginRight === void 0 ? '8px' : _props$marginRight,
|
8775
|
-
extraProps = _objectWithoutProperties(props, _excluded2$
|
8838
|
+
extraProps = _objectWithoutProperties(props, _excluded2$2);
|
8776
8839
|
|
8777
8840
|
var _useState9 = useState([]),
|
8778
8841
|
_useState10 = _slicedToArray(_useState9, 2),
|
@@ -8803,26 +8866,26 @@ var Index$6 = function Index(props) {
|
|
8803
8866
|
}));
|
8804
8867
|
};
|
8805
8868
|
|
8806
|
-
var _excluded$
|
8869
|
+
var _excluded$8 = ["duration"];
|
8807
8870
|
|
8808
|
-
var Index$
|
8871
|
+
var Index$8 = function Index(props) {
|
8809
8872
|
var _props$duration = props.duration,
|
8810
8873
|
duration = _props$duration === void 0 ? 2.75 : _props$duration,
|
8811
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
8874
|
+
extraProps = _objectWithoutProperties(props, _excluded$8);
|
8812
8875
|
return /*#__PURE__*/React.createElement(CountUp, _objectSpread2({
|
8813
8876
|
duration: duration
|
8814
8877
|
}, extraProps));
|
8815
8878
|
};
|
8816
8879
|
|
8817
|
-
Index$
|
8880
|
+
Index$8.defaultProps = {};
|
8818
8881
|
|
8819
|
-
var _excluded$
|
8820
|
-
var autoScrollInterval = null;
|
8882
|
+
var _excluded$9 = ["list", "render", "partSize"];
|
8821
8883
|
|
8822
8884
|
function AutoScroll(props) {
|
8823
8885
|
var inner1 = useRef();
|
8824
8886
|
var inner2 = useRef();
|
8825
8887
|
var outer = useRef();
|
8888
|
+
var timer = useRef(null);
|
8826
8889
|
useImperativeHandle(props.cref, function () {
|
8827
8890
|
return {
|
8828
8891
|
tryScroll: tryScroll
|
@@ -8843,8 +8906,8 @@ function AutoScroll(props) {
|
|
8843
8906
|
|
8844
8907
|
|
8845
8908
|
var startScroll = function startScroll() {
|
8846
|
-
if (!
|
8847
|
-
|
8909
|
+
if (!timer.current) {
|
8910
|
+
timer.current = setInterval(function () {
|
8848
8911
|
// 如果已经滚动到inner1的底部,则重置滚动的位置到inner1的头部
|
8849
8912
|
if (outer.current.scrollTop >= inner1.current.offsetHeight) {
|
8850
8913
|
outer.current.scrollTop = 0; // 触发complete事件
|
@@ -8864,8 +8927,11 @@ function AutoScroll(props) {
|
|
8864
8927
|
|
8865
8928
|
|
8866
8929
|
var stopScroll = function stopScroll() {
|
8867
|
-
|
8868
|
-
|
8930
|
+
if (timer.current) {
|
8931
|
+
clearInterval(timer.current);
|
8932
|
+
}
|
8933
|
+
|
8934
|
+
timer.current = null;
|
8869
8935
|
};
|
8870
8936
|
|
8871
8937
|
useEffect(function () {
|
@@ -8876,7 +8942,7 @@ function AutoScroll(props) {
|
|
8876
8942
|
return function () {
|
8877
8943
|
stopScroll();
|
8878
8944
|
};
|
8879
|
-
}, []);
|
8945
|
+
}, [timer]);
|
8880
8946
|
return /*#__PURE__*/React.createElement("div", {
|
8881
8947
|
className: "autoScroll-outer ".concat(props.className),
|
8882
8948
|
ref: outer,
|
@@ -8892,12 +8958,12 @@ function AutoScroll(props) {
|
|
8892
8958
|
}));
|
8893
8959
|
}
|
8894
8960
|
|
8895
|
-
var Index$
|
8961
|
+
var Index$9 = function Index(_ref) {
|
8896
8962
|
var list = _ref.list,
|
8897
8963
|
render = _ref.render,
|
8898
8964
|
_ref$partSize = _ref.partSize,
|
8899
8965
|
partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
|
8900
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
8966
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$9);
|
8901
8967
|
|
8902
8968
|
{
|
8903
8969
|
var _useState = useState([]),
|
@@ -8974,15 +9040,15 @@ var Index$8 = function Index(_ref) {
|
|
8974
9040
|
}
|
8975
9041
|
};
|
8976
9042
|
|
8977
|
-
var _excluded$
|
9043
|
+
var _excluded$a = ["data", "onClick", "renderItem"];
|
8978
9044
|
|
8979
9045
|
SwiperCore.use([Pagination, Navigation, Autoplay]);
|
8980
9046
|
|
8981
|
-
var Index$
|
9047
|
+
var Index$a = function Index(props) {
|
8982
9048
|
var data = props.data,
|
8983
9049
|
_onClick = props.onClick,
|
8984
9050
|
renderItem = props.renderItem,
|
8985
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
9051
|
+
extraProps = _objectWithoutProperties(props, _excluded$a);
|
8986
9052
|
|
8987
9053
|
return /*#__PURE__*/React.createElement(Swiper, _objectSpread2({
|
8988
9054
|
onClick: function onClick(swiper, event) {
|
@@ -9011,7 +9077,7 @@ var Index$9 = function Index(props) {
|
|
9011
9077
|
}));
|
9012
9078
|
};
|
9013
9079
|
|
9014
|
-
Index$
|
9080
|
+
Index$a.defaultProps = {};
|
9015
9081
|
|
9016
9082
|
function _extends$1() {
|
9017
9083
|
_extends$1 = Object.assign || function (target) {
|
@@ -9605,7 +9671,7 @@ function createBrowserHistory(props) {
|
|
9605
9671
|
return history;
|
9606
9672
|
}
|
9607
9673
|
|
9608
|
-
var _excluded$
|
9674
|
+
var _excluded$b = ["routes", "className"];
|
9609
9675
|
var history = createBrowserHistory();
|
9610
9676
|
|
9611
9677
|
function itemRender(route, params, routes, paths) {
|
@@ -9620,10 +9686,10 @@ function itemRender(route, params, routes, paths) {
|
|
9620
9686
|
}, route.breadcrumbName);
|
9621
9687
|
}
|
9622
9688
|
|
9623
|
-
var Index$
|
9689
|
+
var Index$b = function Index(_ref) {
|
9624
9690
|
var routes = _ref.routes,
|
9625
9691
|
className = _ref.className,
|
9626
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
9692
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
9627
9693
|
|
9628
9694
|
return /*#__PURE__*/React.createElement(_Breadcrumb, _objectSpread2({
|
9629
9695
|
className: className || 'default',
|
@@ -9633,9 +9699,9 @@ var Index$a = function Index(_ref) {
|
|
9633
9699
|
}, props));
|
9634
9700
|
};
|
9635
9701
|
|
9636
|
-
var _excluded$
|
9702
|
+
var _excluded$c = ["title", "className", "headerTail", "headerCenter"];
|
9637
9703
|
|
9638
|
-
var Index$
|
9704
|
+
var Index$c = function Index(_ref) {
|
9639
9705
|
var _classNames;
|
9640
9706
|
|
9641
9707
|
var title = _ref.title,
|
@@ -9643,7 +9709,7 @@ var Index$b = function Index(_ref) {
|
|
9643
9709
|
className = _ref$className === void 0 ? 'default' : _ref$className,
|
9644
9710
|
headerTail = _ref.headerTail,
|
9645
9711
|
headerCenter = _ref.headerCenter,
|
9646
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
9712
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
9647
9713
|
|
9648
9714
|
return /*#__PURE__*/React.createElement("div", _objectSpread2({
|
9649
9715
|
className: classnames((_classNames = {}, _defineProperty(_classNames, 'card-container', true), _defineProperty(_classNames, className, true), _classNames))
|
@@ -9662,7 +9728,7 @@ var Index$b = function Index(_ref) {
|
|
9662
9728
|
}, props.children))));
|
9663
9729
|
};
|
9664
9730
|
|
9665
|
-
Index$
|
9731
|
+
Index$c.defaultProps = {};
|
9666
9732
|
|
9667
9733
|
var controlShow = function controlShow(f1, f2, value, timer) {
|
9668
9734
|
f1(value);
|
@@ -9750,7 +9816,7 @@ function DialogModel(props) {
|
|
9750
9816
|
return renderChildren;
|
9751
9817
|
}
|
9752
9818
|
|
9753
|
-
var _excluded$
|
9819
|
+
var _excluded$d = ["visible"];
|
9754
9820
|
|
9755
9821
|
var Modal = /*#__PURE__*/function (_React$PureComponent) {
|
9756
9822
|
_inherits(Modal, _React$PureComponent);
|
@@ -9882,7 +9948,7 @@ Modal.show = function (config) {
|
|
9882
9948
|
manager.setShow = setShow;
|
9883
9949
|
|
9884
9950
|
var visible = props.visible,
|
9885
|
-
trueProps = _objectWithoutProperties(props, _excluded$
|
9951
|
+
trueProps = _objectWithoutProperties(props, _excluded$d);
|
9886
9952
|
|
9887
9953
|
useEffect(function () {
|
9888
9954
|
manager.mounted = true;
|
@@ -9906,7 +9972,7 @@ Modal.hidden = function () {
|
|
9906
9972
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
9907
9973
|
};
|
9908
9974
|
|
9909
|
-
var _excluded$
|
9975
|
+
var _excluded$e = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
|
9910
9976
|
|
9911
9977
|
var ModalForm = function ModalForm(props, ref) {
|
9912
9978
|
var columns = props.columns,
|
@@ -9920,7 +9986,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9920
9986
|
title = props.title,
|
9921
9987
|
record = props.record,
|
9922
9988
|
onFormChange = props.onFormChange,
|
9923
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
9989
|
+
extraProps = _objectWithoutProperties(props, _excluded$e);
|
9924
9990
|
|
9925
9991
|
var formRef = useRef(null);
|
9926
9992
|
|
@@ -10051,7 +10117,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10051
10117
|
|
10052
10118
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
10053
10119
|
|
10054
|
-
var _excluded$
|
10120
|
+
var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
|
10055
10121
|
|
10056
10122
|
var TabelCard = function TabelCard(props, ref) {
|
10057
10123
|
var columns = props.columns,
|
@@ -10065,7 +10131,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10065
10131
|
onFormChange = props.onFormChange,
|
10066
10132
|
modalConfig = props.modalConfig,
|
10067
10133
|
optionColumnConfig = props.optionColumnConfig,
|
10068
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
10134
|
+
extraProps = _objectWithoutProperties(props, _excluded$f);
|
10069
10135
|
|
10070
10136
|
var actionRef = useRef();
|
10071
10137
|
var formRef = useRef(null);
|
@@ -10355,7 +10421,19 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10355
10421
|
onFormChange: onFormChange,
|
10356
10422
|
extraColumns: extraColumns || [],
|
10357
10423
|
columns: (columns || []).filter(function (item) {
|
10358
|
-
|
10424
|
+
if (item.hiddenInModalForm) {
|
10425
|
+
return false;
|
10426
|
+
}
|
10427
|
+
|
10428
|
+
if (item.onlyShowInView) {
|
10429
|
+
if (modalFormConfig.type === '查看') {
|
10430
|
+
return true;
|
10431
|
+
} else {
|
10432
|
+
return false;
|
10433
|
+
}
|
10434
|
+
}
|
10435
|
+
|
10436
|
+
return true;
|
10359
10437
|
})
|
10360
10438
|
})), /*#__PURE__*/React.createElement(ProTable, _objectSpread2({
|
10361
10439
|
actionRef: actionRef,
|
@@ -10372,7 +10450,23 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10372
10450
|
render: function render(_, record, index) {
|
10373
10451
|
return tableActionDom(record, index);
|
10374
10452
|
}
|
10375
|
-
}, optionColumnConfig)])
|
10453
|
+
}, optionColumnConfig)]).map(function (item) {
|
10454
|
+
var obj = _objectSpread2({}, item);
|
10455
|
+
|
10456
|
+
if (item.notInitialValueInSearch) {
|
10457
|
+
delete obj.initialValue;
|
10458
|
+
}
|
10459
|
+
|
10460
|
+
return obj;
|
10461
|
+
}) : (columns || []).map(function (item) {
|
10462
|
+
var obj = _objectSpread2({}, item);
|
10463
|
+
|
10464
|
+
if (item.notInitialValueInSearch) {
|
10465
|
+
delete obj.initialValue;
|
10466
|
+
}
|
10467
|
+
|
10468
|
+
return obj;
|
10469
|
+
}),
|
10376
10470
|
search: {
|
10377
10471
|
labelWidth: 'auto',
|
10378
10472
|
optionRender: function optionRender(searchConfig, formProps, dom) {
|
@@ -10387,4 +10481,4 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10387
10481
|
|
10388
10482
|
var index$1 = /*#__PURE__*/React.forwardRef(TabelCard);
|
10389
10483
|
|
10390
|
-
export { Index$
|
10484
|
+
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, Index$c as Card, Index$4 as Checkbox, Index$8 as CountUp, Index$2 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Index$7 as Number, NumericInput, Index$3 as Radio, Index$1 as Select, Index$a as Swiper, WSwitch as Switch, index$1 as TabelCard, Table, Index$5 as TreeSelect, Index$6 as WDatePicker, WForm$1 as WForm };
|
package/dist/index.js
CHANGED
@@ -556,6 +556,11 @@ var WSelect = function WSelect(props) {
|
|
556
556
|
valueEnumList = _useState4[0],
|
557
557
|
setValueEnumList = _useState4[1];
|
558
558
|
|
559
|
+
var _useState5 = React.useState(null),
|
560
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
561
|
+
resList = _useState6[0],
|
562
|
+
setResList = _useState6[1];
|
563
|
+
|
559
564
|
React.useEffect(function () {
|
560
565
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
561
566
|
var res, node;
|
@@ -564,7 +569,7 @@ var WSelect = function WSelect(props) {
|
|
564
569
|
switch (_context.prev = _context.next) {
|
565
570
|
case 0:
|
566
571
|
if (!request) {
|
567
|
-
_context.next =
|
572
|
+
_context.next = 8;
|
568
573
|
break;
|
569
574
|
}
|
570
575
|
|
@@ -573,6 +578,7 @@ var WSelect = function WSelect(props) {
|
|
573
578
|
|
574
579
|
case 3:
|
575
580
|
res = _context.sent;
|
581
|
+
setResList(res);
|
576
582
|
onLoad && onLoad(res);
|
577
583
|
node = res.map(function (item) {
|
578
584
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'].Option, {
|
@@ -582,7 +588,7 @@ var WSelect = function WSelect(props) {
|
|
582
588
|
});
|
583
589
|
setChildrenNode(node);
|
584
590
|
|
585
|
-
case
|
591
|
+
case 8:
|
586
592
|
case "end":
|
587
593
|
return _context.stop();
|
588
594
|
}
|
@@ -618,7 +624,7 @@ var WSelect = function WSelect(props) {
|
|
618
624
|
|
619
625
|
onLoad && onLoad(options);
|
620
626
|
setValueEnumList(valueEnumNode);
|
621
|
-
}, []);
|
627
|
+
}, [JSON.stringify(resList)]);
|
622
628
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread2({}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
623
629
|
};
|
624
630
|
|
@@ -7565,8 +7571,65 @@ Table.defaultProps = {
|
|
7565
7571
|
rowKey: 'key'
|
7566
7572
|
};
|
7567
7573
|
|
7568
|
-
var _excluded$5 = ["
|
7569
|
-
|
7574
|
+
var _excluded$5 = ["defaultValue", "format", "value", "onChange"],
|
7575
|
+
_excluded2$1 = ["defaultValue", "value", "format", "onChange"];
|
7576
|
+
|
7577
|
+
var momentValue = function momentValue(value) {
|
7578
|
+
if (value) {
|
7579
|
+
return hooks(value);
|
7580
|
+
}
|
7581
|
+
};
|
7582
|
+
|
7583
|
+
var WDatePicker$1 = function WDatePicker(props) {
|
7584
|
+
var defaultValue = props.defaultValue,
|
7585
|
+
format = props.format,
|
7586
|
+
value = props.value,
|
7587
|
+
_onChange = props.onChange,
|
7588
|
+
extraProps = _objectWithoutProperties(props, _excluded$5);
|
7589
|
+
|
7590
|
+
return (
|
7591
|
+
/*#__PURE__*/
|
7592
|
+
// <ConfigProvider locale={zhCN}>
|
7593
|
+
React__default['default'].createElement(_DatePicker__default['default'], _objectSpread2({
|
7594
|
+
defaultValue: momentValue(defaultValue),
|
7595
|
+
value: momentValue(value),
|
7596
|
+
onChange: function onChange(v) {
|
7597
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(v, momentValue(v).format(format || 'YYYY-MM-DD'));
|
7598
|
+
}
|
7599
|
+
}, extraProps)) // </ConfigProvider>
|
7600
|
+
|
7601
|
+
);
|
7602
|
+
};
|
7603
|
+
|
7604
|
+
WDatePicker$1.defaultProps = {};
|
7605
|
+
|
7606
|
+
var RangePicker$2 = function RangePicker(props) {
|
7607
|
+
var defaultValue = props.defaultValue,
|
7608
|
+
value = props.value,
|
7609
|
+
format = props.format,
|
7610
|
+
_onChange2 = props.onChange,
|
7611
|
+
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
7612
|
+
|
7613
|
+
return (
|
7614
|
+
/*#__PURE__*/
|
7615
|
+
// <ConfigProvider locale={zhCN}>
|
7616
|
+
React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({
|
7617
|
+
defaultValue: momentValue(defaultValue),
|
7618
|
+
value: momentValue(value),
|
7619
|
+
onChange: function onChange(v) {
|
7620
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2(v, momentValue(v).format(format || 'YYYY-MM-DD'));
|
7621
|
+
}
|
7622
|
+
}, extraProps)) // </ConfigProvider>
|
7623
|
+
|
7624
|
+
);
|
7625
|
+
};
|
7626
|
+
|
7627
|
+
RangePicker$2.defaultProps = {};
|
7628
|
+
var Index$6 = WDatePicker$1;
|
7629
|
+
Index$6.RangePicker = RangePicker$2;
|
7630
|
+
|
7631
|
+
var _excluded$6 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onFormChange", "onSubmit", "onReset"];
|
7632
|
+
var RangePicker$3 = Index$6.RangePicker;
|
7570
7633
|
|
7571
7634
|
var WForm = function WForm(props, ref) {
|
7572
7635
|
var columns = props.columns,
|
@@ -7579,7 +7642,7 @@ var WForm = function WForm(props, ref) {
|
|
7579
7642
|
onFormChange = props.onFormChange,
|
7580
7643
|
onSubmit = props.onSubmit,
|
7581
7644
|
onReset = props.onReset,
|
7582
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
7645
|
+
extraProps = _objectWithoutProperties(props, _excluded$6);
|
7583
7646
|
|
7584
7647
|
var _Form$useForm = _Form__default['default'].useForm(),
|
7585
7648
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
@@ -7743,7 +7806,7 @@ var WForm = function WForm(props, ref) {
|
|
7743
7806
|
name: c.dataIndex,
|
7744
7807
|
label: c.title,
|
7745
7808
|
labelCol: _labelCol2
|
7746
|
-
}), /*#__PURE__*/React__default['default'].createElement(Index$
|
7809
|
+
}), /*#__PURE__*/React__default['default'].createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
|
7747
7810
|
disabled: disabled,
|
7748
7811
|
placeholder: "\u8BF7\u8F93\u5165"
|
7749
7812
|
}, picker), showTime), c.fieldProps))));
|
@@ -7779,7 +7842,7 @@ var WForm = function WForm(props, ref) {
|
|
7779
7842
|
name: c.dataIndex,
|
7780
7843
|
label: c.title,
|
7781
7844
|
labelCol: _labelCol3
|
7782
|
-
}), /*#__PURE__*/React__default['default'].createElement(RangePicker$
|
7845
|
+
}), /*#__PURE__*/React__default['default'].createElement(RangePicker$3, _objectSpread2(_objectSpread2({
|
7783
7846
|
disabled: disabled
|
7784
7847
|
}, _showTime), c.fieldProps))));
|
7785
7848
|
} else if (c.valueType === 'checkbox') {
|
@@ -8206,7 +8269,7 @@ var WForm = function WForm(props, ref) {
|
|
8206
8269
|
name: c.dataIndex,
|
8207
8270
|
label: c.title,
|
8208
8271
|
labelCol: _labelCol13
|
8209
|
-
}), /*#__PURE__*/React__default['default'].createElement(Index$
|
8272
|
+
}), /*#__PURE__*/React__default['default'].createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
|
8210
8273
|
disabled: disabled,
|
8211
8274
|
placeholder: "\u8BF7\u8F93\u5165"
|
8212
8275
|
}, picker), showTime), c.fieldProps))));
|
@@ -8242,7 +8305,7 @@ var WForm = function WForm(props, ref) {
|
|
8242
8305
|
name: c.dataIndex,
|
8243
8306
|
label: c.title,
|
8244
8307
|
labelCol: _labelCol14
|
8245
|
-
}), /*#__PURE__*/React__default['default'].createElement(RangePicker$
|
8308
|
+
}), /*#__PURE__*/React__default['default'].createElement(RangePicker$3, _objectSpread2(_objectSpread2({
|
8246
8309
|
disabled: disabled
|
8247
8310
|
}, _showTime2), c.fieldProps))));
|
8248
8311
|
} else if (c.valueType === 'checkbox') {
|
@@ -8669,8 +8732,8 @@ var WForm = function WForm(props, ref) {
|
|
8669
8732
|
|
8670
8733
|
var WForm$1 = /*#__PURE__*/React__default['default'].forwardRef(WForm);
|
8671
8734
|
|
8672
|
-
var _excluded$
|
8673
|
-
_excluded2$
|
8735
|
+
var _excluded$7 = ["height", "width", "count", "style", "numberStyle"],
|
8736
|
+
_excluded2$2 = ["count", "width", "height", "marginRight"];
|
8674
8737
|
|
8675
8738
|
var Number = function Number(_ref) {
|
8676
8739
|
var height = _ref.height,
|
@@ -8679,7 +8742,7 @@ var Number = function Number(_ref) {
|
|
8679
8742
|
count = _ref$count === void 0 ? 0 : _ref$count,
|
8680
8743
|
style = _ref.style,
|
8681
8744
|
numberStyle = _ref.numberStyle,
|
8682
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
8745
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
8683
8746
|
|
8684
8747
|
// 上次的值
|
8685
8748
|
var _useState = React.useState(0),
|
@@ -8799,13 +8862,13 @@ Number.defaultProps = {
|
|
8799
8862
|
height: 40
|
8800
8863
|
};
|
8801
8864
|
|
8802
|
-
var Index$
|
8865
|
+
var Index$7 = function Index(props) {
|
8803
8866
|
var count = props.count,
|
8804
8867
|
width = props.width,
|
8805
8868
|
height = props.height,
|
8806
8869
|
_props$marginRight = props.marginRight,
|
8807
8870
|
marginRight = _props$marginRight === void 0 ? '8px' : _props$marginRight,
|
8808
|
-
extraProps = _objectWithoutProperties(props, _excluded2$
|
8871
|
+
extraProps = _objectWithoutProperties(props, _excluded2$2);
|
8809
8872
|
|
8810
8873
|
var _useState9 = React.useState([]),
|
8811
8874
|
_useState10 = _slicedToArray(_useState9, 2),
|
@@ -8836,26 +8899,26 @@ var Index$6 = function Index(props) {
|
|
8836
8899
|
}));
|
8837
8900
|
};
|
8838
8901
|
|
8839
|
-
var _excluded$
|
8902
|
+
var _excluded$8 = ["duration"];
|
8840
8903
|
|
8841
|
-
var Index$
|
8904
|
+
var Index$8 = function Index(props) {
|
8842
8905
|
var _props$duration = props.duration,
|
8843
8906
|
duration = _props$duration === void 0 ? 2.75 : _props$duration,
|
8844
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
8907
|
+
extraProps = _objectWithoutProperties(props, _excluded$8);
|
8845
8908
|
return /*#__PURE__*/React__default['default'].createElement(CountUp__default['default'], _objectSpread2({
|
8846
8909
|
duration: duration
|
8847
8910
|
}, extraProps));
|
8848
8911
|
};
|
8849
8912
|
|
8850
|
-
Index$
|
8913
|
+
Index$8.defaultProps = {};
|
8851
8914
|
|
8852
|
-
var _excluded$
|
8853
|
-
var autoScrollInterval = null;
|
8915
|
+
var _excluded$9 = ["list", "render", "partSize"];
|
8854
8916
|
|
8855
8917
|
function AutoScroll(props) {
|
8856
8918
|
var inner1 = React.useRef();
|
8857
8919
|
var inner2 = React.useRef();
|
8858
8920
|
var outer = React.useRef();
|
8921
|
+
var timer = React.useRef(null);
|
8859
8922
|
React.useImperativeHandle(props.cref, function () {
|
8860
8923
|
return {
|
8861
8924
|
tryScroll: tryScroll
|
@@ -8876,8 +8939,8 @@ function AutoScroll(props) {
|
|
8876
8939
|
|
8877
8940
|
|
8878
8941
|
var startScroll = function startScroll() {
|
8879
|
-
if (!
|
8880
|
-
|
8942
|
+
if (!timer.current) {
|
8943
|
+
timer.current = setInterval(function () {
|
8881
8944
|
// 如果已经滚动到inner1的底部,则重置滚动的位置到inner1的头部
|
8882
8945
|
if (outer.current.scrollTop >= inner1.current.offsetHeight) {
|
8883
8946
|
outer.current.scrollTop = 0; // 触发complete事件
|
@@ -8897,8 +8960,11 @@ function AutoScroll(props) {
|
|
8897
8960
|
|
8898
8961
|
|
8899
8962
|
var stopScroll = function stopScroll() {
|
8900
|
-
|
8901
|
-
|
8963
|
+
if (timer.current) {
|
8964
|
+
clearInterval(timer.current);
|
8965
|
+
}
|
8966
|
+
|
8967
|
+
timer.current = null;
|
8902
8968
|
};
|
8903
8969
|
|
8904
8970
|
React.useEffect(function () {
|
@@ -8909,7 +8975,7 @@ function AutoScroll(props) {
|
|
8909
8975
|
return function () {
|
8910
8976
|
stopScroll();
|
8911
8977
|
};
|
8912
|
-
}, []);
|
8978
|
+
}, [timer]);
|
8913
8979
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
8914
8980
|
className: "autoScroll-outer ".concat(props.className),
|
8915
8981
|
ref: outer,
|
@@ -8925,12 +8991,12 @@ function AutoScroll(props) {
|
|
8925
8991
|
}));
|
8926
8992
|
}
|
8927
8993
|
|
8928
|
-
var Index$
|
8994
|
+
var Index$9 = function Index(_ref) {
|
8929
8995
|
var list = _ref.list,
|
8930
8996
|
render = _ref.render,
|
8931
8997
|
_ref$partSize = _ref.partSize,
|
8932
8998
|
partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
|
8933
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
8999
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$9);
|
8934
9000
|
|
8935
9001
|
{
|
8936
9002
|
var _useState = React.useState([]),
|
@@ -9007,15 +9073,15 @@ var Index$8 = function Index(_ref) {
|
|
9007
9073
|
}
|
9008
9074
|
};
|
9009
9075
|
|
9010
|
-
var _excluded$
|
9076
|
+
var _excluded$a = ["data", "onClick", "renderItem"];
|
9011
9077
|
|
9012
9078
|
SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay]);
|
9013
9079
|
|
9014
|
-
var Index$
|
9080
|
+
var Index$a = function Index(props) {
|
9015
9081
|
var data = props.data,
|
9016
9082
|
_onClick = props.onClick,
|
9017
9083
|
renderItem = props.renderItem,
|
9018
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
9084
|
+
extraProps = _objectWithoutProperties(props, _excluded$a);
|
9019
9085
|
|
9020
9086
|
return /*#__PURE__*/React__default['default'].createElement(react.Swiper, _objectSpread2({
|
9021
9087
|
onClick: function onClick(swiper, event) {
|
@@ -9044,7 +9110,7 @@ var Index$9 = function Index(props) {
|
|
9044
9110
|
}));
|
9045
9111
|
};
|
9046
9112
|
|
9047
|
-
Index$
|
9113
|
+
Index$a.defaultProps = {};
|
9048
9114
|
|
9049
9115
|
function _extends$1() {
|
9050
9116
|
_extends$1 = Object.assign || function (target) {
|
@@ -9638,7 +9704,7 @@ function createBrowserHistory(props) {
|
|
9638
9704
|
return history;
|
9639
9705
|
}
|
9640
9706
|
|
9641
|
-
var _excluded$
|
9707
|
+
var _excluded$b = ["routes", "className"];
|
9642
9708
|
var history = createBrowserHistory();
|
9643
9709
|
|
9644
9710
|
function itemRender(route, params, routes, paths) {
|
@@ -9653,10 +9719,10 @@ function itemRender(route, params, routes, paths) {
|
|
9653
9719
|
}, route.breadcrumbName);
|
9654
9720
|
}
|
9655
9721
|
|
9656
|
-
var Index$
|
9722
|
+
var Index$b = function Index(_ref) {
|
9657
9723
|
var routes = _ref.routes,
|
9658
9724
|
className = _ref.className,
|
9659
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
9725
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
9660
9726
|
|
9661
9727
|
return /*#__PURE__*/React__default['default'].createElement(_Breadcrumb__default['default'], _objectSpread2({
|
9662
9728
|
className: className || 'default',
|
@@ -9666,9 +9732,9 @@ var Index$a = function Index(_ref) {
|
|
9666
9732
|
}, props));
|
9667
9733
|
};
|
9668
9734
|
|
9669
|
-
var _excluded$
|
9735
|
+
var _excluded$c = ["title", "className", "headerTail", "headerCenter"];
|
9670
9736
|
|
9671
|
-
var Index$
|
9737
|
+
var Index$c = function Index(_ref) {
|
9672
9738
|
var _classNames;
|
9673
9739
|
|
9674
9740
|
var title = _ref.title,
|
@@ -9676,7 +9742,7 @@ var Index$b = function Index(_ref) {
|
|
9676
9742
|
className = _ref$className === void 0 ? 'default' : _ref$className,
|
9677
9743
|
headerTail = _ref.headerTail,
|
9678
9744
|
headerCenter = _ref.headerCenter,
|
9679
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
9745
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
9680
9746
|
|
9681
9747
|
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread2({
|
9682
9748
|
className: classnames__default['default']((_classNames = {}, _defineProperty(_classNames, 'card-container', true), _defineProperty(_classNames, className, true), _classNames))
|
@@ -9695,7 +9761,7 @@ var Index$b = function Index(_ref) {
|
|
9695
9761
|
}, props.children))));
|
9696
9762
|
};
|
9697
9763
|
|
9698
|
-
Index$
|
9764
|
+
Index$c.defaultProps = {};
|
9699
9765
|
|
9700
9766
|
var controlShow = function controlShow(f1, f2, value, timer) {
|
9701
9767
|
f1(value);
|
@@ -9783,7 +9849,7 @@ function DialogModel(props) {
|
|
9783
9849
|
return renderChildren;
|
9784
9850
|
}
|
9785
9851
|
|
9786
|
-
var _excluded$
|
9852
|
+
var _excluded$d = ["visible"];
|
9787
9853
|
|
9788
9854
|
var Modal = /*#__PURE__*/function (_React$PureComponent) {
|
9789
9855
|
_inherits(Modal, _React$PureComponent);
|
@@ -9915,7 +9981,7 @@ Modal.show = function (config) {
|
|
9915
9981
|
manager.setShow = setShow;
|
9916
9982
|
|
9917
9983
|
var visible = props.visible,
|
9918
|
-
trueProps = _objectWithoutProperties(props, _excluded$
|
9984
|
+
trueProps = _objectWithoutProperties(props, _excluded$d);
|
9919
9985
|
|
9920
9986
|
React.useEffect(function () {
|
9921
9987
|
manager.mounted = true;
|
@@ -9939,7 +10005,7 @@ Modal.hidden = function () {
|
|
9939
10005
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
9940
10006
|
};
|
9941
10007
|
|
9942
|
-
var _excluded$
|
10008
|
+
var _excluded$e = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
|
9943
10009
|
|
9944
10010
|
var ModalForm = function ModalForm(props, ref) {
|
9945
10011
|
var columns = props.columns,
|
@@ -9953,7 +10019,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9953
10019
|
title = props.title,
|
9954
10020
|
record = props.record,
|
9955
10021
|
onFormChange = props.onFormChange,
|
9956
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
10022
|
+
extraProps = _objectWithoutProperties(props, _excluded$e);
|
9957
10023
|
|
9958
10024
|
var formRef = React.useRef(null);
|
9959
10025
|
|
@@ -10084,7 +10150,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10084
10150
|
|
10085
10151
|
var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
|
10086
10152
|
|
10087
|
-
var _excluded$
|
10153
|
+
var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
|
10088
10154
|
|
10089
10155
|
var TabelCard = function TabelCard(props, ref) {
|
10090
10156
|
var columns = props.columns,
|
@@ -10098,7 +10164,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10098
10164
|
onFormChange = props.onFormChange,
|
10099
10165
|
modalConfig = props.modalConfig,
|
10100
10166
|
optionColumnConfig = props.optionColumnConfig,
|
10101
|
-
extraProps = _objectWithoutProperties(props, _excluded$
|
10167
|
+
extraProps = _objectWithoutProperties(props, _excluded$f);
|
10102
10168
|
|
10103
10169
|
var actionRef = React.useRef();
|
10104
10170
|
var formRef = React.useRef(null);
|
@@ -10388,7 +10454,19 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10388
10454
|
onFormChange: onFormChange,
|
10389
10455
|
extraColumns: extraColumns || [],
|
10390
10456
|
columns: (columns || []).filter(function (item) {
|
10391
|
-
|
10457
|
+
if (item.hiddenInModalForm) {
|
10458
|
+
return false;
|
10459
|
+
}
|
10460
|
+
|
10461
|
+
if (item.onlyShowInView) {
|
10462
|
+
if (modalFormConfig.type === '查看') {
|
10463
|
+
return true;
|
10464
|
+
} else {
|
10465
|
+
return false;
|
10466
|
+
}
|
10467
|
+
}
|
10468
|
+
|
10469
|
+
return true;
|
10392
10470
|
})
|
10393
10471
|
})), /*#__PURE__*/React__default['default'].createElement(ProTable__default['default'], _objectSpread2({
|
10394
10472
|
actionRef: actionRef,
|
@@ -10405,7 +10483,23 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10405
10483
|
render: function render(_, record, index) {
|
10406
10484
|
return tableActionDom(record, index);
|
10407
10485
|
}
|
10408
|
-
}, optionColumnConfig)])
|
10486
|
+
}, optionColumnConfig)]).map(function (item) {
|
10487
|
+
var obj = _objectSpread2({}, item);
|
10488
|
+
|
10489
|
+
if (item.notInitialValueInSearch) {
|
10490
|
+
delete obj.initialValue;
|
10491
|
+
}
|
10492
|
+
|
10493
|
+
return obj;
|
10494
|
+
}) : (columns || []).map(function (item) {
|
10495
|
+
var obj = _objectSpread2({}, item);
|
10496
|
+
|
10497
|
+
if (item.notInitialValueInSearch) {
|
10498
|
+
delete obj.initialValue;
|
10499
|
+
}
|
10500
|
+
|
10501
|
+
return obj;
|
10502
|
+
}),
|
10409
10503
|
search: {
|
10410
10504
|
labelWidth: 'auto',
|
10411
10505
|
optionRender: function optionRender(searchConfig, formProps, dom) {
|
@@ -10420,25 +10514,26 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10420
10514
|
|
10421
10515
|
var index$1 = /*#__PURE__*/React__default['default'].forwardRef(TabelCard);
|
10422
10516
|
|
10423
|
-
exports.AutoScroll = Index$
|
10424
|
-
exports.Breadcrumb = Index$
|
10517
|
+
exports.AutoScroll = Index$9;
|
10518
|
+
exports.Breadcrumb = Index$b;
|
10425
10519
|
exports.Button = WButton;
|
10426
|
-
exports.Card = Index$
|
10520
|
+
exports.Card = Index$c;
|
10427
10521
|
exports.Checkbox = Index$4;
|
10428
|
-
exports.CountUp = Index$
|
10522
|
+
exports.CountUp = Index$8;
|
10429
10523
|
exports.DatePicker = Index$2;
|
10430
10524
|
exports.IconFont = index;
|
10431
10525
|
exports.Input = Index;
|
10432
10526
|
exports.InputNumber = WInputNumber;
|
10433
10527
|
exports.Modal = Modal;
|
10434
10528
|
exports.ModalForm = ModalForm$1;
|
10435
|
-
exports.Number = Index$
|
10529
|
+
exports.Number = Index$7;
|
10436
10530
|
exports.NumericInput = NumericInput;
|
10437
10531
|
exports.Radio = Index$3;
|
10438
10532
|
exports.Select = Index$1;
|
10439
|
-
exports.Swiper = Index$
|
10533
|
+
exports.Swiper = Index$a;
|
10440
10534
|
exports.Switch = WSwitch;
|
10441
10535
|
exports.TabelCard = index$1;
|
10442
10536
|
exports.Table = Table;
|
10443
10537
|
exports.TreeSelect = Index$5;
|
10538
|
+
exports.WDatePicker = Index$6;
|
10444
10539
|
exports.WForm = WForm$1;
|
package/package.json
CHANGED