wargerm 0.7.80 → 0.7.82

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/index.js CHANGED
@@ -3490,7 +3490,253 @@ var WCheckboxGroup = function WCheckboxGroup(props) {
3490
3490
  };
3491
3491
  WCheckboxGroup.defaultProps = {};
3492
3492
 
3493
- var _excluded$b = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3493
+ var _excluded$b = ["request", "params", "onCheck", "dataSource", "value", "onChange"];
3494
+ var findParent = function findParent(data, id) {
3495
+ var parent = null;
3496
+ var loop = function loop(node, arr) {
3497
+ for (var i = 0; i < arr.length; i++) {
3498
+ var _item$children;
3499
+ var item = arr[i];
3500
+ if (item.id == id) return parent = node;
3501
+ if ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) {
3502
+ loop(item, item.children);
3503
+ }
3504
+ }
3505
+ };
3506
+ loop(null, data);
3507
+ return parent;
3508
+ };
3509
+ var removeId = function removeId(arr, id) {
3510
+ var index = arr.indexOf(id);
3511
+ if (index > -1) {
3512
+ arr.splice(index, 1);
3513
+ }
3514
+ return arr;
3515
+ };
3516
+ var flatChildren = function flatChildren(data) {
3517
+ var childrenList = [];
3518
+ var loop = function loop(arr) {
3519
+ for (var i = 0; i < arr.length; i++) {
3520
+ var _item$children2;
3521
+ var item = arr[i];
3522
+ childrenList.push(item);
3523
+ if ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) {
3524
+ loop(item.children);
3525
+ }
3526
+ }
3527
+ };
3528
+ loop(data);
3529
+ return childrenList;
3530
+ };
3531
+ var handleCheck = function handleCheck(_ref) {
3532
+ var parentIds = _ref.parentIds,
3533
+ id = _ref.id,
3534
+ values = _ref.values,
3535
+ treeData = _ref.treeData;
3536
+ var currentId = id;
3537
+ while (currentId) {
3538
+ var _ref2 = findParent(treeData, currentId) || {},
3539
+ _id = _ref2.id,
3540
+ children = _ref2.children;
3541
+ var ids = children === null || children === void 0 ? void 0 : children.map(function (item) {
3542
+ return item.id;
3543
+ });
3544
+ if (!ids) {
3545
+ currentId = null;
3546
+ break;
3547
+ }
3548
+ if (!ids.every(function (item) {
3549
+ return values.checked.includes(item);
3550
+ })) {
3551
+ // 检查每个父 id 都在 checked list 里面,不在则 push半选
3552
+ if (!values.halfChecked.includes(_id)) {
3553
+ // 判断是否存在
3554
+ values.halfChecked.push(_id);
3555
+ }
3556
+ removeId(values.checked, _id);
3557
+ } else if (!values.checked.includes(_id)) {
3558
+ // 每个父 id 是否已存在 checked list ,不在则 push checked list, 并且清空 半选
3559
+ values.checked.push(_id);
3560
+ removeId(values.halfChecked, _id);
3561
+ }
3562
+ if (!ids.some(function (item) {
3563
+ return [].concat(_toConsumableArray(values.checked), _toConsumableArray(values.halfChecked)).includes(item);
3564
+ })) {
3565
+ // 检查每个父 id 都不在 checked list 里面,不在则 清空半选
3566
+ removeId(values.halfChecked, _id);
3567
+ }
3568
+ currentId = parentIds.pop();
3569
+ }
3570
+ return values;
3571
+ };
3572
+ var WTree = function WTree(props, ref) {
3573
+ var request = props.request,
3574
+ params = props.params,
3575
+ _onCheck = props.onCheck,
3576
+ dataSource = props.dataSource,
3577
+ value = props.value,
3578
+ onChange = props.onChange,
3579
+ extraProps = _objectWithoutProperties(props, _excluded$b);
3580
+ var _useState = React.useState([]),
3581
+ _useState2 = _slicedToArray(_useState, 2),
3582
+ treeData = _useState2[0],
3583
+ setTreeData = _useState2[1];
3584
+ var _useState3 = React.useState([]),
3585
+ _useState4 = _slicedToArray(_useState3, 2),
3586
+ expandedKeys = _useState4[0],
3587
+ setExpandedKeys = _useState4[1];
3588
+ var _useState5 = React.useState([]),
3589
+ _useState6 = _slicedToArray(_useState5, 2),
3590
+ checkedKeys = _useState6[0],
3591
+ setCheckedKeys = _useState6[1];
3592
+ var _useState7 = React.useState([]),
3593
+ _useState8 = _slicedToArray(_useState7, 2),
3594
+ selectedData = _useState8[0],
3595
+ setSelectedData = _useState8[1];
3596
+ var allKeysRef = React.useRef([]);
3597
+ React.useEffect(function () {
3598
+ setSelectedData(value);
3599
+ }, [value]);
3600
+ React.useImperativeHandle(ref, function () {
3601
+ return {
3602
+ checkedKeys: checkedKeys,
3603
+ expandedKeys: expandedKeys,
3604
+ selectedData: selectedData
3605
+ };
3606
+ });
3607
+ React.useEffect(function () {
3608
+ var isMounted = true;
3609
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3610
+ var data, checked, values, deepFn, treeList, _checked, _values, _deepFn, _treeList;
3611
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3612
+ while (1) switch (_context.prev = _context.next) {
3613
+ case 0:
3614
+ if (!request) {
3615
+ _context.next = 13;
3616
+ break;
3617
+ }
3618
+ _context.next = 3;
3619
+ return request(params);
3620
+ case 3:
3621
+ data = _context.sent;
3622
+ if (isMounted) {
3623
+ _context.next = 6;
3624
+ break;
3625
+ }
3626
+ return _context.abrupt("return");
3627
+ case 6:
3628
+ checked = selectedData || [];
3629
+ values = {
3630
+ checked: checked,
3631
+ halfChecked: []
3632
+ };
3633
+ deepFn = function deepFn(arr) {
3634
+ return arr.map(function (item) {
3635
+ var _item$children3, _ref4, _item$origin, _item$origin2;
3636
+ if (((_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.length) > 0) {
3637
+ item.children = deepFn(item.children);
3638
+ }
3639
+ allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3640
+ handleCheck({
3641
+ parentIds: (_ref4 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin = item.origin) === null || _item$origin === void 0 ? void 0 : _item$origin.parentIds)) === null || _ref4 === void 0 ? void 0 : _ref4.split(',').slice(1),
3642
+ id: (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.id),
3643
+ values: values,
3644
+ treeData: treeData
3645
+ });
3646
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, item), item.origin), {}, {
3647
+ title: item.label
3648
+ });
3649
+ });
3650
+ };
3651
+ treeList = deepFn(data);
3652
+ setExpandedKeys(allKeysRef.current);
3653
+ setTreeData(treeList);
3654
+ setCheckedKeys(values);
3655
+ case 13:
3656
+ if (dataSource) {
3657
+ _checked = selectedData || [];
3658
+ _values = {
3659
+ checked: _checked,
3660
+ halfChecked: []
3661
+ };
3662
+ _deepFn = function _deepFn(arr) {
3663
+ return arr.map(function (item) {
3664
+ var _item$children4, _ref5, _item$origin3, _item$origin4;
3665
+ if (((_item$children4 = item.children) === null || _item$children4 === void 0 ? void 0 : _item$children4.length) > 0) {
3666
+ item.children = _deepFn(item.children);
3667
+ }
3668
+ allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3669
+ handleCheck({
3670
+ parentIds: (_ref5 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin3 = item.origin) === null || _item$origin3 === void 0 ? void 0 : _item$origin3.parentIds)) === null || _ref5 === void 0 ? void 0 : _ref5.split(',').slice(1),
3671
+ id: (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin4 = item.origin) === null || _item$origin4 === void 0 ? void 0 : _item$origin4.id),
3672
+ values: _values,
3673
+ treeData: dataSource
3674
+ });
3675
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, item), item.origin), {}, {
3676
+ title: item.label
3677
+ });
3678
+ });
3679
+ };
3680
+ _treeList = _deepFn(dataSource);
3681
+ setExpandedKeys(allKeysRef.current);
3682
+ setTreeData(_treeList);
3683
+ setCheckedKeys(_values);
3684
+ }
3685
+ case 14:
3686
+ case "end":
3687
+ return _context.stop();
3688
+ }
3689
+ }, _callee);
3690
+ }))();
3691
+ return function () {
3692
+ isMounted = false;
3693
+ };
3694
+ }, [JSON.stringify(params || {}), selectedData, dataSource]);
3695
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tree, _objectSpread2({
3696
+ className: 'w100p',
3697
+ height: 500,
3698
+ checkable: true,
3699
+ checkStrictly: true,
3700
+ checkedKeys: checkedKeys,
3701
+ expandedKeys: expandedKeys,
3702
+ onExpand: function onExpand(values) {
3703
+ return setExpandedKeys(values);
3704
+ },
3705
+ onCheck: function onCheck(values, info) {
3706
+ var _info$node, _info$node$parentIds, _info$node2;
3707
+ var checked = info === null || info === void 0 ? void 0 : info.checked;
3708
+ var parentIds = info === null || info === void 0 ? void 0 : (_info$node = info.node) === null || _info$node === void 0 ? void 0 : (_info$node$parentIds = _info$node.parentIds) === null || _info$node$parentIds === void 0 ? void 0 : _info$node$parentIds.split(',').slice(1);
3709
+ var currentId = info === null || info === void 0 ? void 0 : info.node.id;
3710
+ handleCheck({
3711
+ parentIds: parentIds,
3712
+ id: currentId,
3713
+ values: values,
3714
+ treeData: treeData
3715
+ });
3716
+ var childrenIds = flatChildren((info === null || info === void 0 ? void 0 : (_info$node2 = info.node) === null || _info$node2 === void 0 ? void 0 : _info$node2.children) || []).map(function (item) {
3717
+ return item.id;
3718
+ });
3719
+ // TODO 全选反选
3720
+ if (checked) {
3721
+ values.checked = _toConsumableArray(new Set([].concat(_toConsumableArray(values.checked), _toConsumableArray(childrenIds))));
3722
+ } else {
3723
+ values.checked = values.checked.filter(function (item) {
3724
+ return !childrenIds.includes(item);
3725
+ });
3726
+ values.halfChecked = values.halfChecked.filter(function (item) {
3727
+ return !childrenIds.includes(item);
3728
+ });
3729
+ }
3730
+ setCheckedKeys(values);
3731
+ _onCheck && _onCheck(values, info);
3732
+ onChange && onChange(values, info);
3733
+ },
3734
+ treeData: treeData
3735
+ }, extraProps));
3736
+ };
3737
+ var Tree = /*#__PURE__*/React__default['default'].forwardRef(WTree);
3738
+
3739
+ var _excluded$c = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3494
3740
  var RangePicker$2 = Index$6.RangePicker;
3495
3741
  var WForm = function WForm(props, ref) {
3496
3742
  var columns = props.columns,
@@ -3506,7 +3752,7 @@ var WForm = function WForm(props, ref) {
3506
3752
  onReset = props.onReset,
3507
3753
  setForm = props.setForm,
3508
3754
  deps = props.deps,
3509
- extraProps = _objectWithoutProperties(props, _excluded$b);
3755
+ extraProps = _objectWithoutProperties(props, _excluded$c);
3510
3756
  var _Form$useForm = antd.Form.useForm(),
3511
3757
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
3512
3758
  form = _Form$useForm2[0];
@@ -3686,13 +3932,37 @@ var WForm = function WForm(props, ref) {
3686
3932
  placeholder: "\u8BF7\u9009\u62E9",
3687
3933
  onLoad: function onLoad(opt) {}
3688
3934
  }, c.fieldProps), _extraProps3))));
3689
- } else if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear'].includes(c.valueType)) {
3935
+ } else if (c.valueType == 'tree') {
3936
+ var _extraProps4 = {};
3937
+ if (c.request) {
3938
+ _extraProps4.request = c.request;
3939
+ }
3690
3940
  var _labelCol4 = {};
3691
3941
  if (search && search.labelWidth) {
3692
3942
  _labelCol4.style = {
3693
3943
  width: search.labelWidth
3694
3944
  };
3695
3945
  }
3946
+ return /*#__PURE__*/React__default['default'].createElement(antd.Col, _objectSpread2(_objectSpread2({
3947
+ className: "pl12 pr12"
3948
+ }, colProps), {}, {
3949
+ key: c.dataIndex
3950
+ }), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, _objectSpread2(_objectSpread2({
3951
+ initialValue: c.initialValue
3952
+ }, c.formItemProps), {}, {
3953
+ name: c.dataIndex,
3954
+ label: c.title,
3955
+ labelCol: _labelCol4
3956
+ }), /*#__PURE__*/React__default['default'].createElement(Tree, _objectSpread2(_objectSpread2({
3957
+ disabled: disabled
3958
+ }, c.fieldProps), _extraProps4))));
3959
+ } else if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear'].includes(c.valueType)) {
3960
+ var _labelCol5 = {};
3961
+ if (search && search.labelWidth) {
3962
+ _labelCol5.style = {
3963
+ width: search.labelWidth
3964
+ };
3965
+ }
3696
3966
  var showTime = {};
3697
3967
  var picker = {};
3698
3968
  if (c.valueType == 'dateTime') {
@@ -3721,15 +3991,15 @@ var WForm = function WForm(props, ref) {
3721
3991
  }, c.formItemProps), {}, {
3722
3992
  name: c.dataIndex,
3723
3993
  label: c.title,
3724
- labelCol: _labelCol4
3994
+ labelCol: _labelCol5
3725
3995
  }), /*#__PURE__*/React__default['default'].createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
3726
3996
  disabled: disabled,
3727
3997
  placeholder: "\u8BF7\u8F93\u5165"
3728
3998
  }, picker), showTime), c.fieldProps))));
3729
3999
  } else if (c.valueType === 'dateRange' || c.valueType === 'dateTimeRange') {
3730
- var _labelCol5 = {};
4000
+ var _labelCol6 = {};
3731
4001
  if (search && search.labelWidth) {
3732
- _labelCol5.style = {
4002
+ _labelCol6.style = {
3733
4003
  width: search.labelWidth
3734
4004
  };
3735
4005
  }
@@ -3750,22 +4020,22 @@ var WForm = function WForm(props, ref) {
3750
4020
  }, c.formItemProps), {}, {
3751
4021
  name: c.dataIndex,
3752
4022
  label: c.title,
3753
- labelCol: _labelCol5
4023
+ labelCol: _labelCol6
3754
4024
  }), /*#__PURE__*/React__default['default'].createElement(RangePicker$2, _objectSpread2(_objectSpread2({
3755
4025
  disabled: disabled
3756
4026
  }, _showTime), c.fieldProps))));
3757
4027
  } else if (c.valueType === 'checkbox') {
3758
- var _extraProps4 = {};
4028
+ var _extraProps5 = {};
3759
4029
  if (c.request) {
3760
- _extraProps4.request = c.request;
4030
+ _extraProps5.request = c.request;
3761
4031
  } else if (c.valueEnum) {
3762
- _extraProps4.valueEnum = c.valueEnum;
4032
+ _extraProps5.valueEnum = c.valueEnum;
3763
4033
  } else {
3764
- _extraProps4.options = c.options;
4034
+ _extraProps5.options = c.options;
3765
4035
  }
3766
- var _labelCol6 = {};
4036
+ var _labelCol7 = {};
3767
4037
  if (search && search.labelWidth) {
3768
- _labelCol6.style = {
4038
+ _labelCol7.style = {
3769
4039
  width: search.labelWidth
3770
4040
  };
3771
4041
  }
@@ -3783,7 +4053,7 @@ var WForm = function WForm(props, ref) {
3783
4053
  }, c.formItemProps), {}, {
3784
4054
  name: c.dataIndex,
3785
4055
  label: c.title,
3786
- labelCol: _labelCol6
4056
+ labelCol: _labelCol7
3787
4057
  }), /*#__PURE__*/React__default['default'].createElement(WCheckboxGroup, _objectSpread2(_objectSpread2({
3788
4058
  onLoad: function onLoad(opt) {
3789
4059
  setColumnsFields(function (preColumnsFields) {
@@ -3791,19 +4061,19 @@ var WForm = function WForm(props, ref) {
3791
4061
  });
3792
4062
  },
3793
4063
  disabled: disabled
3794
- }, c.fieldProps), _extraProps4))));
4064
+ }, c.fieldProps), _extraProps5))));
3795
4065
  } else if (c.valueType === 'radio' || c.valueType === 'radioButton') {
3796
- var _extraProps5 = {};
4066
+ var _extraProps6 = {};
3797
4067
  if (c.request) {
3798
- _extraProps5.request = c.request;
4068
+ _extraProps6.request = c.request;
3799
4069
  } else if (c.valueEnum) {
3800
- _extraProps5.valueEnum = c.valueEnum;
4070
+ _extraProps6.valueEnum = c.valueEnum;
3801
4071
  } else {
3802
- _extraProps5.options = c.options;
4072
+ _extraProps6.options = c.options;
3803
4073
  }
3804
- var _labelCol7 = {};
4074
+ var _labelCol8 = {};
3805
4075
  if (search && search.labelWidth) {
3806
- _labelCol7.style = {
4076
+ _labelCol8.style = {
3807
4077
  width: search.labelWidth
3808
4078
  };
3809
4079
  }
@@ -3828,7 +4098,7 @@ var WForm = function WForm(props, ref) {
3828
4098
  }, c.formItemProps), {}, {
3829
4099
  name: c.dataIndex,
3830
4100
  label: c.title,
3831
- labelCol: _labelCol7
4101
+ labelCol: _labelCol8
3832
4102
  }), /*#__PURE__*/React__default['default'].createElement(WRadioGroup, _objectSpread2(_objectSpread2(_objectSpread2({
3833
4103
  onLoad: function onLoad(opt) {
3834
4104
  setColumnsFields(function (preColumnsFields) {
@@ -3836,7 +4106,7 @@ var WForm = function WForm(props, ref) {
3836
4106
  });
3837
4107
  },
3838
4108
  disabled: disabled
3839
- }, radioButtonProps), c.fieldProps), _extraProps5))));
4109
+ }, radioButtonProps), c.fieldProps), _extraProps6))));
3840
4110
  } else if (c.valueType === 'switch') {
3841
4111
  var options = [];
3842
4112
  if (c.valueEnum) {
@@ -3848,9 +4118,9 @@ var WForm = function WForm(props, ref) {
3848
4118
  });
3849
4119
  }
3850
4120
  }
3851
- var _labelCol8 = {};
4121
+ var _labelCol9 = {};
3852
4122
  if (search && search.labelWidth) {
3853
- _labelCol8.style = {
4123
+ _labelCol9.style = {
3854
4124
  width: search.labelWidth
3855
4125
  };
3856
4126
  }
@@ -3870,14 +4140,14 @@ var WForm = function WForm(props, ref) {
3870
4140
  }, c.formItemProps), {}, {
3871
4141
  name: c.dataIndex,
3872
4142
  label: c.title,
3873
- labelCol: _labelCol8
4143
+ labelCol: _labelCol9
3874
4144
  }), /*#__PURE__*/React__default['default'].createElement(WSwitch, _objectSpread2({
3875
4145
  disabled: disabled
3876
4146
  }, c.fieldProps))));
3877
4147
  } else if (c.valueType === 'digit') {
3878
- var _labelCol9 = {};
4148
+ var _labelCol10 = {};
3879
4149
  if (search && search.labelWidth) {
3880
- _labelCol9.style = {
4150
+ _labelCol10.style = {
3881
4151
  width: search.labelWidth
3882
4152
  };
3883
4153
  }
@@ -3890,15 +4160,15 @@ var WForm = function WForm(props, ref) {
3890
4160
  }, c.formItemProps), {}, {
3891
4161
  name: c.dataIndex,
3892
4162
  label: c.title,
3893
- labelCol: _labelCol9
4163
+ labelCol: _labelCol10
3894
4164
  }), /*#__PURE__*/React__default['default'].createElement(NumericInput, _objectSpread2({
3895
4165
  disabled: disabled,
3896
4166
  placeholder: "\u8BF7\u8F93\u5165\u53C2\u6570(double/int)"
3897
4167
  }, c.fieldProps))));
3898
4168
  } else if (c.renderFormItem) {
3899
- var _labelCol10 = {};
4169
+ var _labelCol11 = {};
3900
4170
  if (search && search.labelWidth) {
3901
- _labelCol10.style = {
4171
+ _labelCol11.style = {
3902
4172
  width: search.labelWidth
3903
4173
  };
3904
4174
  }
@@ -3918,12 +4188,12 @@ var WForm = function WForm(props, ref) {
3918
4188
  }, c.formItemProps), {}, {
3919
4189
  name: c.dataIndex,
3920
4190
  label: c.title,
3921
- labelCol: _labelCol10
4191
+ labelCol: _labelCol11
3922
4192
  }), baseitem))) : null;
3923
4193
  } else if (c.valueType === 'textarea') {
3924
- var _labelCol11 = {};
4194
+ var _labelCol12 = {};
3925
4195
  if (search && search.labelWidth) {
3926
- _labelCol11.style = {
4196
+ _labelCol12.style = {
3927
4197
  width: search.labelWidth
3928
4198
  };
3929
4199
  }
@@ -3936,16 +4206,16 @@ var WForm = function WForm(props, ref) {
3936
4206
  }, c.formItemProps), {}, {
3937
4207
  name: c.dataIndex,
3938
4208
  label: c.title,
3939
- labelCol: _labelCol11
4209
+ labelCol: _labelCol12
3940
4210
  }), /*#__PURE__*/React__default['default'].createElement(Index.TextArea, _objectSpread2({
3941
4211
  rows: 4,
3942
4212
  disabled: disabled,
3943
4213
  placeholder: "\u8BF7\u8F93\u5165"
3944
4214
  }, c.fieldProps))));
3945
4215
  } else if (c.valueType === 'inputNumber') {
3946
- var _labelCol12 = {};
4216
+ var _labelCol13 = {};
3947
4217
  if (search && search.labelWidth) {
3948
- _labelCol12.style = {
4218
+ _labelCol13.style = {
3949
4219
  width: search.labelWidth
3950
4220
  };
3951
4221
  }
@@ -3958,15 +4228,15 @@ var WForm = function WForm(props, ref) {
3958
4228
  }, c.formItemProps), {}, {
3959
4229
  name: c.dataIndex,
3960
4230
  label: c.title,
3961
- labelCol: _labelCol12
4231
+ labelCol: _labelCol13
3962
4232
  }), /*#__PURE__*/React__default['default'].createElement(WInputNumber, _objectSpread2({
3963
4233
  disabled: disabled,
3964
4234
  placeholder: "\u8BF7\u8F93\u5165"
3965
4235
  }, c.fieldProps))));
3966
4236
  } else {
3967
- var _labelCol13 = {};
4237
+ var _labelCol14 = {};
3968
4238
  if (search && search.labelWidth) {
3969
- _labelCol13.style = {
4239
+ _labelCol14.style = {
3970
4240
  width: search.labelWidth
3971
4241
  };
3972
4242
  }
@@ -3979,7 +4249,7 @@ var WForm = function WForm(props, ref) {
3979
4249
  }, c.formItemProps), {}, {
3980
4250
  name: c.dataIndex,
3981
4251
  label: c.title,
3982
- labelCol: _labelCol13
4252
+ labelCol: _labelCol14
3983
4253
  }), /*#__PURE__*/React__default['default'].createElement(Index, _objectSpread2({
3984
4254
  disabled: disabled,
3985
4255
  placeholder: "\u8BF7\u8F93\u5165"
@@ -4256,7 +4526,7 @@ var WForm = function WForm(props, ref) {
4256
4526
  };
4257
4527
  var WForm$1 = /*#__PURE__*/React__default['default'].forwardRef(WForm);
4258
4528
 
4259
- var _excluded$c = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
4529
+ var _excluded$d = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
4260
4530
  function Table(_ref) {
4261
4531
  var _formSearchRef$curren4, _columns$, _columns$2;
4262
4532
  var columns = _ref.columns,
@@ -4287,7 +4557,7 @@ function Table(_ref) {
4287
4557
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
4288
4558
  formRef = _ref.formRef,
4289
4559
  none = _ref.none,
4290
- props = _objectWithoutProperties(_ref, _excluded$c);
4560
+ props = _objectWithoutProperties(_ref, _excluded$d);
4291
4561
  var _useState = React.useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
4292
4562
  _useState2 = _slicedToArray(_useState, 2),
4293
4563
  selectedRowKeys = _useState2[0],
@@ -4774,7 +5044,7 @@ Table.defaultProps = {
4774
5044
  };
4775
5045
  var index = /*#__PURE__*/React.memo(Table);
4776
5046
 
4777
- var _excluded$d = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
5047
+ var _excluded$e = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
4778
5048
  function Index$8(props, ref) {
4779
5049
  var value = props.value,
4780
5050
  renderDom = props.renderDom,
@@ -4782,7 +5052,7 @@ function Index$8(props, ref) {
4782
5052
  params = props.params,
4783
5053
  onChange = props.onChange,
4784
5054
  request = props.request,
4785
- rest = _objectWithoutProperties(props, _excluded$d);
5055
+ rest = _objectWithoutProperties(props, _excluded$e);
4786
5056
  var _useState = React.useState(''),
4787
5057
  _useState2 = _slicedToArray(_useState, 2),
4788
5058
  areaValue = _useState2[0],
@@ -4837,7 +5107,7 @@ function Index$8(props, ref) {
4837
5107
  }
4838
5108
  var index$1 = /*#__PURE__*/React__default['default'].forwardRef(Index$8);
4839
5109
 
4840
- var _excluded$e = ["height", "width", "count", "style", "numberStyle"],
5110
+ var _excluded$f = ["height", "width", "count", "style", "numberStyle"],
4841
5111
  _excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
4842
5112
  var Number$1 = function Number(_ref) {
4843
5113
  var height = _ref.height,
@@ -4846,7 +5116,7 @@ var Number$1 = function Number(_ref) {
4846
5116
  count = _ref$count === void 0 ? 0 : _ref$count,
4847
5117
  style = _ref.style,
4848
5118
  numberStyle = _ref.numberStyle,
4849
- props = _objectWithoutProperties(_ref, _excluded$e);
5119
+ props = _objectWithoutProperties(_ref, _excluded$f);
4850
5120
  // 上次的值
4851
5121
  var _useState = React.useState(0),
4852
5122
  _useState2 = _slicedToArray(_useState, 2),
@@ -4996,12 +5266,12 @@ var Index$9 = function Index(props) {
4996
5266
  }));
4997
5267
  };
4998
5268
 
4999
- var _excluded$f = ["duration", "className"];
5269
+ var _excluded$g = ["duration", "className"];
5000
5270
  var Index$a = function Index(props) {
5001
5271
  var _props$duration = props.duration,
5002
5272
  duration = _props$duration === void 0 ? 2.75 : _props$duration,
5003
5273
  className = props.className,
5004
- extraProps = _objectWithoutProperties(props, _excluded$f);
5274
+ extraProps = _objectWithoutProperties(props, _excluded$g);
5005
5275
  return /*#__PURE__*/React__default['default'].createElement(CountUp__default['default'], _objectSpread2(_objectSpread2({
5006
5276
  duration: duration
5007
5277
  }, extraProps), {}, {
@@ -5010,7 +5280,7 @@ var Index$a = function Index(props) {
5010
5280
  };
5011
5281
  Index$a.defaultProps = {};
5012
5282
 
5013
- var _excluded$g = ["list", "render", "none", "partSize"];
5283
+ var _excluded$h = ["list", "render", "none", "partSize"];
5014
5284
  function AutoScroll(props) {
5015
5285
  var inner1 = React.useRef();
5016
5286
  var inner2 = React.useRef();
@@ -5087,7 +5357,7 @@ var Index$b = function Index(_ref) {
5087
5357
  none = _ref.none,
5088
5358
  _ref$partSize = _ref.partSize,
5089
5359
  partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
5090
- otherProps = _objectWithoutProperties(_ref, _excluded$g);
5360
+ otherProps = _objectWithoutProperties(_ref, _excluded$h);
5091
5361
  var _useState = React.useState([]),
5092
5362
  _useState2 = _slicedToArray(_useState, 2),
5093
5363
  partA = _useState2[0],
@@ -5161,7 +5431,7 @@ var Index$b = function Index(_ref) {
5161
5431
  }, none || '暂无数据'));
5162
5432
  };
5163
5433
 
5164
- var _excluded$h = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
5434
+ var _excluded$i = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
5165
5435
  // install Swiper modules
5166
5436
  SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay, SwiperCore.Virtual]);
5167
5437
  var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -5173,7 +5443,7 @@ var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
5173
5443
  onSwiperChange = props.onSwiperChange,
5174
5444
  renderItem = props.renderItem,
5175
5445
  noMove = props.noMove,
5176
- extraProps = _objectWithoutProperties(props, _excluded$h);
5446
+ extraProps = _objectWithoutProperties(props, _excluded$i);
5177
5447
  var _useState = React.useState(null),
5178
5448
  _useState2 = _slicedToArray(_useState, 2),
5179
5449
  controlledSwiper = _useState2[0],
@@ -5822,7 +6092,7 @@ function createBrowserHistory(props) {
5822
6092
  return history;
5823
6093
  }
5824
6094
 
5825
- var _excluded$i = ["routes", "className"];
6095
+ var _excluded$j = ["routes", "className"];
5826
6096
  var history = createBrowserHistory();
5827
6097
  function itemRender(route, params, routes, paths) {
5828
6098
  var last = routes.indexOf(route) === routes.length - 1;
@@ -5838,7 +6108,7 @@ function itemRender(route, params, routes, paths) {
5838
6108
  var Index$d = function Index(_ref) {
5839
6109
  var routes = _ref.routes,
5840
6110
  className = _ref.className,
5841
- props = _objectWithoutProperties(_ref, _excluded$i);
6111
+ props = _objectWithoutProperties(_ref, _excluded$j);
5842
6112
  return /*#__PURE__*/React__default['default'].createElement(antd.Breadcrumb, _objectSpread2({
5843
6113
  className: className || 'default',
5844
6114
  separator: ">>",
@@ -5847,7 +6117,7 @@ var Index$d = function Index(_ref) {
5847
6117
  }, props));
5848
6118
  };
5849
6119
 
5850
- var _excluded$j = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
6120
+ var _excluded$k = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
5851
6121
  var Index$e = function Index(_ref, ref) {
5852
6122
  var _sliderTabs$component, _sliderTabs$tabs;
5853
6123
  var title = _ref.title,
@@ -5856,7 +6126,7 @@ var Index$e = function Index(_ref, ref) {
5856
6126
  headerTail = _ref.headerTail,
5857
6127
  headerCenter = _ref.headerCenter,
5858
6128
  sliderTabs = _ref.sliderTabs,
5859
- props = _objectWithoutProperties(_ref, _excluded$j);
6129
+ props = _objectWithoutProperties(_ref, _excluded$k);
5860
6130
  React.useImperativeHandle(ref, function () {
5861
6131
  return {
5862
6132
  activeTab: activeTab
@@ -6072,7 +6342,7 @@ function DialogModel(props, ref) {
6072
6342
  }
6073
6343
  var Dialog = /*#__PURE__*/React__default['default'].forwardRef(DialogModel);
6074
6344
 
6075
- var _excluded$k = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
6345
+ var _excluded$l = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
6076
6346
  _excluded2$3 = ["open"];
6077
6347
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
6078
6348
  _inherits(Modal, _React$PureComponent);
@@ -6204,7 +6474,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
6204
6474
  style = _this$props4.style,
6205
6475
  isDrag = _this$props4.isDrag,
6206
6476
  wrapClassName = _this$props4.wrapClassName,
6207
- other = _objectWithoutProperties(_this$props4, _excluded$k);
6477
+ other = _objectWithoutProperties(_this$props4, _excluded$l);
6208
6478
  return /*#__PURE__*/React__default['default'].createElement(Dialog, _objectSpread2({
6209
6479
  ref: this.containerRef,
6210
6480
  closeCb: closeCb,
@@ -6369,7 +6639,7 @@ function DialogModel$1(props) {
6369
6639
  return renderChildren;
6370
6640
  }
6371
6641
 
6372
- var _excluded$l = ["open"];
6642
+ var _excluded$m = ["open"];
6373
6643
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
6374
6644
  _inherits(Modal, _React$PureComponent);
6375
6645
  var _super = _createSuper(Modal);
@@ -6491,7 +6761,7 @@ Modal$1.show = function (config) {
6491
6761
  setShow = _useState2[1];
6492
6762
  manager.setShow = setShow;
6493
6763
  var open = props.open,
6494
- trueProps = _objectWithoutProperties(props, _excluded$l);
6764
+ trueProps = _objectWithoutProperties(props, _excluded$m);
6495
6765
  React.useEffect(function () {
6496
6766
  manager.mounted = true;
6497
6767
  setShow(open);
@@ -6663,7 +6933,7 @@ function DragBox(_ref) {
6663
6933
  }, children))) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null));
6664
6934
  }
6665
6935
 
6666
- var _excluded$m = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6936
+ var _excluded$n = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6667
6937
  var ModalForm = function ModalForm(props, ref) {
6668
6938
  var columns = props.columns,
6669
6939
  extraColumns = props.extraColumns,
@@ -6682,7 +6952,7 @@ var ModalForm = function ModalForm(props, ref) {
6682
6952
  modalHeaderSlot = props.modalHeaderSlot,
6683
6953
  modalFooterSlot = props.modalFooterSlot,
6684
6954
  formProps = props.formProps,
6685
- extraProps = _objectWithoutProperties(props, _excluded$m);
6955
+ extraProps = _objectWithoutProperties(props, _excluded$n);
6686
6956
  var formRef = React.useRef(null);
6687
6957
  var _useState = React.useState(false),
6688
6958
  _useState2 = _slicedToArray(_useState, 2),
@@ -6807,7 +7077,7 @@ var ModalForm = function ModalForm(props, ref) {
6807
7077
  };
6808
7078
  var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
6809
7079
 
6810
- var _excluded$n = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
7080
+ var _excluded$o = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
6811
7081
  var TabelCard = function TabelCard(props, ref) {
6812
7082
  var columns = props.columns,
6813
7083
  extraColumns = props.extraColumns,
@@ -6831,7 +7101,7 @@ var TabelCard = function TabelCard(props, ref) {
6831
7101
  noBordered = props.noBordered,
6832
7102
  showIndex = props.showIndex,
6833
7103
  searchTableSlot = props.searchTableSlot,
6834
- extraProps = _objectWithoutProperties(props, _excluded$n);
7104
+ extraProps = _objectWithoutProperties(props, _excluded$o);
6835
7105
  var actionRef = React.useRef();
6836
7106
  var modalFormRef = React.useRef(null);
6837
7107
  var searchFormRef = React.useRef(null);
@@ -7493,7 +7763,17 @@ var TabelCard = function TabelCard(props, ref) {
7493
7763
  delete obj.initialValue;
7494
7764
  }
7495
7765
  return obj;
7496
- }))),
7766
+ }))).map(function (item) {
7767
+ var _item$renderColumn4;
7768
+ if (item.type === 'group') {
7769
+ var _item$children5;
7770
+ item.children = (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.map(function (itm) {
7771
+ var _itm$renderColumn3;
7772
+ return (itm === null || itm === void 0 ? void 0 : (_itm$renderColumn3 = itm.renderColumn) === null || _itm$renderColumn3 === void 0 ? void 0 : _itm$renderColumn3.call(itm, itm, modalFormConfig)) || itm;
7773
+ });
7774
+ }
7775
+ return (item === null || item === void 0 ? void 0 : (_item$renderColumn4 = item.renderColumn) === null || _item$renderColumn4 === void 0 ? void 0 : _item$renderColumn4.call(item, item, modalFormConfig)) || item;
7776
+ }),
7497
7777
  search: false,
7498
7778
  pagination: pagination !== null && pagination !== void 0 ? pagination : {
7499
7779
  showSizeChanger: true,
@@ -11087,7 +11367,7 @@ function DhPlayer(_ref, ref) {
11087
11367
  }
11088
11368
  var index$6 = /*#__PURE__*/React.forwardRef(DhPlayer);
11089
11369
 
11090
- var _excluded$o = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11370
+ var _excluded$p = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11091
11371
  // 默认速度控制
11092
11372
  var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2];
11093
11373
  // 默认记忆提示文字展示时长(s)
@@ -11118,7 +11398,7 @@ var index$7 = (function (_ref) {
11118
11398
  enableMemory = _ref$enableMemory === void 0 ? false : _ref$enableMemory,
11119
11399
  _ref$lastPlayTimeHide = _ref.lastPlayTimeHideDelay,
11120
11400
  lastPlayTimeHideDelay = _ref$lastPlayTimeHide === void 0 ? DEFAULT_LAST_PLAY_TIME_DELAY : _ref$lastPlayTimeHide,
11121
- props = _objectWithoutProperties(_ref, _excluded$o);
11401
+ props = _objectWithoutProperties(_ref, _excluded$p);
11122
11402
  var player = React.useRef();
11123
11403
  var currentPlayerIndex = React.useRef(0);
11124
11404
  // 内置的 index 状态管理
@@ -11288,7 +11568,7 @@ var index$7 = (function (_ref) {
11288
11568
  });
11289
11569
  });
11290
11570
 
11291
- var _excluded$p = ["className", "frameStyle", "style", "direction", "children"];
11571
+ var _excluded$q = ["className", "frameStyle", "style", "direction", "children"];
11292
11572
  function FrameBox$1(_ref) {
11293
11573
  var className = _ref.className,
11294
11574
  frameStyle = _ref.frameStyle,
@@ -11296,7 +11576,7 @@ function FrameBox$1(_ref) {
11296
11576
  _ref$direction = _ref.direction,
11297
11577
  direction = _ref$direction === void 0 ? 'in' : _ref$direction,
11298
11578
  children = _ref.children,
11299
- props = _objectWithoutProperties(_ref, _excluded$p);
11579
+ props = _objectWithoutProperties(_ref, _excluded$q);
11300
11580
  return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread2({
11301
11581
  className: classnames__default['default'](_defineProperty(_defineProperty({}, 'frame', true), className || '', true)),
11302
11582
  style: style
@@ -11323,7 +11603,7 @@ function FrameBox$1(_ref) {
11323
11603
  }), children);
11324
11604
  }
11325
11605
 
11326
- var _excluded$q = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
11606
+ var _excluded$r = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
11327
11607
  function NtTable(_ref, ref) {
11328
11608
  var _formSearchRef$curren4, _columns$, _columns$2;
11329
11609
  var columns = _ref.columns,
@@ -11354,7 +11634,7 @@ function NtTable(_ref, ref) {
11354
11634
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
11355
11635
  formRef = _ref.formRef,
11356
11636
  none = _ref.none,
11357
- props = _objectWithoutProperties(_ref, _excluded$q);
11637
+ props = _objectWithoutProperties(_ref, _excluded$r);
11358
11638
  var _useState = React.useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
11359
11639
  _useState2 = _slicedToArray(_useState, 2),
11360
11640
  selectedRowKeys = _useState2[0],
@@ -12610,7 +12890,7 @@ function WaterLevelCharts(config) {
12610
12890
  /*
12611
12891
  * @Author: lijin
12612
12892
  * @Date: 2021-09-09 11:02:54
12613
- * @LastEditTime: 2023-12-25 19:04:08
12893
+ * @LastEditTime: 2024-01-02 18:08:42
12614
12894
  * @LastEditors: lijin
12615
12895
  * @Description:
12616
12896
  * @FilePath: \wargerm\src\index.ts
@@ -12653,6 +12933,7 @@ exports.Switch = WSwitch;
12653
12933
  exports.TabelCard = index$3;
12654
12934
  exports.Table = index;
12655
12935
  exports.TableEdit = TableEdit;
12936
+ exports.Tree = Tree;
12656
12937
  exports.TreeSelect = Index$7;
12657
12938
  exports.Upload = Upload;
12658
12939
  exports.Video = index$7;