wargerm 0.3.9 → 0.3.12
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/Select/index.d.ts +3 -2
- package/dist/index.esm.js +51 -51
- package/dist/index.js +51 -51
- package/package.json +2 -2
@@ -5,10 +5,11 @@ export interface IOptionProps extends OptionProps {
|
|
5
5
|
export interface ISelect extends SelectProps<any> {
|
6
6
|
request?: () => Promise<any>;
|
7
7
|
valueEnum?: Record<string, any>;
|
8
|
+
params?: Record<string, any>;
|
8
9
|
onLoad?: (options: Record<string, any>[]) => void;
|
9
10
|
}
|
10
11
|
export declare type IWSelectComponent = React.FC<ISelect> & {
|
11
12
|
Option?: React.FC<IOptionProps>;
|
12
13
|
};
|
13
|
-
declare
|
14
|
-
export default
|
14
|
+
declare const _default: React.NamedExoticComponent<ISelect>;
|
15
|
+
export default _default;
|
package/dist/index.esm.js
CHANGED
@@ -496,12 +496,7 @@ WInputNumber.defaultProps = {};
|
|
496
496
|
var WDatePicker = function WDatePicker(props) {
|
497
497
|
var extraProps = _extends({}, props);
|
498
498
|
|
499
|
-
return (
|
500
|
-
/*#__PURE__*/
|
501
|
-
// <ConfigProvider locale={zhCN}>
|
502
|
-
React.createElement(_DatePicker, _objectSpread2({}, extraProps)) // </ConfigProvider>
|
503
|
-
|
504
|
-
);
|
499
|
+
return /*#__PURE__*/React.createElement(_DatePicker, _objectSpread2({}, extraProps));
|
505
500
|
};
|
506
501
|
|
507
502
|
WDatePicker.defaultProps = {};
|
@@ -509,12 +504,7 @@ WDatePicker.defaultProps = {};
|
|
509
504
|
var RangePicker = function RangePicker(props) {
|
510
505
|
var extraProps = _extends({}, props);
|
511
506
|
|
512
|
-
return (
|
513
|
-
/*#__PURE__*/
|
514
|
-
// <ConfigProvider locale={zhCN}>
|
515
|
-
React.createElement(_DatePicker.RangePicker, _objectSpread2({}, extraProps)) // </ConfigProvider>
|
516
|
-
|
517
|
-
);
|
507
|
+
return /*#__PURE__*/React.createElement(_DatePicker.RangePicker, _objectSpread2({}, extraProps));
|
518
508
|
};
|
519
509
|
|
520
510
|
RangePicker.defaultProps = {};
|
@@ -649,7 +639,7 @@ function FrameBox(_ref) {
|
|
649
639
|
}), children);
|
650
640
|
}
|
651
641
|
|
652
|
-
var _excluded$2 = ["request", "valueEnum", "onLoad", "children"],
|
642
|
+
var _excluded$2 = ["request", "valueEnum", "onLoad", "children", "params"],
|
653
643
|
_excluded2 = ["children"];
|
654
644
|
|
655
645
|
var WSelect = function WSelect(props) {
|
@@ -657,6 +647,7 @@ var WSelect = function WSelect(props) {
|
|
657
647
|
valueEnum = props.valueEnum,
|
658
648
|
onLoad = props.onLoad,
|
659
649
|
children = props.children,
|
650
|
+
params = props.params,
|
660
651
|
extraProps = _objectWithoutProperties(props, _excluded$2);
|
661
652
|
|
662
653
|
var _useState = useState([]),
|
@@ -737,7 +728,7 @@ var WSelect = function WSelect(props) {
|
|
737
728
|
|
738
729
|
onLoad && onLoad(options);
|
739
730
|
setValueEnumList(valueEnumNode);
|
740
|
-
}, [JSON.stringify(resList), request]);
|
731
|
+
}, [JSON.stringify(resList), JSON.stringify(request), JSON.stringify(params || {})]);
|
741
732
|
return /*#__PURE__*/React.createElement(_Select, _objectSpread2({}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
742
733
|
};
|
743
734
|
|
@@ -752,6 +743,7 @@ var Option = function Option(props) {
|
|
752
743
|
|
753
744
|
var Index$4 = WSelect;
|
754
745
|
Index$4.Option = Option;
|
746
|
+
var Select = /*#__PURE__*/React.memo(Index$4);
|
755
747
|
|
756
748
|
//! moment.js
|
757
749
|
//! version : 2.29.1
|
@@ -6421,6 +6413,8 @@ var momentValue = function momentValue(value) {
|
|
6421
6413
|
if (value) {
|
6422
6414
|
return hooks(value);
|
6423
6415
|
}
|
6416
|
+
|
6417
|
+
return value;
|
6424
6418
|
};
|
6425
6419
|
|
6426
6420
|
var WDatePicker$1 = function WDatePicker(props) {
|
@@ -6430,20 +6424,15 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
6430
6424
|
_onChange = props.onChange,
|
6431
6425
|
extraProps = _objectWithoutProperties(props, _excluded$3);
|
6432
6426
|
|
6433
|
-
return (
|
6434
|
-
|
6435
|
-
|
6436
|
-
|
6437
|
-
|
6438
|
-
value: momentValue(value),
|
6439
|
-
onChange: function onChange(v) {
|
6440
|
-
var _momentValue;
|
6441
|
-
|
6442
|
-
(_onChange === null || _onChange === void 0 ? void 0 : _onChange(v, (_momentValue = momentValue(v)) === null || _momentValue === void 0 ? void 0 : _momentValue.format(format || 'YYYY-MM-DD'))) || '';
|
6443
|
-
}
|
6444
|
-
}, extraProps)) // </ConfigProvider>
|
6427
|
+
return /*#__PURE__*/React.createElement(_DatePicker, _objectSpread2({
|
6428
|
+
defaultValue: momentValue(defaultValue),
|
6429
|
+
value: momentValue(value),
|
6430
|
+
onChange: function onChange(v) {
|
6431
|
+
var _momentValue2, _momentValue3;
|
6445
6432
|
|
6446
|
-
|
6433
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || 'YYYY-MM-DD'), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || 'YYYY-MM-DD'));
|
6434
|
+
}
|
6435
|
+
}, extraProps));
|
6447
6436
|
};
|
6448
6437
|
|
6449
6438
|
WDatePicker$1.defaultProps = {};
|
@@ -6455,20 +6444,15 @@ var RangePicker$1 = function RangePicker(props) {
|
|
6455
6444
|
_onChange2 = props.onChange,
|
6456
6445
|
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
6457
6446
|
|
6458
|
-
return (
|
6459
|
-
|
6460
|
-
|
6461
|
-
|
6462
|
-
|
6463
|
-
value: momentValue(value),
|
6464
|
-
onChange: function onChange(v) {
|
6465
|
-
var _momentValue2;
|
6447
|
+
return /*#__PURE__*/React.createElement(_DatePicker.RangePicker, _objectSpread2({
|
6448
|
+
defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
|
6449
|
+
value: [momentValue(value[0]), momentValue(value[1])],
|
6450
|
+
onChange: function onChange(v) {
|
6451
|
+
var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
|
6466
6452
|
|
6467
|
-
|
6468
|
-
|
6469
|
-
|
6470
|
-
|
6471
|
-
);
|
6453
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || 'YYYY-MM-DD')) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || 'YYYY-MM-DD')) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || 'YYYY-MM-DD')) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || 'YYYY-MM-DD')) || '']);
|
6454
|
+
}
|
6455
|
+
}, extraProps));
|
6472
6456
|
};
|
6473
6457
|
|
6474
6458
|
RangePicker$1.defaultProps = {};
|
@@ -6783,7 +6767,7 @@ var WForm = function WForm(props, ref) {
|
|
6783
6767
|
name: c.dataIndex,
|
6784
6768
|
label: c.title,
|
6785
6769
|
labelCol: labelCol
|
6786
|
-
}), /*#__PURE__*/React.createElement(
|
6770
|
+
}), /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
6787
6771
|
placeholder: "\u8BF7\u9009\u62E9",
|
6788
6772
|
disabled: disabled,
|
6789
6773
|
onLoad: function onLoad(opt) {
|
@@ -7283,7 +7267,7 @@ var WForm = function WForm(props, ref) {
|
|
7283
7267
|
name: c.dataIndex,
|
7284
7268
|
label: c.title,
|
7285
7269
|
labelCol: labelCol
|
7286
|
-
}), /*#__PURE__*/React.createElement(
|
7270
|
+
}), /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
7287
7271
|
placeholder: "\u8BF7\u9009\u62E9",
|
7288
7272
|
disabled: disabled,
|
7289
7273
|
onLoad: function onLoad(opt) {
|
@@ -7755,30 +7739,42 @@ var WForm = function WForm(props, ref) {
|
|
7755
7739
|
|
7756
7740
|
if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear', 'dateRange', 'dateTimeRange'].includes(c.valueType)) {
|
7757
7741
|
if (c.valueType === 'date' && searchForm[c.dataIndex]) {
|
7758
|
-
|
7742
|
+
var _c$fieldProps;
|
7743
|
+
|
7744
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps = c.fieldProps) === null || _c$fieldProps === void 0 ? void 0 : _c$fieldProps.format) || 'YYYY-MM-DD');
|
7759
7745
|
}
|
7760
7746
|
|
7761
7747
|
if (c.valueType === 'dateTime' && searchForm[c.dataIndex]) {
|
7762
|
-
|
7748
|
+
var _c$fieldProps2;
|
7749
|
+
|
7750
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps2 = c.fieldProps) === null || _c$fieldProps2 === void 0 ? void 0 : _c$fieldProps2.format) || 'YYYY-MM-DD HH:mm:ss');
|
7763
7751
|
}
|
7764
7752
|
|
7765
7753
|
if (c.valueType === 'dateMonth' && searchForm[c.dataIndex]) {
|
7766
|
-
|
7754
|
+
var _c$fieldProps3;
|
7755
|
+
|
7756
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps3 = c.fieldProps) === null || _c$fieldProps3 === void 0 ? void 0 : _c$fieldProps3.format) || 'YYYY-MM');
|
7767
7757
|
}
|
7768
7758
|
|
7769
7759
|
if (c.valueType === 'dateYear' && searchForm[c.dataIndex]) {
|
7770
|
-
|
7760
|
+
var _c$fieldProps4;
|
7761
|
+
|
7762
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps4 = c.fieldProps) === null || _c$fieldProps4 === void 0 ? void 0 : _c$fieldProps4.format) || 'YYYY');
|
7771
7763
|
}
|
7772
7764
|
|
7773
7765
|
if (c.valueType === 'dateRange' && searchForm[c.dataIndex]) {
|
7774
7766
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
7775
|
-
|
7767
|
+
var _c$fieldProps5;
|
7768
|
+
|
7769
|
+
return item && searchForm[c.dataIndex] && hooks(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps5 = c.fieldProps) === null || _c$fieldProps5 === void 0 ? void 0 : _c$fieldProps5.format) || 'YYYY-MM-DD');
|
7776
7770
|
});
|
7777
7771
|
}
|
7778
7772
|
|
7779
7773
|
if (c.valueType === 'dateTimeRange' && searchForm[c.dataIndex]) {
|
7780
7774
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
7781
|
-
|
7775
|
+
var _c$fieldProps6;
|
7776
|
+
|
7777
|
+
return item && hooks(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps6 = c.fieldProps) === null || _c$fieldProps6 === void 0 ? void 0 : _c$fieldProps6.format) || 'YYYY-MM-DD HH:mm:ss');
|
7782
7778
|
});
|
7783
7779
|
}
|
7784
7780
|
}
|
@@ -7788,11 +7784,15 @@ var WForm = function WForm(props, ref) {
|
|
7788
7784
|
};
|
7789
7785
|
|
7790
7786
|
var handleRest = function handleRest() {
|
7787
|
+
var _form$resetFields;
|
7788
|
+
|
7791
7789
|
onReset && onReset();
|
7792
|
-
form.resetFields();
|
7790
|
+
form === null || form === void 0 ? void 0 : (_form$resetFields = form.resetFields) === null || _form$resetFields === void 0 ? void 0 : _form$resetFields.call(form);
|
7793
7791
|
};
|
7794
7792
|
|
7795
7793
|
var setFieldsValue = function setFieldsValue(record) {
|
7794
|
+
var _form$setFieldsValue;
|
7795
|
+
|
7796
7796
|
var setFieldsValues = _objectSpread2({}, record);
|
7797
7797
|
|
7798
7798
|
filterFormColumns.forEach(function (c) {
|
@@ -7807,7 +7807,7 @@ var WForm = function WForm(props, ref) {
|
|
7807
7807
|
return false;
|
7808
7808
|
}
|
7809
7809
|
});
|
7810
|
-
form.setFieldsValue(setFieldsValues);
|
7810
|
+
form === null || form === void 0 ? void 0 : (_form$setFieldsValue = form.setFieldsValue) === null || _form$setFieldsValue === void 0 ? void 0 : _form$setFieldsValue.call(form, setFieldsValues);
|
7811
7811
|
};
|
7812
7812
|
|
7813
7813
|
useImperativeHandle(ref, function () {
|
@@ -10790,4 +10790,4 @@ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
|
|
10790
10790
|
this.heartCheck = null;
|
10791
10791
|
});
|
10792
10792
|
|
10793
|
-
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,
|
10793
|
+
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, 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 };
|
package/dist/index.js
CHANGED
@@ -530,12 +530,7 @@ WInputNumber.defaultProps = {};
|
|
530
530
|
var WDatePicker = function WDatePicker(props) {
|
531
531
|
var extraProps = _extends({}, props);
|
532
532
|
|
533
|
-
return (
|
534
|
-
/*#__PURE__*/
|
535
|
-
// <ConfigProvider locale={zhCN}>
|
536
|
-
React__default['default'].createElement(_DatePicker__default['default'], _objectSpread2({}, extraProps)) // </ConfigProvider>
|
537
|
-
|
538
|
-
);
|
533
|
+
return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], _objectSpread2({}, extraProps));
|
539
534
|
};
|
540
535
|
|
541
536
|
WDatePicker.defaultProps = {};
|
@@ -543,12 +538,7 @@ WDatePicker.defaultProps = {};
|
|
543
538
|
var RangePicker = function RangePicker(props) {
|
544
539
|
var extraProps = _extends({}, props);
|
545
540
|
|
546
|
-
return (
|
547
|
-
/*#__PURE__*/
|
548
|
-
// <ConfigProvider locale={zhCN}>
|
549
|
-
React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({}, extraProps)) // </ConfigProvider>
|
550
|
-
|
551
|
-
);
|
541
|
+
return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({}, extraProps));
|
552
542
|
};
|
553
543
|
|
554
544
|
RangePicker.defaultProps = {};
|
@@ -683,7 +673,7 @@ function FrameBox(_ref) {
|
|
683
673
|
}), children);
|
684
674
|
}
|
685
675
|
|
686
|
-
var _excluded$2 = ["request", "valueEnum", "onLoad", "children"],
|
676
|
+
var _excluded$2 = ["request", "valueEnum", "onLoad", "children", "params"],
|
687
677
|
_excluded2 = ["children"];
|
688
678
|
|
689
679
|
var WSelect = function WSelect(props) {
|
@@ -691,6 +681,7 @@ var WSelect = function WSelect(props) {
|
|
691
681
|
valueEnum = props.valueEnum,
|
692
682
|
onLoad = props.onLoad,
|
693
683
|
children = props.children,
|
684
|
+
params = props.params,
|
694
685
|
extraProps = _objectWithoutProperties(props, _excluded$2);
|
695
686
|
|
696
687
|
var _useState = React.useState([]),
|
@@ -771,7 +762,7 @@ var WSelect = function WSelect(props) {
|
|
771
762
|
|
772
763
|
onLoad && onLoad(options);
|
773
764
|
setValueEnumList(valueEnumNode);
|
774
|
-
}, [JSON.stringify(resList), request]);
|
765
|
+
}, [JSON.stringify(resList), JSON.stringify(request), JSON.stringify(params || {})]);
|
775
766
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread2({}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
776
767
|
};
|
777
768
|
|
@@ -786,6 +777,7 @@ var Option = function Option(props) {
|
|
786
777
|
|
787
778
|
var Index$4 = WSelect;
|
788
779
|
Index$4.Option = Option;
|
780
|
+
var Select = /*#__PURE__*/React__default['default'].memo(Index$4);
|
789
781
|
|
790
782
|
//! moment.js
|
791
783
|
//! version : 2.29.1
|
@@ -6455,6 +6447,8 @@ var momentValue = function momentValue(value) {
|
|
6455
6447
|
if (value) {
|
6456
6448
|
return hooks(value);
|
6457
6449
|
}
|
6450
|
+
|
6451
|
+
return value;
|
6458
6452
|
};
|
6459
6453
|
|
6460
6454
|
var WDatePicker$1 = function WDatePicker(props) {
|
@@ -6464,20 +6458,15 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
6464
6458
|
_onChange = props.onChange,
|
6465
6459
|
extraProps = _objectWithoutProperties(props, _excluded$3);
|
6466
6460
|
|
6467
|
-
return (
|
6468
|
-
|
6469
|
-
|
6470
|
-
|
6471
|
-
|
6472
|
-
value: momentValue(value),
|
6473
|
-
onChange: function onChange(v) {
|
6474
|
-
var _momentValue;
|
6475
|
-
|
6476
|
-
(_onChange === null || _onChange === void 0 ? void 0 : _onChange(v, (_momentValue = momentValue(v)) === null || _momentValue === void 0 ? void 0 : _momentValue.format(format || 'YYYY-MM-DD'))) || '';
|
6477
|
-
}
|
6478
|
-
}, extraProps)) // </ConfigProvider>
|
6461
|
+
return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], _objectSpread2({
|
6462
|
+
defaultValue: momentValue(defaultValue),
|
6463
|
+
value: momentValue(value),
|
6464
|
+
onChange: function onChange(v) {
|
6465
|
+
var _momentValue2, _momentValue3;
|
6479
6466
|
|
6480
|
-
|
6467
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || 'YYYY-MM-DD'), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || 'YYYY-MM-DD'));
|
6468
|
+
}
|
6469
|
+
}, extraProps));
|
6481
6470
|
};
|
6482
6471
|
|
6483
6472
|
WDatePicker$1.defaultProps = {};
|
@@ -6489,20 +6478,15 @@ var RangePicker$1 = function RangePicker(props) {
|
|
6489
6478
|
_onChange2 = props.onChange,
|
6490
6479
|
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
6491
6480
|
|
6492
|
-
return (
|
6493
|
-
|
6494
|
-
|
6495
|
-
|
6496
|
-
|
6497
|
-
value: momentValue(value),
|
6498
|
-
onChange: function onChange(v) {
|
6499
|
-
var _momentValue2;
|
6481
|
+
return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({
|
6482
|
+
defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
|
6483
|
+
value: [momentValue(value[0]), momentValue(value[1])],
|
6484
|
+
onChange: function onChange(v) {
|
6485
|
+
var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
|
6500
6486
|
|
6501
|
-
|
6502
|
-
|
6503
|
-
|
6504
|
-
|
6505
|
-
);
|
6487
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || 'YYYY-MM-DD')) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || 'YYYY-MM-DD')) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || 'YYYY-MM-DD')) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || 'YYYY-MM-DD')) || '']);
|
6488
|
+
}
|
6489
|
+
}, extraProps));
|
6506
6490
|
};
|
6507
6491
|
|
6508
6492
|
RangePicker$1.defaultProps = {};
|
@@ -6817,7 +6801,7 @@ var WForm = function WForm(props, ref) {
|
|
6817
6801
|
name: c.dataIndex,
|
6818
6802
|
label: c.title,
|
6819
6803
|
labelCol: labelCol
|
6820
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
6804
|
+
}), /*#__PURE__*/React__default['default'].createElement(Select, _objectSpread2(_objectSpread2({
|
6821
6805
|
placeholder: "\u8BF7\u9009\u62E9",
|
6822
6806
|
disabled: disabled,
|
6823
6807
|
onLoad: function onLoad(opt) {
|
@@ -7317,7 +7301,7 @@ var WForm = function WForm(props, ref) {
|
|
7317
7301
|
name: c.dataIndex,
|
7318
7302
|
label: c.title,
|
7319
7303
|
labelCol: labelCol
|
7320
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
7304
|
+
}), /*#__PURE__*/React__default['default'].createElement(Select, _objectSpread2(_objectSpread2({
|
7321
7305
|
placeholder: "\u8BF7\u9009\u62E9",
|
7322
7306
|
disabled: disabled,
|
7323
7307
|
onLoad: function onLoad(opt) {
|
@@ -7789,30 +7773,42 @@ var WForm = function WForm(props, ref) {
|
|
7789
7773
|
|
7790
7774
|
if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear', 'dateRange', 'dateTimeRange'].includes(c.valueType)) {
|
7791
7775
|
if (c.valueType === 'date' && searchForm[c.dataIndex]) {
|
7792
|
-
|
7776
|
+
var _c$fieldProps;
|
7777
|
+
|
7778
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps = c.fieldProps) === null || _c$fieldProps === void 0 ? void 0 : _c$fieldProps.format) || 'YYYY-MM-DD');
|
7793
7779
|
}
|
7794
7780
|
|
7795
7781
|
if (c.valueType === 'dateTime' && searchForm[c.dataIndex]) {
|
7796
|
-
|
7782
|
+
var _c$fieldProps2;
|
7783
|
+
|
7784
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps2 = c.fieldProps) === null || _c$fieldProps2 === void 0 ? void 0 : _c$fieldProps2.format) || 'YYYY-MM-DD HH:mm:ss');
|
7797
7785
|
}
|
7798
7786
|
|
7799
7787
|
if (c.valueType === 'dateMonth' && searchForm[c.dataIndex]) {
|
7800
|
-
|
7788
|
+
var _c$fieldProps3;
|
7789
|
+
|
7790
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps3 = c.fieldProps) === null || _c$fieldProps3 === void 0 ? void 0 : _c$fieldProps3.format) || 'YYYY-MM');
|
7801
7791
|
}
|
7802
7792
|
|
7803
7793
|
if (c.valueType === 'dateYear' && searchForm[c.dataIndex]) {
|
7804
|
-
|
7794
|
+
var _c$fieldProps4;
|
7795
|
+
|
7796
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && hooks(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps4 = c.fieldProps) === null || _c$fieldProps4 === void 0 ? void 0 : _c$fieldProps4.format) || 'YYYY');
|
7805
7797
|
}
|
7806
7798
|
|
7807
7799
|
if (c.valueType === 'dateRange' && searchForm[c.dataIndex]) {
|
7808
7800
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
7809
|
-
|
7801
|
+
var _c$fieldProps5;
|
7802
|
+
|
7803
|
+
return item && searchForm[c.dataIndex] && hooks(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps5 = c.fieldProps) === null || _c$fieldProps5 === void 0 ? void 0 : _c$fieldProps5.format) || 'YYYY-MM-DD');
|
7810
7804
|
});
|
7811
7805
|
}
|
7812
7806
|
|
7813
7807
|
if (c.valueType === 'dateTimeRange' && searchForm[c.dataIndex]) {
|
7814
7808
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
7815
|
-
|
7809
|
+
var _c$fieldProps6;
|
7810
|
+
|
7811
|
+
return item && hooks(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps6 = c.fieldProps) === null || _c$fieldProps6 === void 0 ? void 0 : _c$fieldProps6.format) || 'YYYY-MM-DD HH:mm:ss');
|
7816
7812
|
});
|
7817
7813
|
}
|
7818
7814
|
}
|
@@ -7822,11 +7818,15 @@ var WForm = function WForm(props, ref) {
|
|
7822
7818
|
};
|
7823
7819
|
|
7824
7820
|
var handleRest = function handleRest() {
|
7821
|
+
var _form$resetFields;
|
7822
|
+
|
7825
7823
|
onReset && onReset();
|
7826
|
-
form.resetFields();
|
7824
|
+
form === null || form === void 0 ? void 0 : (_form$resetFields = form.resetFields) === null || _form$resetFields === void 0 ? void 0 : _form$resetFields.call(form);
|
7827
7825
|
};
|
7828
7826
|
|
7829
7827
|
var setFieldsValue = function setFieldsValue(record) {
|
7828
|
+
var _form$setFieldsValue;
|
7829
|
+
|
7830
7830
|
var setFieldsValues = _objectSpread2({}, record);
|
7831
7831
|
|
7832
7832
|
filterFormColumns.forEach(function (c) {
|
@@ -7841,7 +7841,7 @@ var WForm = function WForm(props, ref) {
|
|
7841
7841
|
return false;
|
7842
7842
|
}
|
7843
7843
|
});
|
7844
|
-
form.setFieldsValue(setFieldsValues);
|
7844
|
+
form === null || form === void 0 ? void 0 : (_form$setFieldsValue = form.setFieldsValue) === null || _form$setFieldsValue === void 0 ? void 0 : _form$setFieldsValue.call(form, setFieldsValues);
|
7845
7845
|
};
|
7846
7846
|
|
7847
7847
|
React.useImperativeHandle(ref, function () {
|
@@ -10841,7 +10841,7 @@ exports.ModalTips = Modal$1;
|
|
10841
10841
|
exports.Number = Index$7;
|
10842
10842
|
exports.NumericInput = NumericInput;
|
10843
10843
|
exports.Radio = Index$2;
|
10844
|
-
exports.Select =
|
10844
|
+
exports.Select = Select;
|
10845
10845
|
exports.Swiper = Index$a;
|
10846
10846
|
exports.Switch = WSwitch;
|
10847
10847
|
exports.TabelCard = index$1;
|
package/package.json
CHANGED