wargerm 0.7.81 → 0.7.83

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.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect, useMemo, useState, useCallback, useImperativeHandle, memo, forwardRef, createRef } from 'react';
2
2
  import { cloneDeep, uniqBy, omit, chunk, isEmpty } from 'lodash-es';
3
3
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
4
- import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider, notification } from 'antd';
4
+ import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Tree as Tree$1, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider, notification } from 'antd';
5
5
  import { createFromIconfontCN, PlusOutlined, CloseCircleOutlined, SearchOutlined, ReloadOutlined, MinusOutlined, FullscreenOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
6
6
  import FileViewer from 'react-file-viewer';
7
7
  import classnames from 'classnames';
@@ -3446,7 +3446,257 @@ var WCheckboxGroup = function WCheckboxGroup(props) {
3446
3446
  };
3447
3447
  WCheckboxGroup.defaultProps = {};
3448
3448
 
3449
- var _excluded$b = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3449
+ var _excluded$b = ["request", "params", "onCheck", "dataSource", "value", "onChange"];
3450
+ var findParent = function findParent(data, id) {
3451
+ var parent = null;
3452
+ var loop = function loop(node, arr) {
3453
+ for (var i = 0; i < arr.length; i++) {
3454
+ var _item$children;
3455
+ var item = arr[i];
3456
+ if (item.id == id) return parent = node;
3457
+ if ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) {
3458
+ loop(item, item.children);
3459
+ }
3460
+ }
3461
+ };
3462
+ loop(null, data);
3463
+ return parent;
3464
+ };
3465
+ var removeId = function removeId(arr, id) {
3466
+ var index = arr.indexOf(id);
3467
+ if (index > -1) {
3468
+ arr.splice(index, 1);
3469
+ }
3470
+ return arr;
3471
+ };
3472
+ var flatChildren = function flatChildren(data) {
3473
+ var childrenList = [];
3474
+ var loop = function loop(arr) {
3475
+ for (var i = 0; i < arr.length; i++) {
3476
+ var _item$children2;
3477
+ var item = arr[i];
3478
+ childrenList.push(item);
3479
+ if ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) {
3480
+ loop(item.children);
3481
+ }
3482
+ }
3483
+ };
3484
+ loop(data);
3485
+ return childrenList;
3486
+ };
3487
+ var handleCheck = function handleCheck(_ref) {
3488
+ var parentIds = _ref.parentIds,
3489
+ id = _ref.id,
3490
+ values = _ref.values,
3491
+ treeData = _ref.treeData;
3492
+ var currentId = id;
3493
+ while (currentId) {
3494
+ var _ref2 = findParent(treeData, currentId) || {},
3495
+ _id = _ref2.id,
3496
+ children = _ref2.children;
3497
+ var ids = children === null || children === void 0 ? void 0 : children.map(function (item) {
3498
+ return item.id;
3499
+ });
3500
+ if (!ids) {
3501
+ currentId = null;
3502
+ break;
3503
+ }
3504
+ if (!ids.every(function (item) {
3505
+ return values.checked.includes(item);
3506
+ })) {
3507
+ // 检查每个父 id 都在 checked list 里面,不在则 push半选
3508
+ if (!values.halfChecked.includes(_id)) {
3509
+ // 判断是否存在
3510
+ values.halfChecked.push(_id);
3511
+ }
3512
+ removeId(values.checked, _id);
3513
+ } else if (!values.checked.includes(_id)) {
3514
+ // 每个父 id 是否已存在 checked list ,不在则 push checked list, 并且清空 半选
3515
+ values.checked.push(_id);
3516
+ removeId(values.halfChecked, _id);
3517
+ }
3518
+ if (!ids.some(function (item) {
3519
+ return [].concat(_toConsumableArray(values.checked), _toConsumableArray(values.halfChecked)).includes(item);
3520
+ })) {
3521
+ // 检查每个父 id 都不在 checked list 里面,不在则 清空半选
3522
+ removeId(values.halfChecked, _id);
3523
+ }
3524
+ currentId = parentIds.pop();
3525
+ }
3526
+ return values;
3527
+ };
3528
+ var WTree = function WTree(props, ref) {
3529
+ var request = props.request,
3530
+ params = props.params,
3531
+ _onCheck = props.onCheck,
3532
+ dataSource = props.dataSource,
3533
+ value = props.value,
3534
+ onChange = props.onChange,
3535
+ extraProps = _objectWithoutProperties(props, _excluded$b);
3536
+ var _useState = useState([]),
3537
+ _useState2 = _slicedToArray(_useState, 2),
3538
+ treeData = _useState2[0],
3539
+ setTreeData = _useState2[1];
3540
+ var _useState3 = useState([]),
3541
+ _useState4 = _slicedToArray(_useState3, 2),
3542
+ expandedKeys = _useState4[0],
3543
+ setExpandedKeys = _useState4[1];
3544
+ var _useState5 = useState([]),
3545
+ _useState6 = _slicedToArray(_useState5, 2),
3546
+ checkedKeys = _useState6[0],
3547
+ setCheckedKeys = _useState6[1];
3548
+ var _useState7 = useState([]),
3549
+ _useState8 = _slicedToArray(_useState7, 2),
3550
+ selectedData = _useState8[0],
3551
+ setSelectedData = _useState8[1];
3552
+ var allKeysRef = useRef([]);
3553
+ useEffect(function () {
3554
+ setSelectedData(value);
3555
+ }, [value]);
3556
+ useImperativeHandle(ref, function () {
3557
+ return {
3558
+ checkedKeys: checkedKeys,
3559
+ expandedKeys: expandedKeys,
3560
+ treeData: treeData,
3561
+ setTreeData: setTreeData,
3562
+ setExpandedKeys: setExpandedKeys,
3563
+ setCheckedKeys: setCheckedKeys,
3564
+ value: selectedData
3565
+ };
3566
+ });
3567
+ useEffect(function () {
3568
+ var isMounted = true;
3569
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3570
+ var data, checked, values, deepFn, treeList, _checked, _values, _deepFn, _treeList;
3571
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3572
+ while (1) switch (_context.prev = _context.next) {
3573
+ case 0:
3574
+ if (!request) {
3575
+ _context.next = 13;
3576
+ break;
3577
+ }
3578
+ _context.next = 3;
3579
+ return request(params);
3580
+ case 3:
3581
+ data = _context.sent;
3582
+ if (isMounted) {
3583
+ _context.next = 6;
3584
+ break;
3585
+ }
3586
+ return _context.abrupt("return");
3587
+ case 6:
3588
+ checked = selectedData || [];
3589
+ values = {
3590
+ checked: checked,
3591
+ halfChecked: []
3592
+ };
3593
+ deepFn = function deepFn(arr) {
3594
+ return arr.map(function (item) {
3595
+ var _item$children3, _ref4, _item$origin, _item$origin2;
3596
+ if (((_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.length) > 0) {
3597
+ item.children = deepFn(item.children);
3598
+ }
3599
+ allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3600
+ handleCheck({
3601
+ 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),
3602
+ id: (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.id),
3603
+ values: values,
3604
+ treeData: treeData
3605
+ });
3606
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, item), item.origin), {}, {
3607
+ title: item.label
3608
+ });
3609
+ });
3610
+ };
3611
+ treeList = deepFn(data);
3612
+ setExpandedKeys(allKeysRef.current);
3613
+ setTreeData(treeList);
3614
+ setCheckedKeys(values);
3615
+ case 13:
3616
+ if (dataSource) {
3617
+ _checked = selectedData || [];
3618
+ _values = {
3619
+ checked: _checked,
3620
+ halfChecked: []
3621
+ };
3622
+ _deepFn = function _deepFn(arr) {
3623
+ return arr.map(function (item) {
3624
+ var _item$children4, _ref5, _item$origin3, _item$origin4;
3625
+ if (((_item$children4 = item.children) === null || _item$children4 === void 0 ? void 0 : _item$children4.length) > 0) {
3626
+ item.children = _deepFn(item.children);
3627
+ }
3628
+ allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3629
+ handleCheck({
3630
+ 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),
3631
+ id: (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin4 = item.origin) === null || _item$origin4 === void 0 ? void 0 : _item$origin4.id),
3632
+ values: _values,
3633
+ treeData: dataSource
3634
+ });
3635
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, item), item.origin), {}, {
3636
+ title: item.label
3637
+ });
3638
+ });
3639
+ };
3640
+ _treeList = _deepFn(dataSource);
3641
+ setExpandedKeys(allKeysRef.current);
3642
+ setTreeData(_treeList);
3643
+ setCheckedKeys(_values);
3644
+ }
3645
+ case 14:
3646
+ case "end":
3647
+ return _context.stop();
3648
+ }
3649
+ }, _callee);
3650
+ }))();
3651
+ return function () {
3652
+ isMounted = false;
3653
+ };
3654
+ }, [JSON.stringify(params || {}), selectedData, dataSource]);
3655
+ return /*#__PURE__*/React.createElement(Tree$1, _objectSpread2({
3656
+ className: 'w100p',
3657
+ height: 500,
3658
+ checkable: true,
3659
+ checkStrictly: true,
3660
+ checkedKeys: checkedKeys,
3661
+ expandedKeys: expandedKeys,
3662
+ onExpand: function onExpand(values) {
3663
+ return setExpandedKeys(values);
3664
+ },
3665
+ onCheck: function onCheck(values, info) {
3666
+ var _info$node, _info$node$parentIds, _info$node2;
3667
+ var checked = info === null || info === void 0 ? void 0 : info.checked;
3668
+ 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);
3669
+ var currentId = info === null || info === void 0 ? void 0 : info.node.id;
3670
+ handleCheck({
3671
+ parentIds: parentIds,
3672
+ id: currentId,
3673
+ values: values,
3674
+ treeData: treeData
3675
+ });
3676
+ 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) {
3677
+ return item.id;
3678
+ });
3679
+ // TODO 全选反选
3680
+ if (checked) {
3681
+ values.checked = _toConsumableArray(new Set([].concat(_toConsumableArray(values.checked), _toConsumableArray(childrenIds))));
3682
+ } else {
3683
+ values.checked = values.checked.filter(function (item) {
3684
+ return !childrenIds.includes(item);
3685
+ });
3686
+ values.halfChecked = values.halfChecked.filter(function (item) {
3687
+ return !childrenIds.includes(item);
3688
+ });
3689
+ }
3690
+ setCheckedKeys(values);
3691
+ _onCheck && _onCheck(values, info);
3692
+ onChange && onChange(values, info);
3693
+ },
3694
+ treeData: treeData
3695
+ }, extraProps));
3696
+ };
3697
+ var Tree = /*#__PURE__*/React.forwardRef(WTree);
3698
+
3699
+ var _excluded$c = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3450
3700
  var RangePicker$2 = Index$6.RangePicker;
3451
3701
  var WForm = function WForm(props, ref) {
3452
3702
  var columns = props.columns,
@@ -3462,7 +3712,7 @@ var WForm = function WForm(props, ref) {
3462
3712
  onReset = props.onReset,
3463
3713
  setForm = props.setForm,
3464
3714
  deps = props.deps,
3465
- extraProps = _objectWithoutProperties(props, _excluded$b);
3715
+ extraProps = _objectWithoutProperties(props, _excluded$c);
3466
3716
  var _Form$useForm = Form.useForm(),
3467
3717
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
3468
3718
  form = _Form$useForm2[0];
@@ -3642,13 +3892,37 @@ var WForm = function WForm(props, ref) {
3642
3892
  placeholder: "\u8BF7\u9009\u62E9",
3643
3893
  onLoad: function onLoad(opt) {}
3644
3894
  }, c.fieldProps), _extraProps3))));
3645
- } else if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear'].includes(c.valueType)) {
3895
+ } else if (c.valueType == 'tree') {
3896
+ var _extraProps4 = {};
3897
+ if (c.request) {
3898
+ _extraProps4.request = c.request;
3899
+ }
3646
3900
  var _labelCol4 = {};
3647
3901
  if (search && search.labelWidth) {
3648
3902
  _labelCol4.style = {
3649
3903
  width: search.labelWidth
3650
3904
  };
3651
3905
  }
3906
+ return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
3907
+ className: "pl12 pr12"
3908
+ }, colProps), {}, {
3909
+ key: c.dataIndex
3910
+ }), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
3911
+ initialValue: c.initialValue
3912
+ }, c.formItemProps), {}, {
3913
+ name: c.dataIndex,
3914
+ label: c.title,
3915
+ labelCol: _labelCol4
3916
+ }), /*#__PURE__*/React.createElement(Tree, _objectSpread2(_objectSpread2({
3917
+ disabled: disabled
3918
+ }, c.fieldProps), _extraProps4))));
3919
+ } else if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear'].includes(c.valueType)) {
3920
+ var _labelCol5 = {};
3921
+ if (search && search.labelWidth) {
3922
+ _labelCol5.style = {
3923
+ width: search.labelWidth
3924
+ };
3925
+ }
3652
3926
  var showTime = {};
3653
3927
  var picker = {};
3654
3928
  if (c.valueType == 'dateTime') {
@@ -3677,15 +3951,15 @@ var WForm = function WForm(props, ref) {
3677
3951
  }, c.formItemProps), {}, {
3678
3952
  name: c.dataIndex,
3679
3953
  label: c.title,
3680
- labelCol: _labelCol4
3954
+ labelCol: _labelCol5
3681
3955
  }), /*#__PURE__*/React.createElement(Index$6, _objectSpread2(_objectSpread2(_objectSpread2({
3682
3956
  disabled: disabled,
3683
3957
  placeholder: "\u8BF7\u8F93\u5165"
3684
3958
  }, picker), showTime), c.fieldProps))));
3685
3959
  } else if (c.valueType === 'dateRange' || c.valueType === 'dateTimeRange') {
3686
- var _labelCol5 = {};
3960
+ var _labelCol6 = {};
3687
3961
  if (search && search.labelWidth) {
3688
- _labelCol5.style = {
3962
+ _labelCol6.style = {
3689
3963
  width: search.labelWidth
3690
3964
  };
3691
3965
  }
@@ -3706,22 +3980,22 @@ var WForm = function WForm(props, ref) {
3706
3980
  }, c.formItemProps), {}, {
3707
3981
  name: c.dataIndex,
3708
3982
  label: c.title,
3709
- labelCol: _labelCol5
3983
+ labelCol: _labelCol6
3710
3984
  }), /*#__PURE__*/React.createElement(RangePicker$2, _objectSpread2(_objectSpread2({
3711
3985
  disabled: disabled
3712
3986
  }, _showTime), c.fieldProps))));
3713
3987
  } else if (c.valueType === 'checkbox') {
3714
- var _extraProps4 = {};
3988
+ var _extraProps5 = {};
3715
3989
  if (c.request) {
3716
- _extraProps4.request = c.request;
3990
+ _extraProps5.request = c.request;
3717
3991
  } else if (c.valueEnum) {
3718
- _extraProps4.valueEnum = c.valueEnum;
3992
+ _extraProps5.valueEnum = c.valueEnum;
3719
3993
  } else {
3720
- _extraProps4.options = c.options;
3994
+ _extraProps5.options = c.options;
3721
3995
  }
3722
- var _labelCol6 = {};
3996
+ var _labelCol7 = {};
3723
3997
  if (search && search.labelWidth) {
3724
- _labelCol6.style = {
3998
+ _labelCol7.style = {
3725
3999
  width: search.labelWidth
3726
4000
  };
3727
4001
  }
@@ -3739,7 +4013,7 @@ var WForm = function WForm(props, ref) {
3739
4013
  }, c.formItemProps), {}, {
3740
4014
  name: c.dataIndex,
3741
4015
  label: c.title,
3742
- labelCol: _labelCol6
4016
+ labelCol: _labelCol7
3743
4017
  }), /*#__PURE__*/React.createElement(WCheckboxGroup, _objectSpread2(_objectSpread2({
3744
4018
  onLoad: function onLoad(opt) {
3745
4019
  setColumnsFields(function (preColumnsFields) {
@@ -3747,19 +4021,19 @@ var WForm = function WForm(props, ref) {
3747
4021
  });
3748
4022
  },
3749
4023
  disabled: disabled
3750
- }, c.fieldProps), _extraProps4))));
4024
+ }, c.fieldProps), _extraProps5))));
3751
4025
  } else if (c.valueType === 'radio' || c.valueType === 'radioButton') {
3752
- var _extraProps5 = {};
4026
+ var _extraProps6 = {};
3753
4027
  if (c.request) {
3754
- _extraProps5.request = c.request;
4028
+ _extraProps6.request = c.request;
3755
4029
  } else if (c.valueEnum) {
3756
- _extraProps5.valueEnum = c.valueEnum;
4030
+ _extraProps6.valueEnum = c.valueEnum;
3757
4031
  } else {
3758
- _extraProps5.options = c.options;
4032
+ _extraProps6.options = c.options;
3759
4033
  }
3760
- var _labelCol7 = {};
4034
+ var _labelCol8 = {};
3761
4035
  if (search && search.labelWidth) {
3762
- _labelCol7.style = {
4036
+ _labelCol8.style = {
3763
4037
  width: search.labelWidth
3764
4038
  };
3765
4039
  }
@@ -3784,7 +4058,7 @@ var WForm = function WForm(props, ref) {
3784
4058
  }, c.formItemProps), {}, {
3785
4059
  name: c.dataIndex,
3786
4060
  label: c.title,
3787
- labelCol: _labelCol7
4061
+ labelCol: _labelCol8
3788
4062
  }), /*#__PURE__*/React.createElement(WRadioGroup, _objectSpread2(_objectSpread2(_objectSpread2({
3789
4063
  onLoad: function onLoad(opt) {
3790
4064
  setColumnsFields(function (preColumnsFields) {
@@ -3792,7 +4066,7 @@ var WForm = function WForm(props, ref) {
3792
4066
  });
3793
4067
  },
3794
4068
  disabled: disabled
3795
- }, radioButtonProps), c.fieldProps), _extraProps5))));
4069
+ }, radioButtonProps), c.fieldProps), _extraProps6))));
3796
4070
  } else if (c.valueType === 'switch') {
3797
4071
  var options = [];
3798
4072
  if (c.valueEnum) {
@@ -3804,9 +4078,9 @@ var WForm = function WForm(props, ref) {
3804
4078
  });
3805
4079
  }
3806
4080
  }
3807
- var _labelCol8 = {};
4081
+ var _labelCol9 = {};
3808
4082
  if (search && search.labelWidth) {
3809
- _labelCol8.style = {
4083
+ _labelCol9.style = {
3810
4084
  width: search.labelWidth
3811
4085
  };
3812
4086
  }
@@ -3826,14 +4100,14 @@ var WForm = function WForm(props, ref) {
3826
4100
  }, c.formItemProps), {}, {
3827
4101
  name: c.dataIndex,
3828
4102
  label: c.title,
3829
- labelCol: _labelCol8
4103
+ labelCol: _labelCol9
3830
4104
  }), /*#__PURE__*/React.createElement(WSwitch, _objectSpread2({
3831
4105
  disabled: disabled
3832
4106
  }, c.fieldProps))));
3833
4107
  } else if (c.valueType === 'digit') {
3834
- var _labelCol9 = {};
4108
+ var _labelCol10 = {};
3835
4109
  if (search && search.labelWidth) {
3836
- _labelCol9.style = {
4110
+ _labelCol10.style = {
3837
4111
  width: search.labelWidth
3838
4112
  };
3839
4113
  }
@@ -3846,15 +4120,15 @@ var WForm = function WForm(props, ref) {
3846
4120
  }, c.formItemProps), {}, {
3847
4121
  name: c.dataIndex,
3848
4122
  label: c.title,
3849
- labelCol: _labelCol9
4123
+ labelCol: _labelCol10
3850
4124
  }), /*#__PURE__*/React.createElement(NumericInput, _objectSpread2({
3851
4125
  disabled: disabled,
3852
4126
  placeholder: "\u8BF7\u8F93\u5165\u53C2\u6570(double/int)"
3853
4127
  }, c.fieldProps))));
3854
4128
  } else if (c.renderFormItem) {
3855
- var _labelCol10 = {};
4129
+ var _labelCol11 = {};
3856
4130
  if (search && search.labelWidth) {
3857
- _labelCol10.style = {
4131
+ _labelCol11.style = {
3858
4132
  width: search.labelWidth
3859
4133
  };
3860
4134
  }
@@ -3874,12 +4148,12 @@ var WForm = function WForm(props, ref) {
3874
4148
  }, c.formItemProps), {}, {
3875
4149
  name: c.dataIndex,
3876
4150
  label: c.title,
3877
- labelCol: _labelCol10
4151
+ labelCol: _labelCol11
3878
4152
  }), baseitem))) : null;
3879
4153
  } else if (c.valueType === 'textarea') {
3880
- var _labelCol11 = {};
4154
+ var _labelCol12 = {};
3881
4155
  if (search && search.labelWidth) {
3882
- _labelCol11.style = {
4156
+ _labelCol12.style = {
3883
4157
  width: search.labelWidth
3884
4158
  };
3885
4159
  }
@@ -3892,16 +4166,16 @@ var WForm = function WForm(props, ref) {
3892
4166
  }, c.formItemProps), {}, {
3893
4167
  name: c.dataIndex,
3894
4168
  label: c.title,
3895
- labelCol: _labelCol11
4169
+ labelCol: _labelCol12
3896
4170
  }), /*#__PURE__*/React.createElement(Index.TextArea, _objectSpread2({
3897
4171
  rows: 4,
3898
4172
  disabled: disabled,
3899
4173
  placeholder: "\u8BF7\u8F93\u5165"
3900
4174
  }, c.fieldProps))));
3901
4175
  } else if (c.valueType === 'inputNumber') {
3902
- var _labelCol12 = {};
4176
+ var _labelCol13 = {};
3903
4177
  if (search && search.labelWidth) {
3904
- _labelCol12.style = {
4178
+ _labelCol13.style = {
3905
4179
  width: search.labelWidth
3906
4180
  };
3907
4181
  }
@@ -3914,15 +4188,15 @@ var WForm = function WForm(props, ref) {
3914
4188
  }, c.formItemProps), {}, {
3915
4189
  name: c.dataIndex,
3916
4190
  label: c.title,
3917
- labelCol: _labelCol12
4191
+ labelCol: _labelCol13
3918
4192
  }), /*#__PURE__*/React.createElement(WInputNumber, _objectSpread2({
3919
4193
  disabled: disabled,
3920
4194
  placeholder: "\u8BF7\u8F93\u5165"
3921
4195
  }, c.fieldProps))));
3922
4196
  } else {
3923
- var _labelCol13 = {};
4197
+ var _labelCol14 = {};
3924
4198
  if (search && search.labelWidth) {
3925
- _labelCol13.style = {
4199
+ _labelCol14.style = {
3926
4200
  width: search.labelWidth
3927
4201
  };
3928
4202
  }
@@ -3935,7 +4209,7 @@ var WForm = function WForm(props, ref) {
3935
4209
  }, c.formItemProps), {}, {
3936
4210
  name: c.dataIndex,
3937
4211
  label: c.title,
3938
- labelCol: _labelCol13
4212
+ labelCol: _labelCol14
3939
4213
  }), /*#__PURE__*/React.createElement(Index, _objectSpread2({
3940
4214
  disabled: disabled,
3941
4215
  placeholder: "\u8BF7\u8F93\u5165"
@@ -4212,7 +4486,7 @@ var WForm = function WForm(props, ref) {
4212
4486
  };
4213
4487
  var WForm$1 = /*#__PURE__*/React.forwardRef(WForm);
4214
4488
 
4215
- 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"];
4489
+ 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"];
4216
4490
  function Table(_ref) {
4217
4491
  var _formSearchRef$curren4, _columns$, _columns$2;
4218
4492
  var columns = _ref.columns,
@@ -4243,7 +4517,7 @@ function Table(_ref) {
4243
4517
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
4244
4518
  formRef = _ref.formRef,
4245
4519
  none = _ref.none,
4246
- props = _objectWithoutProperties(_ref, _excluded$c);
4520
+ props = _objectWithoutProperties(_ref, _excluded$d);
4247
4521
  var _useState = useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
4248
4522
  _useState2 = _slicedToArray(_useState, 2),
4249
4523
  selectedRowKeys = _useState2[0],
@@ -4730,7 +5004,7 @@ Table.defaultProps = {
4730
5004
  };
4731
5005
  var index = /*#__PURE__*/memo(Table);
4732
5006
 
4733
- var _excluded$d = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
5007
+ var _excluded$e = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
4734
5008
  function Index$8(props, ref) {
4735
5009
  var value = props.value,
4736
5010
  renderDom = props.renderDom,
@@ -4738,7 +5012,7 @@ function Index$8(props, ref) {
4738
5012
  params = props.params,
4739
5013
  onChange = props.onChange,
4740
5014
  request = props.request,
4741
- rest = _objectWithoutProperties(props, _excluded$d);
5015
+ rest = _objectWithoutProperties(props, _excluded$e);
4742
5016
  var _useState = useState(''),
4743
5017
  _useState2 = _slicedToArray(_useState, 2),
4744
5018
  areaValue = _useState2[0],
@@ -4793,7 +5067,7 @@ function Index$8(props, ref) {
4793
5067
  }
4794
5068
  var index$1 = /*#__PURE__*/React.forwardRef(Index$8);
4795
5069
 
4796
- var _excluded$e = ["height", "width", "count", "style", "numberStyle"],
5070
+ var _excluded$f = ["height", "width", "count", "style", "numberStyle"],
4797
5071
  _excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
4798
5072
  var Number$1 = function Number(_ref) {
4799
5073
  var height = _ref.height,
@@ -4802,7 +5076,7 @@ var Number$1 = function Number(_ref) {
4802
5076
  count = _ref$count === void 0 ? 0 : _ref$count,
4803
5077
  style = _ref.style,
4804
5078
  numberStyle = _ref.numberStyle,
4805
- props = _objectWithoutProperties(_ref, _excluded$e);
5079
+ props = _objectWithoutProperties(_ref, _excluded$f);
4806
5080
  // 上次的值
4807
5081
  var _useState = useState(0),
4808
5082
  _useState2 = _slicedToArray(_useState, 2),
@@ -4952,12 +5226,12 @@ var Index$9 = function Index(props) {
4952
5226
  }));
4953
5227
  };
4954
5228
 
4955
- var _excluded$f = ["duration", "className"];
5229
+ var _excluded$g = ["duration", "className"];
4956
5230
  var Index$a = function Index(props) {
4957
5231
  var _props$duration = props.duration,
4958
5232
  duration = _props$duration === void 0 ? 2.75 : _props$duration,
4959
5233
  className = props.className,
4960
- extraProps = _objectWithoutProperties(props, _excluded$f);
5234
+ extraProps = _objectWithoutProperties(props, _excluded$g);
4961
5235
  return /*#__PURE__*/React.createElement(CountUp, _objectSpread2(_objectSpread2({
4962
5236
  duration: duration
4963
5237
  }, extraProps), {}, {
@@ -4966,7 +5240,7 @@ var Index$a = function Index(props) {
4966
5240
  };
4967
5241
  Index$a.defaultProps = {};
4968
5242
 
4969
- var _excluded$g = ["list", "render", "none", "partSize"];
5243
+ var _excluded$h = ["list", "render", "none", "partSize"];
4970
5244
  function AutoScroll(props) {
4971
5245
  var inner1 = useRef();
4972
5246
  var inner2 = useRef();
@@ -5043,7 +5317,7 @@ var Index$b = function Index(_ref) {
5043
5317
  none = _ref.none,
5044
5318
  _ref$partSize = _ref.partSize,
5045
5319
  partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
5046
- otherProps = _objectWithoutProperties(_ref, _excluded$g);
5320
+ otherProps = _objectWithoutProperties(_ref, _excluded$h);
5047
5321
  var _useState = useState([]),
5048
5322
  _useState2 = _slicedToArray(_useState, 2),
5049
5323
  partA = _useState2[0],
@@ -5117,7 +5391,7 @@ var Index$b = function Index(_ref) {
5117
5391
  }, none || '暂无数据'));
5118
5392
  };
5119
5393
 
5120
- var _excluded$h = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
5394
+ var _excluded$i = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
5121
5395
  // install Swiper modules
5122
5396
  SwiperCore.use([Pagination$1, Navigation, Autoplay, Virtual]);
5123
5397
  var Index$c = /*#__PURE__*/forwardRef(function (props, ref) {
@@ -5129,7 +5403,7 @@ var Index$c = /*#__PURE__*/forwardRef(function (props, ref) {
5129
5403
  onSwiperChange = props.onSwiperChange,
5130
5404
  renderItem = props.renderItem,
5131
5405
  noMove = props.noMove,
5132
- extraProps = _objectWithoutProperties(props, _excluded$h);
5406
+ extraProps = _objectWithoutProperties(props, _excluded$i);
5133
5407
  var _useState = useState(null),
5134
5408
  _useState2 = _slicedToArray(_useState, 2),
5135
5409
  controlledSwiper = _useState2[0],
@@ -5778,7 +6052,7 @@ function createBrowserHistory(props) {
5778
6052
  return history;
5779
6053
  }
5780
6054
 
5781
- var _excluded$i = ["routes", "className"];
6055
+ var _excluded$j = ["routes", "className"];
5782
6056
  var history = createBrowserHistory();
5783
6057
  function itemRender(route, params, routes, paths) {
5784
6058
  var last = routes.indexOf(route) === routes.length - 1;
@@ -5794,7 +6068,7 @@ function itemRender(route, params, routes, paths) {
5794
6068
  var Index$d = function Index(_ref) {
5795
6069
  var routes = _ref.routes,
5796
6070
  className = _ref.className,
5797
- props = _objectWithoutProperties(_ref, _excluded$i);
6071
+ props = _objectWithoutProperties(_ref, _excluded$j);
5798
6072
  return /*#__PURE__*/React.createElement(Breadcrumb, _objectSpread2({
5799
6073
  className: className || 'default',
5800
6074
  separator: ">>",
@@ -5803,7 +6077,7 @@ var Index$d = function Index(_ref) {
5803
6077
  }, props));
5804
6078
  };
5805
6079
 
5806
- var _excluded$j = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
6080
+ var _excluded$k = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
5807
6081
  var Index$e = function Index(_ref, ref) {
5808
6082
  var _sliderTabs$component, _sliderTabs$tabs;
5809
6083
  var title = _ref.title,
@@ -5812,7 +6086,7 @@ var Index$e = function Index(_ref, ref) {
5812
6086
  headerTail = _ref.headerTail,
5813
6087
  headerCenter = _ref.headerCenter,
5814
6088
  sliderTabs = _ref.sliderTabs,
5815
- props = _objectWithoutProperties(_ref, _excluded$j);
6089
+ props = _objectWithoutProperties(_ref, _excluded$k);
5816
6090
  useImperativeHandle(ref, function () {
5817
6091
  return {
5818
6092
  activeTab: activeTab
@@ -6028,7 +6302,7 @@ function DialogModel(props, ref) {
6028
6302
  }
6029
6303
  var Dialog = /*#__PURE__*/React.forwardRef(DialogModel);
6030
6304
 
6031
- var _excluded$k = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
6305
+ var _excluded$l = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
6032
6306
  _excluded2$3 = ["open"];
6033
6307
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
6034
6308
  _inherits(Modal, _React$PureComponent);
@@ -6160,7 +6434,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
6160
6434
  style = _this$props4.style,
6161
6435
  isDrag = _this$props4.isDrag,
6162
6436
  wrapClassName = _this$props4.wrapClassName,
6163
- other = _objectWithoutProperties(_this$props4, _excluded$k);
6437
+ other = _objectWithoutProperties(_this$props4, _excluded$l);
6164
6438
  return /*#__PURE__*/React.createElement(Dialog, _objectSpread2({
6165
6439
  ref: this.containerRef,
6166
6440
  closeCb: closeCb,
@@ -6325,7 +6599,7 @@ function DialogModel$1(props) {
6325
6599
  return renderChildren;
6326
6600
  }
6327
6601
 
6328
- var _excluded$l = ["open"];
6602
+ var _excluded$m = ["open"];
6329
6603
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
6330
6604
  _inherits(Modal, _React$PureComponent);
6331
6605
  var _super = _createSuper(Modal);
@@ -6447,7 +6721,7 @@ Modal$1.show = function (config) {
6447
6721
  setShow = _useState2[1];
6448
6722
  manager.setShow = setShow;
6449
6723
  var open = props.open,
6450
- trueProps = _objectWithoutProperties(props, _excluded$l);
6724
+ trueProps = _objectWithoutProperties(props, _excluded$m);
6451
6725
  useEffect(function () {
6452
6726
  manager.mounted = true;
6453
6727
  setShow(open);
@@ -6619,7 +6893,7 @@ function DragBox(_ref) {
6619
6893
  }, children))) : ( /*#__PURE__*/React.createElement(React.Fragment, null));
6620
6894
  }
6621
6895
 
6622
- var _excluded$m = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6896
+ var _excluded$n = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6623
6897
  var ModalForm = function ModalForm(props, ref) {
6624
6898
  var columns = props.columns,
6625
6899
  extraColumns = props.extraColumns,
@@ -6638,7 +6912,7 @@ var ModalForm = function ModalForm(props, ref) {
6638
6912
  modalHeaderSlot = props.modalHeaderSlot,
6639
6913
  modalFooterSlot = props.modalFooterSlot,
6640
6914
  formProps = props.formProps,
6641
- extraProps = _objectWithoutProperties(props, _excluded$m);
6915
+ extraProps = _objectWithoutProperties(props, _excluded$n);
6642
6916
  var formRef = useRef(null);
6643
6917
  var _useState = useState(false),
6644
6918
  _useState2 = _slicedToArray(_useState, 2),
@@ -6763,7 +7037,7 @@ var ModalForm = function ModalForm(props, ref) {
6763
7037
  };
6764
7038
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
6765
7039
 
6766
- var _excluded$n = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
7040
+ var _excluded$o = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
6767
7041
  var TabelCard = function TabelCard(props, ref) {
6768
7042
  var columns = props.columns,
6769
7043
  extraColumns = props.extraColumns,
@@ -6787,7 +7061,7 @@ var TabelCard = function TabelCard(props, ref) {
6787
7061
  noBordered = props.noBordered,
6788
7062
  showIndex = props.showIndex,
6789
7063
  searchTableSlot = props.searchTableSlot,
6790
- extraProps = _objectWithoutProperties(props, _excluded$n);
7064
+ extraProps = _objectWithoutProperties(props, _excluded$o);
6791
7065
  var actionRef = useRef();
6792
7066
  var modalFormRef = useRef(null);
6793
7067
  var searchFormRef = useRef(null);
@@ -11053,7 +11327,7 @@ function DhPlayer(_ref, ref) {
11053
11327
  }
11054
11328
  var index$6 = /*#__PURE__*/forwardRef(DhPlayer);
11055
11329
 
11056
- var _excluded$o = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11330
+ var _excluded$p = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11057
11331
  // 默认速度控制
11058
11332
  var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2];
11059
11333
  // 默认记忆提示文字展示时长(s)
@@ -11084,7 +11358,7 @@ var index$7 = (function (_ref) {
11084
11358
  enableMemory = _ref$enableMemory === void 0 ? false : _ref$enableMemory,
11085
11359
  _ref$lastPlayTimeHide = _ref.lastPlayTimeHideDelay,
11086
11360
  lastPlayTimeHideDelay = _ref$lastPlayTimeHide === void 0 ? DEFAULT_LAST_PLAY_TIME_DELAY : _ref$lastPlayTimeHide,
11087
- props = _objectWithoutProperties(_ref, _excluded$o);
11361
+ props = _objectWithoutProperties(_ref, _excluded$p);
11088
11362
  var player = useRef();
11089
11363
  var currentPlayerIndex = useRef(0);
11090
11364
  // 内置的 index 状态管理
@@ -11254,7 +11528,7 @@ var index$7 = (function (_ref) {
11254
11528
  });
11255
11529
  });
11256
11530
 
11257
- var _excluded$p = ["className", "frameStyle", "style", "direction", "children"];
11531
+ var _excluded$q = ["className", "frameStyle", "style", "direction", "children"];
11258
11532
  function FrameBox$1(_ref) {
11259
11533
  var className = _ref.className,
11260
11534
  frameStyle = _ref.frameStyle,
@@ -11262,7 +11536,7 @@ function FrameBox$1(_ref) {
11262
11536
  _ref$direction = _ref.direction,
11263
11537
  direction = _ref$direction === void 0 ? 'in' : _ref$direction,
11264
11538
  children = _ref.children,
11265
- props = _objectWithoutProperties(_ref, _excluded$p);
11539
+ props = _objectWithoutProperties(_ref, _excluded$q);
11266
11540
  return /*#__PURE__*/React.createElement("div", _objectSpread2({
11267
11541
  className: classnames(_defineProperty(_defineProperty({}, 'frame', true), className || '', true)),
11268
11542
  style: style
@@ -11289,7 +11563,7 @@ function FrameBox$1(_ref) {
11289
11563
  }), children);
11290
11564
  }
11291
11565
 
11292
- 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"];
11566
+ 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"];
11293
11567
  function NtTable(_ref, ref) {
11294
11568
  var _formSearchRef$curren4, _columns$, _columns$2;
11295
11569
  var columns = _ref.columns,
@@ -11320,7 +11594,7 @@ function NtTable(_ref, ref) {
11320
11594
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
11321
11595
  formRef = _ref.formRef,
11322
11596
  none = _ref.none,
11323
- props = _objectWithoutProperties(_ref, _excluded$q);
11597
+ props = _objectWithoutProperties(_ref, _excluded$r);
11324
11598
  var _useState = useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
11325
11599
  _useState2 = _slicedToArray(_useState, 2),
11326
11600
  selectedRowKeys = _useState2[0],
@@ -12576,7 +12850,7 @@ function WaterLevelCharts(config) {
12576
12850
  /*
12577
12851
  * @Author: lijin
12578
12852
  * @Date: 2021-09-09 11:02:54
12579
- * @LastEditTime: 2023-12-25 19:04:08
12853
+ * @LastEditTime: 2024-01-02 18:08:42
12580
12854
  * @LastEditors: lijin
12581
12855
  * @Description:
12582
12856
  * @FilePath: \wargerm\src\index.ts
@@ -12588,4 +12862,4 @@ if (REACT_APP_ENV == 'development') {
12588
12862
  document.documentElement.setAttribute(COLOR_ATTR_NAME, 'sd');
12589
12863
  }
12590
12864
 
12591
- export { Index$b as AutoScroll, Index$d as Breadcrumb, WButton as Button, index$4 as Calendar, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, WCheckboxGroup as CheckboxGroup, Index$a as CountUp, Index$2 as DatePicker, index$6 as DhPlayer, DragBox, IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$8 as NtTable, Index$9 as Number, NumericInput, Index$3 as Radio, WRadioGroup as RadioGroup, index$1 as RequestRenderDom, Index$5 as Select, Index$c as Swiper, WSwitch as Switch, index$3 as TabelCard, index as Table, TableEdit, Index$7 as TreeSelect, Upload, index$7 as Video, index$5 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, useStateWithCall, wTracing, create as whox, wmox };
12865
+ export { Index$b as AutoScroll, Index$d as Breadcrumb, WButton as Button, index$4 as Calendar, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, WCheckboxGroup as CheckboxGroup, Index$a as CountUp, Index$2 as DatePicker, index$6 as DhPlayer, DragBox, IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$8 as NtTable, Index$9 as Number, NumericInput, Index$3 as Radio, WRadioGroup as RadioGroup, index$1 as RequestRenderDom, Index$5 as Select, Index$c as Swiper, WSwitch as Switch, index$3 as TabelCard, index as Table, TableEdit, Tree, Index$7 as TreeSelect, Upload, index$7 as Video, index$5 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, useStateWithCall, wTracing, create as whox, wmox };