uiw 4.12.0 → 4.13.0

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/README.md CHANGED
@@ -7,27 +7,24 @@
7
7
  <a href="https://github.com/uiwjs/uiw/actions">
8
8
  <img alt="Github Actions" src="https://github.com/uiwjs/uiw/workflows/Build%20uiw/badge.svg">
9
9
  </a>
10
- <a href="https://github.com/uiwjs/uiw/issues">
11
- <img alt="Github Issues" src="https://img.shields.io/github/issues/uiwjs/uiw.svg">
10
+ <a href="https://github.com/uiwjs/uiw">
11
+ <img alt="License MIT" src="https://img.shields.io/dub/l/vibe-d.svg">
12
12
  </a>
13
- <a href="https://github.com/uiwjs/uiw/network">
14
- <img alt="Github Forks" src="https://img.shields.io/github/forks/uiwjs/uiw.svg">
13
+ <a href="https://github.com/facebook/jest">
14
+ <img alt="jest" src="https://facebook.github.io/jest/img/jest-badge.svg">
15
15
  </a>
16
- <a href="https://github.com/uiwjs/uiw/stargazers">
17
- <img alt="Github Stars" src="https://img.shields.io/github/stars/uiwjs/uiw.svg">
16
+ <a href="https://gitpod.io/#https://github.com/uiwjs/uiw">
17
+ <img alt="Open in Gitpod" src="https://shields.io/badge/Open%20in-Gitpod-green?logo=Gitpod">
18
18
  </a>
19
19
  <br>
20
20
  <a href="https://github.com/uiwjs/uiw/releases">
21
21
  <img alt="Github Releases" src="https://img.shields.io/github/release/uiwjs/uiw.svg">
22
22
  </a>
23
- <a href="https://github.com/uiwjs/uiw">
24
- <img alt="License MIT" src="https://img.shields.io/dub/l/vibe-d.svg">
25
- </a>
26
23
  <a href="https://www.npmjs.com/package/uiw">
27
24
  <img alt="npm version" src="https://img.shields.io/npm/v/uiw.svg">
28
25
  </a>
29
- <a href="https://github.com/facebook/jest">
30
- <img alt="jest" src="https://facebook.github.io/jest/img/jest-badge.svg">
26
+ <a href="https://github.com/uiwjs/uiw/stargazers">
27
+ <img alt="Github Stars" src="https://img.shields.io/github/stars/uiwjs/uiw.svg">
31
28
  </a>
32
29
  </p>
33
30
 
@@ -107,7 +104,7 @@ Package | Version | Description
107
104
  [`@uiw/react-grid`](/packages/react-grid)| [![npm version](https://img.shields.io/npm/v/@uiw/react-grid.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-grid) | -
108
105
  [`@uiw/react-icon`](/packages/react-icon)| [![npm version](https://img.shields.io/npm/v/@uiw/react-icon.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-icon) | -
109
106
  [`@uiw/react-input`](/packages/react-input)| [![npm version](https://img.shields.io/npm/v/@uiw/react-input.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-input) | -
110
- [`@uiw/react-layout`](/packages/react-layout)| [![npm version](https://img.shields.io/npm/v/@uiw/react-layout.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-layout) | -
107
+ [`@uiw/react-layout`](https://github.com/uiwjs/react-layout)| [![npm version](https://img.shields.io/npm/v/@uiw/react-layout.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-layout) | -
111
108
  [`@uiw/react-list`](/packages/react-list)| [![npm version](https://img.shields.io/npm/v/@uiw/react-list.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-list) | -
112
109
  [`@uiw/react-loader`](/packages/react-loader)| [![npm version](https://img.shields.io/npm/v/@uiw/react-loader.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-loader) | -
113
110
  [`@uiw/react-menu`](/packages/react-menu)| [![npm version](https://img.shields.io/npm/v/@uiw/react-menu.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-menu) | -
@@ -124,7 +121,8 @@ Package | Version | Description
124
121
  [`@uiw/react-progress`](/packages/react-progress)| [![npm version](https://img.shields.io/npm/v/@uiw/react-progress.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-progress) | -
125
122
  [`@uiw/react-radio`](/packages/react-radio)| [![npm version](https://img.shields.io/npm/v/@uiw/react-radio.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-radio) | -
126
123
  [`@uiw/react-rate`](/packages/react-rate)| [![npm version](https://img.shields.io/npm/v/@uiw/react-rate.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-rate) | -
127
- [`@uiw/react-search-select`](/packages/react-search-select)| [![npm version](https://img.shields.io/npm/v/@uiw/react-search-select.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-search-select) | -
124
+ [`@uiw/react-search-select`](/packages/react-search-select)| [![npm version](https://img.shields.io/npm/v/@uiw/react-search-select.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-search-select) | -
125
+ [`@uiw/react-search-tree`](/packages/react-search-tree)| [![npm version](https://img.shields.io/npm/v/@uiw/react-search-tree.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-search-tree) | -
128
126
  [`@uiw/react-select`](/packages/react-select)| [![npm version](https://img.shields.io/npm/v/@uiw/react-select.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-select) | -
129
127
  [`@uiw/react-split`](https://github.com/uiwjs/react-split)| [![npm version](https://img.shields.io/npm/v/@uiw/react-split.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-split) | -
130
128
  [`@uiw/react-slider`](/packages/react-slider)| [![npm version](https://img.shields.io/npm/v/@uiw/react-slider.svg?maxAge=3600)](https://www.npmjs.com/package/@uiw/react-slider) | -
@@ -149,7 +147,7 @@ Use Gitpod, a free online dev environment for GitHub.
149
147
  Or clone locally:
150
148
 
151
149
  ```bash
152
- $ git clone https://github.com/uiwjs/uiwjs.github.io.git --recurse-submodules
150
+ $ git clone git@github.com:uiwjs/uiw.git
153
151
  ```
154
152
 
155
153
  Install dependencies & compile component code.
package/dist/uiw.css CHANGED
@@ -1943,6 +1943,62 @@ sup.w-badge-count {
1943
1943
  display: none;
1944
1944
  }
1945
1945
 
1946
+ .w-dateinputrange-contents {
1947
+ display: flex;
1948
+ justify-content: space-between;
1949
+ }
1950
+ .w-dateinputrange-contents input {
1951
+ box-shadow: none;
1952
+ padding: 0px;
1953
+ height: 20px;
1954
+ }
1955
+ .w-dateinputrange-contents .w-input-inner:hover {
1956
+ box-shadow: none !important;
1957
+ }
1958
+ .w-dateinputrange-contents .w-input-inner:focus {
1959
+ box-shadow: none !important;
1960
+ }
1961
+ .w-dateinputrange-inner {
1962
+ display: flex;
1963
+ justify-content: space-between;
1964
+ outline: none;
1965
+ border: none;
1966
+ align-items: center;
1967
+ border-radius: 3px;
1968
+ box-shadow: 0 0 0 0 rgba(19, 124, 189, 0), 0 0 0 0 rgba(19, 124, 189, 0), inset 0 0 0 1px rgba(16, 22, 26, 0.15), inset 0 1px 1px rgba(16, 22, 26, 0.2);
1969
+ box-sizing: border-box;
1970
+ background: #fff;
1971
+ min-height: 30px;
1972
+ margin: 0 !important;
1973
+ padding: 3px 10px 3px 10px;
1974
+ vertical-align: middle;
1975
+ line-height: 30px;
1976
+ color: #393e48;
1977
+ font-weight: 400;
1978
+ font-size: inherit;
1979
+ transition: box-shadow 0.3s cubic-bezier(0.4, 1, 0.75, 0.9);
1980
+ -webkit-appearance: none;
1981
+ -moz-appearance: none;
1982
+ appearance: none;
1983
+ }
1984
+ .w-dateinputrange-inner:focus {
1985
+ box-shadow: 0 0 0 1px #393e48, 0 0 0 3px rgba(57, 62, 72, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2);
1986
+ }
1987
+ .w-dateinputrange-inner:hover {
1988
+ box-shadow: 0 0 0 1px #6e6e6e, 0 0 0 3px rgba(57, 62, 72, 0), inset 0 1px 1px rgba(16, 22, 26, 0.2);
1989
+ }
1990
+ .w-dateinputrange-inner:focus.w-dateinputrange-inner:hover {
1991
+ box-shadow: 0 0 0 1px #6e6e6e, 0 0 0 3px rgba(57, 62, 72, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2);
1992
+ }
1993
+ .w-dateinputrange-inner:disabled {
1994
+ box-shadow: none;
1995
+ background: #dddddd;
1996
+ opacity: 0.75;
1997
+ color: #a5a5a5;
1998
+ cursor: not-allowed;
1999
+ resize: none;
2000
+ }
2001
+
1946
2002
  .w-dateinput {
1947
2003
  display: inline-block;
1948
2004
  }
package/dist/uiw.js CHANGED
@@ -328,6 +328,7 @@ __webpack_require__.d(__webpack_exports__, {
328
328
  "Collapse": () => (/* reexport */ react_collapse_esm),
329
329
  "CopyToClipboard": () => (/* reexport */ CopyToClipboard),
330
330
  "DateInput": () => (/* reexport */ DateInput),
331
+ "DateInputRange": () => (/* reexport */ DateInputRange),
331
332
  "DatePicker": () => (/* reexport */ DatePicker),
332
333
  "DatePickerCaption": () => (/* reexport */ DatePickerCaption),
333
334
  "DatePickerDay": () => (/* reexport */ DatePickerDay),
@@ -345,7 +346,11 @@ __webpack_require__.d(__webpack_exports__, {
345
346
  "Icon": () => (/* reexport */ Icon),
346
347
  "Input": () => (/* reexport */ react_input_esm),
347
348
  "Layout": () => (/* reexport */ react_layout_esm),
349
+ "LayoutContent": () => (/* reexport */ LayoutContent),
348
350
  "LayoutContext": () => (/* reexport */ LayoutContext),
351
+ "LayoutFooter": () => (/* reexport */ LayoutFooter),
352
+ "LayoutHeader": () => (/* reexport */ LayoutHeader),
353
+ "LayoutSider": () => (/* reexport */ LayoutSider),
349
354
  "List": () => (/* reexport */ react_list_esm),
350
355
  "ListItem": () => (/* reexport */ ListItem),
351
356
  "Loader": () => (/* reexport */ react_loader_esm),
@@ -4479,6 +4484,117 @@ function CopyToClipboard(props) {
4479
4484
  }));
4480
4485
  }
4481
4486
 
4487
+ ;// CONCATENATED MODULE: ../react-date-input/esm/style/date-input-range.css
4488
+ // extracted by mini-css-extract-plugin
4489
+ /* harmony default export */ const date_input_range = ({});
4490
+ ;// CONCATENATED MODULE: ../react-date-input/esm/DateInputRange.js
4491
+
4492
+
4493
+ var DateInputRange_excluded = ["prefixCls", "bodyStyle", "className", "popoverProps", "datePickerProps", "allowClear", "format", "onChange", "value"];
4494
+
4495
+
4496
+
4497
+
4498
+
4499
+
4500
+
4501
+
4502
+
4503
+ function DateInputRange(props) {
4504
+ var {
4505
+ prefixCls = 'w-dateinputrange',
4506
+ bodyStyle = undefined,
4507
+ className,
4508
+ popoverProps,
4509
+ datePickerProps,
4510
+ allowClear = true,
4511
+ format = 'YYYY/MM/DD',
4512
+ onChange,
4513
+ value
4514
+ } = props,
4515
+ inputProps = _objectWithoutPropertiesLoose(props, DateInputRange_excluded);
4516
+
4517
+ var [dateRange, setDateRange] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
4518
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4519
+ var valueTemp = [];
4520
+ var propsValue = value;
4521
+
4522
+ if (Array.isArray(propsValue) && !!(propsValue != null && propsValue.length)) {
4523
+ propsValue.forEach((date, index) => {
4524
+ valueTemp[index] = typeof propsValue[index] === 'string' ? new Date(date) : date;
4525
+ });
4526
+ }
4527
+
4528
+ setDateRange(valueTemp);
4529
+ }, [JSON.stringify(value)]);
4530
+
4531
+ function handleChange(cdate, idx) {
4532
+ var changeValue = [...dateRange];
4533
+ changeValue[idx] = cdate;
4534
+ setDateRange(changeValue);
4535
+ onChange && onChange(cdate, changeValue);
4536
+ }
4537
+
4538
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
4539
+ className: [prefixCls + "-contents", prefixCls + "-inner"].filter(Boolean).join(' ').trim(),
4540
+ style: _extends({
4541
+ width: 300
4542
+ }, bodyStyle),
4543
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
4544
+ trigger: "focus",
4545
+ placement: "bottomLeft",
4546
+ autoAdjustOverflow: true
4547
+ }, popoverProps, {
4548
+ content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
4549
+ date: dateRange[0],
4550
+ className: prefixCls + "-popover"
4551
+ }, datePickerProps, {
4552
+ onChange: selectedDate => handleChange(selectedDate, 0)
4553
+ })),
4554
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
4555
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
4556
+ readOnly: true
4557
+ }, inputProps, {
4558
+ // onChange={(v) => console.log('v', v)}
4559
+ value: dateRange[0] ? formatter(format, dateRange[0]) : '',
4560
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
4561
+ }))
4562
+ })), /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4563
+ type: "swap-right",
4564
+ verticalAlign: "baseline",
4565
+ style: {
4566
+ fontSize: 21,
4567
+ top: -1,
4568
+ margin: '0px 8px 0px 5px'
4569
+ }
4570
+ }), /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
4571
+ trigger: "focus",
4572
+ placement: "bottomLeft",
4573
+ autoAdjustOverflow: true
4574
+ }, popoverProps, {
4575
+ content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
4576
+ date: dateRange[1],
4577
+ className: prefixCls + "-popover"
4578
+ }, datePickerProps, {
4579
+ onChange: selectedDate => handleChange(selectedDate, 1)
4580
+ })),
4581
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
4582
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
4583
+ readOnly: true
4584
+ }, inputProps, {
4585
+ value: dateRange[1] ? formatter(format, dateRange[1]) : '' // onChange={(v) => console.log('v2', v)}
4586
+ ,
4587
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
4588
+ }))
4589
+ })), allowClear && dateRange.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4590
+ className: prefixCls + "-close-btn",
4591
+ color: "#ccc",
4592
+ onClick: () => setDateRange([]),
4593
+ type: "close"
4594
+ })]
4595
+ });
4596
+ }
4597
+
4482
4598
  ;// CONCATENATED MODULE: ../react-date-input/esm/style/index.css
4483
4599
  // extracted by mini-css-extract-plugin
4484
4600
  /* harmony default export */ const react_date_input_esm_style = ({});
@@ -4494,6 +4610,7 @@ var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "
4494
4610
 
4495
4611
 
4496
4612
 
4613
+
4497
4614
  function DateInput(props) {
4498
4615
  var {
4499
4616
  prefixCls = 'w-dateinput',
@@ -5564,8 +5681,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
5564
5681
  }
5565
5682
 
5566
5683
  function setFields(fields) {
5567
- data.current = fields;
5568
- setData(data);
5684
+ var tempData = _extends({}, data, {
5685
+ current: fields
5686
+ });
5687
+
5688
+ setData(tempData);
5569
5689
  }
5570
5690
 
5571
5691
  function handleChange(name, validator, element, cb) {
@@ -5904,7 +6024,7 @@ class Layout extends (external_root_React_commonjs2_react_commonjs_react_amd_rea
5904
6024
  siderHook: this.getSiderHook()
5905
6025
  },
5906
6026
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", _extends({
5907
- className: [prefixCls, className, (typeof hasSider === 'boolean' ? hasSider : this.state.siders.length > 0) ? prefixCls + "-has-sider" : null].filter(Boolean).join(' ').trim()
6027
+ className: [prefixCls, className, typeof hasSider === 'boolean' && hasSider || this.state.siders.length > 0 ? prefixCls + "-has-sider" : null].filter(Boolean).join(' ').trim()
5908
6028
  }, other, {
5909
6029
  children: children
5910
6030
  }))
@@ -5926,24 +6046,21 @@ Layout.defaultProps = {
5926
6046
  var Header_excluded = ["prefixCls", "className", "children"];
5927
6047
 
5928
6048
 
5929
- /* harmony default export */ const Header = (function (props) {
5930
- if (props === void 0) {
5931
- props = {};
5932
- }
5933
-
5934
- var {
6049
+ function LayoutHeader(props) {
6050
+ var _ref = props || {},
6051
+ {
5935
6052
  prefixCls = 'w-layout-header',
5936
6053
  className,
5937
6054
  children
5938
- } = props,
5939
- other = _objectWithoutPropertiesLoose(props, Header_excluded);
6055
+ } = _ref,
6056
+ other = _objectWithoutPropertiesLoose(_ref, Header_excluded);
5940
6057
 
5941
6058
  return /*#__PURE__*/(0,jsx_runtime.jsx)("header", _extends({
5942
6059
  className: [prefixCls, className].filter(Boolean).join(' ').trim()
5943
6060
  }, other, {
5944
6061
  children: children
5945
6062
  }));
5946
- });
6063
+ }
5947
6064
 
5948
6065
  ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Footer.js
5949
6066
 
@@ -5951,11 +6068,7 @@ var Header_excluded = ["prefixCls", "className", "children"];
5951
6068
  var Footer_excluded = ["prefixCls", "className", "children"];
5952
6069
 
5953
6070
 
5954
- /* harmony default export */ const Footer = (function (props) {
5955
- if (props === void 0) {
5956
- props = {};
5957
- }
5958
-
6071
+ function LayoutFooter(props) {
5959
6072
  var {
5960
6073
  prefixCls = 'w-layout-footer',
5961
6074
  className,
@@ -5968,7 +6081,7 @@ var Footer_excluded = ["prefixCls", "className", "children"];
5968
6081
  }, other, {
5969
6082
  children: children
5970
6083
  }));
5971
- });
6084
+ }
5972
6085
 
5973
6086
  ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Sider.js
5974
6087
 
@@ -6028,15 +6141,11 @@ function Sider(props) {
6028
6141
  }));
6029
6142
  }
6030
6143
 
6031
- /* harmony default export */ const esm_Sider = (function (props) {
6032
- if (props === void 0) {
6033
- props = {};
6034
- }
6035
-
6144
+ function LayoutSider(props) {
6036
6145
  return /*#__PURE__*/(0,jsx_runtime.jsx)(LayoutContext.Consumer, {
6037
6146
  children: context => /*#__PURE__*/(0,jsx_runtime.jsx)(Sider, _extends({}, props, context))
6038
6147
  });
6039
- });
6148
+ }
6040
6149
 
6041
6150
  ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Content.js
6042
6151
 
@@ -6044,11 +6153,7 @@ function Sider(props) {
6044
6153
  var Content_excluded = ["prefixCls", "className", "children"];
6045
6154
 
6046
6155
 
6047
- /* harmony default export */ const Content = (function (props) {
6048
- if (props === void 0) {
6049
- props = {};
6050
- }
6051
-
6156
+ function LayoutContent(props) {
6052
6157
  var {
6053
6158
  prefixCls = 'w-layout-content',
6054
6159
  className,
@@ -6061,7 +6166,7 @@ var Content_excluded = ["prefixCls", "className", "children"];
6061
6166
  }, other, {
6062
6167
  children: children
6063
6168
  }));
6064
- });
6169
+ }
6065
6170
 
6066
6171
  ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/style/index.css
6067
6172
  // extracted by mini-css-extract-plugin
@@ -6073,10 +6178,10 @@ var Content_excluded = ["prefixCls", "className", "children"];
6073
6178
 
6074
6179
 
6075
6180
 
6076
- Layout.Header = Header;
6077
- Layout.Footer = Footer;
6078
- Layout.Sider = esm_Sider;
6079
- Layout.Content = Content;
6181
+ Layout.Header = LayoutHeader;
6182
+ Layout.Footer = LayoutFooter;
6183
+ Layout.Sider = LayoutSider;
6184
+ Layout.Content = LayoutContent;
6080
6185
 
6081
6186
 
6082
6187
 
@@ -7690,7 +7795,7 @@ var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "child
7690
7795
  ;// CONCATENATED MODULE: ../react-search-select/esm/index.js
7691
7796
 
7692
7797
 
7693
- var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "labelInValue", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "placeholder", "onSearch", "onChange", "onSelect"];
7798
+ var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "labelInValue", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "tagProps", "placeholder", "onSearch", "onChange", "onSelect"];
7694
7799
 
7695
7800
 
7696
7801
 
@@ -7719,6 +7824,7 @@ function SearchSelect(props) {
7719
7824
  value,
7720
7825
  defaultValue,
7721
7826
  showSearch,
7827
+ tagProps = {},
7722
7828
  placeholder,
7723
7829
  onSearch,
7724
7830
  onChange,
@@ -7901,19 +8007,20 @@ function SearchSelect(props) {
7901
8007
  flexFlow: 'wrap'
7902
8008
  },
7903
8009
  children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
7904
- return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
7905
- style: {
8010
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
8011
+ style: _extends({
7906
8012
  height: 20,
7907
8013
  margin: 1,
7908
8014
  display: 'flex',
7909
8015
  alignItems: 'center'
7910
- },
8016
+ }, tagProps.style),
7911
8017
  className: prefixCls + "-tag",
8018
+ color: "#393E48"
8019
+ }, tagProps, {
7912
8020
  closable: true,
7913
8021
  onClose: () => handleItemsClick(index, item),
7914
- color: "#393E48",
7915
8022
  children: item.label
7916
- }, index);
8023
+ }), index);
7917
8024
  }), !!omitTagCount && /*#__PURE__*/(0,jsx_runtime.jsxs)(react_tag_esm, {
7918
8025
  style: {
7919
8026
  height: 20,
@@ -8155,7 +8262,7 @@ class Split extends (external_root_React_commonjs2_react_commonjs_react_amd_reac
8155
8262
 
8156
8263
  return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
8157
8264
  children: [BarCom, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, _extends({}, props))]
8158
- });
8265
+ }, idx);
8159
8266
  })
8160
8267
  }));
8161
8268
  }
@@ -9657,6 +9764,9 @@ function SearchTagInput(props) {
9657
9764
  optionRef.current = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => selectedOption, [selectedOption]);
9658
9765
  var [selectIconType, setSelectIconType] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
9659
9766
  var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
9767
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9768
+ setSelectedOption(values);
9769
+ }, [JSON.stringify(values)]);
9660
9770
 
9661
9771
  function renderSelectIcon(type) {
9662
9772
  var selectIconType = type === 'enter' && allowClear && (!!selectedOption.length || searchValue) ? 'close' : '';
@@ -9835,6 +9945,15 @@ function TreeCheckeds(props) {
9835
9945
  }
9836
9946
  };
9837
9947
 
9948
+ var iteratorParent = child => {
9949
+ // 向上迭代
9950
+ if (child.parent) {
9951
+ var selectCount = child.parent.children.filter(child => !selectOption[child.key]).length;
9952
+ addOrDel(child.parent.key, child.parent.label, selectCount === 0);
9953
+ iteratorParent(child.parent);
9954
+ }
9955
+ };
9956
+
9838
9957
  childrens.forEach(child => {
9839
9958
  var _child$children, _child$label;
9840
9959
 
@@ -9843,11 +9962,7 @@ function TreeCheckeds(props) {
9843
9962
  }
9844
9963
 
9845
9964
  addOrDel(child.key, (_child$label = child.label) == null ? void 0 : _child$label.toString(), isAdd);
9846
-
9847
- if (child.parent) {
9848
- var selectCount = child.parent.children.filter(child => !selectOption[child.key]).length;
9849
- addOrDel(child.parent.key, child.parent.label, selectCount === 0);
9850
- }
9965
+ iteratorParent(child);
9851
9966
  });
9852
9967
  return selectOption;
9853
9968
  };
@@ -9873,10 +9988,13 @@ function SearchTree(props) {
9873
9988
 
9874
9989
  var [selectedValues, selectedValuesSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value);
9875
9990
  var [selectedOptions, selectedOptionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(options);
9991
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9992
+ selectedValuesSet(value);
9993
+ }, [JSON.stringify(value)]);
9876
9994
 
9877
9995
  var selectedChange = (resultValue, cur, isChecked) => {
9878
9996
  selectedValuesSet(resultValue);
9879
- onChange == null ? void 0 : onChange(resultValue, cur, isChecked);
9997
+ onChange == null ? void 0 : onChange(cur, resultValue, isChecked);
9880
9998
  }; // 防抖
9881
9999
 
9882
10000