uiw 4.13.6 → 4.13.9

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/uiw.css CHANGED
@@ -2717,6 +2717,10 @@ sup.w-badge-count {
2717
2717
  color: #dc3545;
2718
2718
  }
2719
2719
  .w-form-item-error .w-input-inner,
2720
+ .w-form-item-error .w-select,
2721
+ .w-form-item-error .w-select-default,
2722
+ .w-form-item-error .w-select:hover,
2723
+ .w-form-item-error .w-select-default:hover,
2720
2724
  .w-form-item-error .w-input-inner:hover,
2721
2725
  .w-form-item-error .w-input-inner:focus.w-input-inner:hover,
2722
2726
  .w-form-item-error .w-textarea,
@@ -4641,10 +4645,22 @@ a.w-list-item:hover:not(.w-disabled) {
4641
4645
 
4642
4646
  .w-tabs-bar {
4643
4647
  position: relative;
4648
+ overflow-x: auto;
4649
+ height: calc(100% + 17px);
4644
4650
  }
4645
4651
  .w-tabs-nav {
4646
4652
  position: relative;
4647
4653
  }
4654
+ .w-tabs-nav-hidden {
4655
+ display: flex;
4656
+ overflow-y: auto;
4657
+ padding: 5px 10px 5px 5px;
4658
+ max-height: 200px;
4659
+ flex-direction: column;
4660
+ }
4661
+ .w-tabs-nav-hidden :hover {
4662
+ background: #d9d9d9;
4663
+ }
4648
4664
  .w-tabs-item {
4649
4665
  padding: 7px 10px;
4650
4666
  display: inline-block;
@@ -4667,6 +4683,12 @@ a.w-list-item:hover:not(.w-disabled) {
4667
4683
  user-select: none;
4668
4684
  color: rgba(0, 0, 0, 0.25);
4669
4685
  }
4686
+ .w-tabs-flow-content {
4687
+ margin-left: 5px;
4688
+ padding: 0px 10px 0px 10px;
4689
+ box-shadow: 1px 0px 0px #d9d9d9 inset;
4690
+ cursor: pointer;
4691
+ }
4670
4692
  .w-tabs-card .w-tabs-nav::after,
4671
4693
  .w-tabs-line .w-tabs-nav::after {
4672
4694
  content: '';
@@ -4771,6 +4793,7 @@ a.w-list-item:hover:not(.w-disabled) {
4771
4793
  background-color: rgba(0, 0, 0, 0.75);
4772
4794
  border-radius: 4px;
4773
4795
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
4796
+ word-break: break-all;
4774
4797
  }
4775
4798
  .w-tooltip.right .w-tooltip-arrow,
4776
4799
  .w-tooltip.rightTop .w-tooltip-arrow,
package/dist/uiw.js CHANGED
@@ -2814,7 +2814,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
2814
2814
  } = props,
2815
2815
  other = _objectWithoutPropertiesLoose(props, react_overlay_trigger_esm_excluded);
2816
2816
 
2817
- var zIndex = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(990);
2817
+ var zIndex = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(999);
2818
2818
  var triggerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
2819
2819
  var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
2820
2820
  var timeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
@@ -7890,6 +7890,7 @@ function SearchSelect(props) {
7890
7890
  }
7891
7891
  }
7892
7892
 
7893
+ if (!isMultiple && opts.length > 0) setSelectedLabel(opts[0].label || '');
7893
7894
  setSelectedValue(opts);
7894
7895
  }
7895
7896
 
@@ -7915,6 +7916,7 @@ function SearchSelect(props) {
7915
7916
  }
7916
7917
 
7917
7918
  function handleChange(resultValue, values) {
7919
+ setSelectedLabel('');
7918
7920
  onSelect && onSelect(resultValue);
7919
7921
  handleSelectChange(resultValue, values); // 支持form组件
7920
7922
 
@@ -7926,7 +7928,6 @@ function SearchSelect(props) {
7926
7928
  var selectIconType;
7927
7929
 
7928
7930
  if (type === 'enter' && allowClear && selectedValue) {
7929
- console.log(123);
7930
7931
  selectIconType = 'close';
7931
7932
  } else {
7932
7933
  selectIconType = '';
@@ -7938,7 +7939,7 @@ function SearchSelect(props) {
7938
7939
 
7939
7940
  function handleInputChange(e) {
7940
7941
  var value = e.target.value;
7941
- setInnerIsOpen(!!value);
7942
+ setInnerIsOpen(true);
7942
7943
  setSelectedLabel(value);
7943
7944
  setSelectIconType(showSearch && value ? 'loading' : '');
7944
7945
  showSearch && onSearch && onSearch(value); // handleSelectChange(value);
@@ -7964,18 +7965,25 @@ function SearchSelect(props) {
7964
7965
  }
7965
7966
  }
7966
7967
 
7968
+ function onVisibleChange(open) {
7969
+ if (!open) setSelectedLabel('');
7970
+
7971
+ if (!isMultiple && selectedValue.length > 0) {
7972
+ setSelectedLabel(selectedValue[0].label);
7973
+ }
7974
+
7975
+ setInnerIsOpen(open);
7976
+ }
7977
+
7967
7978
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
7968
7979
  className: cls,
7969
- trigger: "focus",
7980
+ trigger: "click",
7970
7981
  style: {
7971
7982
  marginTop: 5
7972
7983
  },
7973
7984
  disabled: option && option.length > 0 ? false : true
7974
7985
  }, others, {
7975
- onVisibleChange: open => {
7976
- if (!open && isMultiple) setSelectedLabel('');
7977
- setInnerIsOpen(open);
7978
- },
7986
+ onVisibleChange: onVisibleChange,
7979
7987
  isOpen: innerIsOpen,
7980
7988
  menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
7981
7989
  bordered: true,
@@ -9072,75 +9080,80 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
9072
9080
  ellipsis
9073
9081
  } = getLevelItems(columns);
9074
9082
  var keys = getAllColumnsKeys(columns);
9075
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
9076
- className: cls
9077
- }, other, {
9078
- children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
9079
- style: ellipsis ? {
9080
- tableLayout: 'fixed'
9081
- } : {},
9082
- children: [title && /*#__PURE__*/(0,jsx_runtime.jsx)("caption", {
9083
- children: title
9084
- }), columns && columns.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Thead, {
9085
- onCellHead: onCellHead,
9086
- data: header
9087
- }), data && data.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
9088
- children: data.map((trData, rowNum) => /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
9089
- children: keys.map((keyName, colNum) => {
9090
- var objs = {
9091
- children: trData[keyName]
9092
- };
9093
-
9094
- if (render[keyName]) {
9095
- var child = render[keyName](trData[keyName], keyName, trData, rowNum, colNum);
9096
-
9097
- if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) {
9098
- objs.children = child;
9099
- } else {
9100
- if (child.props) {
9101
- objs = _extends({}, child.props, {
9102
- children: objs.children
9103
- });
9104
- if (child.props.rowSpan === 0 || child.props.colSpan === 0) return null;
9105
- }
9106
-
9107
- if (child.children) {
9108
- objs.children = child.children;
9083
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
9084
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
9085
+ style: {
9086
+ overflowY: 'scroll'
9087
+ },
9088
+ className: cls
9089
+ }, other, {
9090
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
9091
+ style: ellipsis ? {
9092
+ tableLayout: 'fixed'
9093
+ } : {},
9094
+ children: [title && /*#__PURE__*/(0,jsx_runtime.jsx)("caption", {
9095
+ children: title
9096
+ }), columns && columns.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Thead, {
9097
+ onCellHead: onCellHead,
9098
+ data: header
9099
+ }), data && data.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
9100
+ children: data.map((trData, rowNum) => /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
9101
+ children: keys.map((keyName, colNum) => {
9102
+ var objs = {
9103
+ children: trData[keyName]
9104
+ };
9105
+
9106
+ if (render[keyName]) {
9107
+ var child = render[keyName](trData[keyName], keyName, trData, rowNum, colNum);
9108
+
9109
+ if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) {
9110
+ objs.children = child;
9111
+ } else {
9112
+ if (child.props) {
9113
+ objs = _extends({}, child.props, {
9114
+ children: objs.children
9115
+ });
9116
+ if (child.props.rowSpan === 0 || child.props.colSpan === 0) return null;
9117
+ }
9118
+
9119
+ if (child.children) {
9120
+ objs.children = child.children;
9121
+ }
9109
9122
  }
9110
9123
  }
9111
- }
9112
9124
 
9113
- if (ellipsis && ellipsis[keyName]) {
9114
- objs.className = prefixCls + "-ellipsis";
9115
- }
9125
+ if (ellipsis && ellipsis[keyName]) {
9126
+ objs.className = prefixCls + "-ellipsis";
9127
+ }
9116
9128
 
9117
- return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
9118
- key: colNum,
9119
- onClick: evn => onCell(trData, {
9120
- rowNum,
9121
- colNum,
9122
- keyName
9123
- }, evn)
9124
- }));
9125
- })
9126
- }, rowNum))
9127
- }), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
9128
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
9129
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
9130
- colSpan: columns.length,
9131
- style: {
9132
- position: 'relative',
9133
- left: 0
9134
- },
9135
- children: empty
9129
+ return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
9130
+ key: colNum,
9131
+ onClick: evn => onCell(trData, {
9132
+ rowNum,
9133
+ colNum,
9134
+ keyName
9135
+ }, evn)
9136
+ }));
9137
+ })
9138
+ }, rowNum))
9139
+ }), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
9140
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
9141
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
9142
+ colSpan: columns.length,
9143
+ style: {
9144
+ position: 'relative',
9145
+ left: 0
9146
+ },
9147
+ children: empty
9148
+ })
9136
9149
  })
9137
- })
9138
- }), props.children]
9139
- }), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9150
+ }), props.children]
9151
+ })
9152
+ })), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9140
9153
  className: prefixCls + "-footer",
9141
9154
  children: footer
9142
9155
  })]
9143
- }));
9156
+ });
9144
9157
  });
9145
9158
 
9146
9159
  ;// CONCATENATED MODULE: ../react-tabs/esm/Pane.js
@@ -9178,8 +9191,11 @@ var react_tabs_esm_excluded = ["prefixCls", "className", "children", "type", "ac
9178
9191
 
9179
9192
 
9180
9193
 
9194
+
9181
9195
  Tabs.Pane = Pane;
9182
9196
  function Tabs(props) {
9197
+ var _flowNav$nav;
9198
+
9183
9199
  var {
9184
9200
  prefixCls = 'w-tabs',
9185
9201
  className,
@@ -9196,6 +9212,71 @@ function Tabs(props) {
9196
9212
  });
9197
9213
  var activeItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
9198
9214
  var cls = [prefixCls, className, type ? prefixCls + "-" + type : null].filter(Boolean).join(' ').trim();
9215
+ var [flowNav, flowNavSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
9216
+ content: 0,
9217
+ nav: [],
9218
+ flowLeft: -1,
9219
+ displayStart: 0,
9220
+ displayEnd: 0
9221
+ });
9222
+ var [hiddenNav, hiddenNavSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
9223
+ var deviation = 15;
9224
+ var [nodes, nodesSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
9225
+ var divContentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(node => {
9226
+ if (node !== null) {
9227
+ nodesSet(nodes);
9228
+ node.addEventListener('scroll', e => {
9229
+ var {
9230
+ clientWidth,
9231
+ scrollLeft
9232
+ } = e.target;
9233
+ flowNav.displayStart = scrollLeft;
9234
+ flowNav.displayEnd = clientWidth + scrollLeft;
9235
+ flowNavSet(_extends({}, flowNav));
9236
+ });
9237
+ flowNav.displayEnd = node.getBoundingClientRect().width;
9238
+ flowNavSet(_extends({}, flowNav));
9239
+ }
9240
+ }, []);
9241
+ var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key) => {
9242
+ if (node !== null) {
9243
+ node.addEventListener('click', e => {
9244
+ activeItem.current = node;
9245
+ });
9246
+ divNavWidthChange(node.getBoundingClientRect().width, key);
9247
+ }
9248
+ }, []);
9249
+
9250
+ var divNavWidthChange = (width, index) => {
9251
+ var curWidth = 0;
9252
+ flowNav.nav.slice(0, index + 1).forEach(nav => curWidth += nav.width);
9253
+ flowNav.nav[index] = {
9254
+ width,
9255
+ curWidth: Math.floor(curWidth),
9256
+ index
9257
+ };
9258
+ flowNavSet(flowNav);
9259
+ };
9260
+
9261
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9262
+ showHideenNav();
9263
+ }, [flowNav.displayEnd > ((_flowNav$nav = flowNav.nav[flowNav.nav.length - 1]) == null ? void 0 : _flowNav$nav.curWidth)]);
9264
+
9265
+ var showHideenNav = () => {
9266
+ var hiddenNav = [];
9267
+
9268
+ if (flowNav.nav.length > 0) {
9269
+ flowNav.nav.forEach(item => {
9270
+ var curWidth = item.curWidth - deviation;
9271
+
9272
+ if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
9273
+ hiddenNav.push(item.index);
9274
+ }
9275
+ });
9276
+ hiddenNavSet(hiddenNav);
9277
+ }
9278
+ };
9279
+
9199
9280
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => setActiveKey(props.activeKey), [props.activeKey]);
9200
9281
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => calcSlideStyle(), [activeKey]);
9201
9282
 
@@ -9212,38 +9293,42 @@ function Tabs(props) {
9212
9293
  className: cls
9213
9294
  }, elementProps, {
9214
9295
  children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
9215
- className: prefixCls + "-bar",
9296
+ style: {
9297
+ display: 'flex'
9298
+ },
9216
9299
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9217
- className: prefixCls + "-nav",
9218
- children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (item, key) => {
9219
- if (!item) {
9220
- return null;
9221
- }
9222
-
9223
- var divProps = {
9224
- className: [prefixCls + "-item", item.key === activeKey ? 'active' : null, item.props.disabled ? 'disabled' : null].filter(Boolean).join(' ').trim(),
9225
- children: item.props.label
9226
- };
9227
-
9228
- if (!item.props.disabled) {
9229
- divProps.onClick = e => {
9230
- setActiveKey(item.key);
9231
- onTabClick && onTabClick(item.key, item, e);
9232
- calcSlideStyle();
9233
- };
9234
- }
9235
-
9236
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
9237
- ref: node => {
9238
- if (node && item.key === activeKey) {
9239
- activeItem.current = node;
9240
- }
9241
- }
9242
- }, divProps), key);
9300
+ style: {
9301
+ overflow: 'hidden'
9302
+ },
9303
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9304
+ className: prefixCls + "-bar",
9305
+ ref: divContentRef,
9306
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9307
+ className: prefixCls + "-nav",
9308
+ style: {
9309
+ width: 'max-content'
9310
+ },
9311
+ children: renderNav(children)
9312
+ })
9243
9313
  })
9244
9314
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9245
9315
  style: slideStyle,
9246
9316
  className: prefixCls + "-slide"
9317
+ }), hiddenNav.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, {
9318
+ trigger: "click",
9319
+ placement: "bottomRight",
9320
+ visibleArrow: false,
9321
+ content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9322
+ className: prefixCls + "-nav-hidden",
9323
+ children: renderNav(hiddenNav.map(idx => children[idx]))
9324
+ }),
9325
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9326
+ onClick: showHideenNav,
9327
+ className: prefixCls + "-flow-content",
9328
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
9329
+ children: "\u2026"
9330
+ })
9331
+ })
9247
9332
  })]
9248
9333
  }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, item => {
9249
9334
  if (!item || activeKey !== item.key) {
@@ -9253,6 +9338,31 @@ function Tabs(props) {
9253
9338
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(item, Object.assign({}, item.props, {}));
9254
9339
  })]
9255
9340
  }));
9341
+
9342
+ function renderNav(children) {
9343
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (item, key) => {
9344
+ if (!item) {
9345
+ return null;
9346
+ }
9347
+
9348
+ var divProps = {
9349
+ className: [prefixCls + "-item", item.key === activeKey ? 'active' : null, item.props.disabled ? 'disabled' : null].filter(Boolean).join(' ').trim(),
9350
+ children: item.props.label
9351
+ };
9352
+
9353
+ if (!item.props.disabled) {
9354
+ divProps.onClick = e => {
9355
+ setActiveKey(item.key);
9356
+ onTabClick && onTabClick(item.key, item, e);
9357
+ calcSlideStyle();
9358
+ };
9359
+ }
9360
+
9361
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
9362
+ ref: _ref => divNavRef(_ref, key)
9363
+ }, divProps), key);
9364
+ });
9365
+ }
9256
9366
  }
9257
9367
 
9258
9368
  ;// CONCATENATED MODULE: ../react-textarea/esm/style/index.css
@@ -9374,7 +9484,7 @@ function TreeNode(props) {
9374
9484
 
9375
9485
  var isOpen = false;
9376
9486
 
9377
- if (parent && parent.key) {
9487
+ if (parent && (parent.key || parent.key === 0)) {
9378
9488
  isOpen = !!(openKeys && openKeys.indexOf(parent.key) > -1);
9379
9489
  }
9380
9490
 
@@ -9471,7 +9581,7 @@ function TreeNode(props) {
9471
9581
  ;// CONCATENATED MODULE: ../react-tree/esm/index.js
9472
9582
 
9473
9583
 
9474
- var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange"];
9584
+ var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange", "value"];
9475
9585
 
9476
9586
 
9477
9587
 
@@ -9587,20 +9697,16 @@ function Tree(props) {
9587
9697
  className,
9588
9698
  autoExpandParent = true,
9589
9699
  renderTitle,
9590
- onChange
9700
+ onChange,
9701
+ value
9591
9702
  } = props,
9592
9703
  elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);
9593
9704
 
9594
9705
  var [curOpenKeys, setCurOpenKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(openKeys);
9595
- var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.value || selectedKeys);
9706
+ var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || selectedKeys);
9596
9707
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9597
- setCurSelectedKeys(props.selectedKeys || []);
9598
- }, [JSON.stringify(props.selectedKeys)]);
9599
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9600
- setCurSelectedKeys(props.value || []);
9601
- }, [JSON.stringify(props.value)]); // useEffect(() => setCurOpenKeys(openKeys), [openKeys]);
9602
- // useEffect(() => setCurSelectedKeys(selectedKeys), [selectedKeys]);
9603
-
9708
+ setCurSelectedKeys(props.value || props.selectedKeys || []);
9709
+ }, [JSON.stringify(props.selectedKeys), JSON.stringify(props.value)]);
9604
9710
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9605
9711
  var arrOpenKeys = [...curOpenKeys];
9606
9712
 
@@ -9645,7 +9751,7 @@ function Tree(props) {
9645
9751
  var findKey = selKeys.find(v => v === item.key);
9646
9752
  var selected = false;
9647
9753
 
9648
- if (!findKey) {
9754
+ if (!findKey && findKey !== 0) {
9649
9755
  selected = true;
9650
9756
  selKeys.push(item.key);
9651
9757
  } else {
@@ -9669,7 +9775,7 @@ function Tree(props) {
9669
9775
 
9670
9776
  setCurSelectedKeys(selKeys);
9671
9777
  onSelected && onSelected(selKeys, item.key, selected, item, evn);
9672
- onChange == null ? void 0 : onChange(selKeys);
9778
+ onChange == null ? void 0 : onChange(item.key, selKeys);
9673
9779
  }
9674
9780
 
9675
9781
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
@@ -9745,7 +9851,7 @@ function TreeChecked(_ref) {
9745
9851
  ;// CONCATENATED MODULE: ../react-search-tree/esm/SearchTagInput.js
9746
9852
 
9747
9853
 
9748
- var SearchTagInput_excluded = ["prefixCls", "mode", "size", "disabled", "allowClear", "loading", "className", "style", "placeholder", "content", "options", "values", "onChange", "onSearch", "emptyOption"];
9854
+ var SearchTagInput_excluded = ["prefixCls", "mode", "size", "disabled", "allowClear", "loading", "selectCloseDrop", "className", "style", "placeholder", "content", "options", "values", "onChange", "onSearch", "emptyOption"];
9749
9855
 
9750
9856
 
9751
9857
 
@@ -9765,6 +9871,7 @@ function SearchTagInput(props) {
9765
9871
  disabled = false,
9766
9872
  allowClear = false,
9767
9873
  loading = false,
9874
+ selectCloseDrop = false,
9768
9875
  className,
9769
9876
  style,
9770
9877
  placeholder,
@@ -9801,7 +9908,8 @@ function SearchTagInput(props) {
9801
9908
  }
9802
9909
 
9803
9910
  setSelectedOption(selectedAll);
9804
- onChange && onChange(selectedAll, selectd, isChecked);
9911
+ searchValueChange('');
9912
+ onChange == null ? void 0 : onChange(selectedAll, selectd, isChecked);
9805
9913
  };
9806
9914
 
9807
9915
  var removeSelectItem = index => {
@@ -9812,10 +9920,15 @@ function SearchTagInput(props) {
9812
9920
  };
9813
9921
 
9814
9922
  function handleInputChange(value) {
9923
+ setInnerIsOpen(true);
9924
+ searchValueChange(value);
9925
+ setSelectIconType(value ? 'loading' : '');
9926
+ }
9927
+
9928
+ var searchValueChange = value => {
9815
9929
  searchValueSet(value);
9816
9930
  onSearch == null ? void 0 : onSearch(value);
9817
- setSelectIconType(value ? 'loading' : '');
9818
- } // 清除选中的值
9931
+ }; // 清除选中的值
9819
9932
 
9820
9933
 
9821
9934
  function resetSelectedValue(e) {
@@ -9843,17 +9956,27 @@ function SearchTagInput(props) {
9843
9956
  }
9844
9957
 
9845
9958
  var newProps = _extends({}, content.props, {
9846
- onSelected: handleSelectChange,
9959
+ onSelected: function onSelected(selectedAll, selectd, isChecked) {
9960
+ if (isChecked === void 0) {
9961
+ isChecked = true;
9962
+ }
9963
+
9964
+ setInnerIsOpen(!selectCloseDrop);
9965
+ handleSelectChange(selectedAll, selectd, isChecked);
9966
+ },
9847
9967
  values: selectedOption,
9848
9968
  options
9849
9969
  });
9850
9970
 
9851
9971
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(content, newProps);
9852
9972
  }, [JSON.parse(JSON.stringify(selectedOption)), options, emptyOption]);
9853
- return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
9973
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, {
9854
9974
  className: cls,
9855
- trigger: "focus"
9856
- }, others, {
9975
+ trigger: "click",
9976
+ onVisibleChange: isOpen => {
9977
+ setInnerIsOpen(isOpen);
9978
+ if (!isOpen) searchValueChange('');
9979
+ },
9857
9980
  isOpen: innerIsOpen,
9858
9981
  menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_card_esm, {
9859
9982
  bodyStyle: emptyOption === true ? {
@@ -9926,7 +10049,7 @@ function SearchTagInput(props) {
9926
10049
  })]
9927
10050
  })
9928
10051
  })
9929
- }));
10052
+ });
9930
10053
  }
9931
10054
 
9932
10055
  /* harmony default export */ const esm_SearchTagInput = (SearchTagInput);
@@ -9957,12 +10080,14 @@ function TreeCheckeds(props) {
9957
10080
  keysSet(keys || []);
9958
10081
  }, [props.values]);
9959
10082
 
9960
- var onSelected = (_1, _2, isChecked, evn) => {
10083
+ var onSelected = (_, item, isChecked, evn) => {
9961
10084
  var curSelectOption = getOptionsRecursion([evn], selectOption, isChecked);
10085
+ var isNumberKey = false;
10086
+ if (typeof item === 'number') isNumberKey = true;
9962
10087
  var option = Object.entries(curSelectOption).map(_ref => {
9963
10088
  var [key, label] = _ref;
9964
10089
  return {
9965
- key,
10090
+ key: isNumberKey ? Number.parseInt(key) : key,
9966
10091
  label
9967
10092
  };
9968
10093
  });
@@ -10031,7 +10156,7 @@ function SingeTree(props) {
10031
10156
  key,
10032
10157
  label
10033
10158
  };
10034
- props.onSelected == null ? void 0 : props.onSelected([cur], cur, isChecked);
10159
+ props.onSelected == null ? void 0 : props.onSelected(isChecked ? [cur] : [], cur, isChecked);
10035
10160
  };
10036
10161
 
10037
10162
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Tree, _extends({
@@ -10110,7 +10235,8 @@ function SearchTree(props) {
10110
10235
 
10111
10236
  return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SearchTagInput, _extends({}, other, {
10112
10237
  emptyOption: isEmpty,
10113
- onSearch: debounce(selectedSearch, 600),
10238
+ selectCloseDrop: !multiple,
10239
+ onSearch: selectedSearch,
10114
10240
  onChange: selectedChange,
10115
10241
  values: selectedValues,
10116
10242
  options: selectedOptions,