shineout 3.3.3-beta.8 → 3.4.0-beta.1

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/cjs/index.js CHANGED
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.3.3-beta.8'
479
+ version: '3.4.0-beta.1'
480
480
  };
package/dist/shineout.js CHANGED
@@ -11968,7 +11968,7 @@ var handleStyle = function handleStyle(style) {
11968
11968
  };
11969
11969
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11970
11970
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11971
- /* harmony default export */ var version = ('3.3.3-beta.8');
11971
+ /* harmony default export */ var version = ('3.4.0-beta.1');
11972
11972
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11973
11973
 
11974
11974
 
@@ -19673,15 +19673,13 @@ var collapseWidth = src.menuCollapseWidth;
19673
19673
  var transitionFunc = 'ease-out';
19674
19674
  var menuStyle = {
19675
19675
  wrapper: {
19676
+ height: '100%',
19676
19677
  width: '100%',
19677
19678
  backgroundColor: src.menuItemBackgroundColor,
19678
19679
  transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
19679
19680
  color: src.menuFontColor,
19680
19681
  display: 'flex',
19681
- flexDirection: 'column',
19682
- '&:not([data-soui-mode=horizontal])': {
19683
- height: '100%'
19684
- }
19682
+ flexDirection: 'column'
19685
19683
  },
19686
19684
  wrapperLight: {},
19687
19685
  wrapperDark: {
@@ -21864,6 +21862,16 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
21864
21862
  color: src.selectDisabledPlaceholderColor
21865
21863
  }
21866
21864
  }),
21865
+ triggerHover: {
21866
+ '&::after': {
21867
+ content: '""',
21868
+ position: 'absolute',
21869
+ right: 0,
21870
+ left: 0,
21871
+ height: 4,
21872
+ bottom: -4
21873
+ }
21874
+ },
21867
21875
  popover: {}
21868
21876
  }, select_resetWrapper), {}, {
21869
21877
  resultWrapper: {
@@ -36002,14 +36010,6 @@ var result_Input = function Input(props) {
36002
36010
  _useState2 = slicedToArray_default()(_useState, 2),
36003
36011
  value = _useState2[0],
36004
36012
  setValue = _useState2[1];
36005
- var updateValue = function updateValue() {
36006
- setValue(props.value);
36007
- };
36008
- if (props.inputRef) {
36009
- props.inputRef.current = {
36010
- updateValue: updateValue
36011
- };
36012
- }
36013
36013
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
36014
36014
  setValue(props.value);
36015
36015
  }, [props.value, props.open]);
@@ -36048,7 +36048,6 @@ var Result = function Result(props) {
36048
36048
  range = props.range,
36049
36049
  placeholder = props.placeholder,
36050
36050
  _onChange = props.onChange,
36051
- _onRef = props.onRef,
36052
36051
  disabledLeft = props.disabledLeft,
36053
36052
  disabledRight = props.disabledRight,
36054
36053
  _props$activeIndex = props.activeIndex,
@@ -36062,7 +36061,6 @@ var Result = function Result(props) {
36062
36061
  clickIndex: 0
36063
36062
  }),
36064
36063
  context = _useRef.current;
36065
- var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
36066
36064
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
36067
36065
  if (open) {
36068
36066
  if (context.inputRefs[activeIndex]) {
@@ -36115,12 +36113,10 @@ var Result = function Result(props) {
36115
36113
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
36116
36114
  children: info.inputable ? /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
36117
36115
  onRef: function onRef(el) {
36118
- _onRef.current.inputRef = el;
36119
36116
  context.inputRefs[info.index] = el;
36120
36117
  },
36121
36118
  disabled: dis,
36122
36119
  open: !!open,
36123
- inputRef: inputRef,
36124
36120
  value: info.target || info.value || '',
36125
36121
  placeholder: info.place,
36126
36122
  onChange: function onChange(s) {
@@ -36130,11 +36126,10 @@ var Result = function Result(props) {
36130
36126
  context.clickIndex = info.index;
36131
36127
  },
36132
36128
  onBlur: function onBlur(e) {
36133
- var _props$onBlur, _inputRef$current$upd, _inputRef$current;
36129
+ var _props$onBlur;
36134
36130
  e.stopPropagation();
36135
36131
  if (e.relatedTarget === context.inputRefs[1 - info.index]) return;
36136
36132
  (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
36137
- if (inputRef.current) (_inputRef$current$upd = (_inputRef$current = inputRef.current).updateValue) === null || _inputRef$current$upd === void 0 || _inputRef$current$upd.call(_inputRef$current);
36138
36133
  context.clickIndex = 0;
36139
36134
  },
36140
36135
  onFocus: function onFocus(e) {
@@ -36742,7 +36737,7 @@ var result_Result = function Result(props) {
36742
36737
  onRemove = props.onRemove,
36743
36738
  onResultItemClick = props.onResultItemClick,
36744
36739
  data = props.data;
36745
- var value = [null, undefined].includes(valueProp) ? [] : Array.isArray(valueProp) ? valueProp : [valueProp];
36740
+ var value = result_isArray(valueProp) ? valueProp : [valueProp];
36746
36741
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(-1),
36747
36742
  _useState2 = slicedToArray_default()(_useState, 2),
36748
36743
  more = _useState2[0],
@@ -36899,9 +36894,7 @@ var result_Result = function Result(props) {
36899
36894
  }, 'single');
36900
36895
  };
36901
36896
  var getValueArr = function getValueArr(v) {
36902
- return (result_isArray(v) ? v : [v]).filter(function (v) {
36903
- return v !== undefined && v !== null;
36904
- });
36897
+ return result_isArray(v) ? v : [v];
36905
36898
  };
36906
36899
  var renderMultipleResult = function renderMultipleResult() {
36907
36900
  if (isEmptyResult()) return renderNbsp();
@@ -42456,9 +42449,6 @@ var DatePicker = function DatePicker(props0) {
42456
42449
  _React$useState2 = slicedToArray_default()(_React$useState, 2),
42457
42450
  activeIndex = _React$useState2[0],
42458
42451
  setActiveIndex = _React$useState2[1];
42459
- var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
42460
- inputRef: null
42461
- });
42462
42452
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
42463
42453
  var isRTL = direction === 'rtl';
42464
42454
  var dfp = isRTL ? 'bottom-right' : 'bottom-left';
@@ -42557,11 +42547,6 @@ var DatePicker = function DatePicker(props0) {
42557
42547
  setFocused(false);
42558
42548
  (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
42559
42549
  });
42560
- var handleClose = function handleClose() {
42561
- var _inputRef$current$inp;
42562
- closePop();
42563
- (_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
42564
- };
42565
42550
  var handleResultClick = usePersistFn(function () {
42566
42551
  if (disabledStatus === 'all') return;
42567
42552
  openPop();
@@ -42574,7 +42559,6 @@ var DatePicker = function DatePicker(props0) {
42574
42559
  activeIndex: activeIndex,
42575
42560
  type: type,
42576
42561
  range: range,
42577
- onRef: inputRef,
42578
42562
  inputable: props.inputable && !props.formatResult,
42579
42563
  disabledLeft: disabledStatus === 'left',
42580
42564
  disabledRight: disabledStatus === 'right',
@@ -42603,7 +42587,7 @@ var DatePicker = function DatePicker(props0) {
42603
42587
  onKeyDown: function onKeyDown(e) {
42604
42588
  if (e.key === 'Enter') {
42605
42589
  if (open) {
42606
- handleClose();
42590
+ closePop();
42607
42591
  } else {
42608
42592
  openPop();
42609
42593
  }
@@ -42660,7 +42644,7 @@ var DatePicker = function DatePicker(props0) {
42660
42644
  options: options,
42661
42645
  disabled: disabled,
42662
42646
  jssStyle: jssStyle,
42663
- closePop: handleClose,
42647
+ closePop: closePop,
42664
42648
  defaultTime: props.defaultTime,
42665
42649
  min: props.min,
42666
42650
  max: props.max,
@@ -43711,7 +43695,7 @@ DrawerComp.Submit = src_modal_0.Submit;
43711
43695
 
43712
43696
 
43713
43697
  var Item_excluded = ["className"],
43714
- Item_excluded2 = ["className", "onClick"];
43698
+ Item_excluded2 = ["className"];
43715
43699
 
43716
43700
 
43717
43701
 
@@ -43773,15 +43757,10 @@ var Item_Item = /*#__PURE__*/function (_React$PureComponent) {
43773
43757
  var _ref2 = content.props,
43774
43758
  _ref2$className = _ref2.className,
43775
43759
  contentPropsClassName = _ref2$className === void 0 ? '' : _ref2$className,
43776
- contentPropsOnClick = _ref2.onClick,
43777
43760
  otherContentProps = objectWithoutProperties_default()(_ref2, Item_excluded2);
43778
43761
  var className = classnames_default()(propsClassName, contentPropsClassName);
43779
43762
  return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(content, Object.assign(otherProps, otherContentProps, {
43780
- className: className,
43781
- onClick: function onClick(e) {
43782
- if (contentPropsOnClick) contentPropsOnClick(e);
43783
- if (props.onClick) props.onClick(e);
43784
- }
43763
+ className: className
43785
43764
  }));
43786
43765
  }
43787
43766
  return /*#__PURE__*/(0,jsx_runtime.jsx)("a", objectSpread2_default()(objectSpread2_default()({}, props), {}, {
@@ -47948,10 +47927,26 @@ var Scroll = function Scroll(props) {
47948
47927
  marginTop: props.isScrollY ? 0 : -1,
47949
47928
  lineHeight: 0
47950
47929
  };
47930
+ var extractHeightValue = function extractHeightValue(num) {
47931
+ if (isNumber(num)) return num;
47932
+ var match = num.match(/(\d+)/);
47933
+ if (match) {
47934
+ return parseInt(match[0], 10);
47935
+ }
47936
+ return undefined;
47937
+ };
47951
47938
  var handleScroll = usePersistFn(function (e) {
47939
+ var onScrollToBottom = props.onScrollToBottom;
47952
47940
  var target = e.currentTarget;
47953
47941
  var scrollLeft = target.scrollLeft,
47954
47942
  scrollTop = target.scrollTop;
47943
+ if (props.height && onScrollToBottom) {
47944
+ var realHeight = extractHeightValue(props.height);
47945
+ if (realHeight !== undefined) {
47946
+ var touchBottom = target.scrollHeight === scrollTop + realHeight;
47947
+ if (touchBottom) onScrollToBottom();
47948
+ }
47949
+ }
47955
47950
  var maxY = target.scrollHeight - target.clientHeight;
47956
47951
  var maxX = target.scrollWidth - target.clientWidth;
47957
47952
  if (!isRtl) {
@@ -48083,6 +48078,7 @@ var VirtualList = function VirtualList(props) {
48083
48078
  return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_scroll, {
48084
48079
  className: className,
48085
48080
  style: nextStyle,
48081
+ height: height,
48086
48082
  scrollWidth: 0,
48087
48083
  scrollHeight: scrollHeight,
48088
48084
  wrapperRef: wrapperRef,
@@ -48406,6 +48402,8 @@ var ListOption = function ListOption(props) {
48406
48402
 
48407
48403
 
48408
48404
 
48405
+
48406
+
48409
48407
  var list_List = function List(props) {
48410
48408
  var _jssStyle$select;
48411
48409
  var jssStyle = props.jssStyle,
@@ -48420,6 +48418,7 @@ var list_List = function List(props) {
48420
48418
  itemsInView = _props$itemsInView === void 0 ? 10 : _props$itemsInView,
48421
48419
  lineHeightProp = props.lineHeight,
48422
48420
  loading = props.loading,
48421
+ threshold = props.threshold,
48423
48422
  controlType = props.controlType,
48424
48423
  hideCreateOption = props.hideCreateOption,
48425
48424
  optionListRef = props.optionListRef,
@@ -48521,6 +48520,41 @@ var list_List = function List(props) {
48521
48520
  }
48522
48521
  }
48523
48522
  });
48523
+ var handleVirtualScroll = usePersistFn( /*#__PURE__*/function () {
48524
+ var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(info) {
48525
+ var onLoadMore;
48526
+ return regeneratorRuntime_default()().wrap(function _callee$(_context) {
48527
+ while (1) switch (_context.prev = _context.next) {
48528
+ case 0:
48529
+ onLoadMore = props.onLoadMore;
48530
+ if (!(typeof onLoadMore !== 'function')) {
48531
+ _context.next = 3;
48532
+ break;
48533
+ }
48534
+ return _context.abrupt("return");
48535
+ case 3:
48536
+ if (onLoadMore) {
48537
+ _context.next = 5;
48538
+ break;
48539
+ }
48540
+ return _context.abrupt("return");
48541
+ case 5:
48542
+ if (!(info.y >= threshold)) {
48543
+ _context.next = 8;
48544
+ break;
48545
+ }
48546
+ _context.next = 8;
48547
+ return onLoadMore();
48548
+ case 8:
48549
+ case "end":
48550
+ return _context.stop();
48551
+ }
48552
+ }, _callee);
48553
+ }));
48554
+ return function (_x) {
48555
+ return _ref.apply(this, arguments);
48556
+ };
48557
+ }());
48524
48558
  var renderLoading = function renderLoading() {
48525
48559
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
48526
48560
  children: "loading"
@@ -48566,6 +48600,7 @@ var list_List = function List(props) {
48566
48600
  groupKey: groupKey,
48567
48601
  tagClassName: styles.virtualList,
48568
48602
  height: height,
48603
+ onScroll: handleVirtualScroll,
48569
48604
  lineHeight: lineHeight,
48570
48605
  rowsInView: itemsInView,
48571
48606
  renderItem: renderItem,
@@ -50023,6 +50058,9 @@ function Select(props0) {
50023
50058
  defaultExpanded = props.defaultExpanded,
50024
50059
  defaultExpandAll = props.defaultExpandAll,
50025
50060
  showHitDescendants = props.showHitDescendants,
50061
+ onLoadMore = props.onLoadMore,
50062
+ _props$threshold = props.threshold,
50063
+ threshold = _props$threshold === void 0 ? 1 : _props$threshold,
50026
50064
  renderOptionList = props.renderOptionList,
50027
50065
  onExpand = props.onExpand,
50028
50066
  onChange = props.onChange,
@@ -50033,7 +50071,9 @@ function Select(props0) {
50033
50071
  onCollapseProp = props.onCollapse,
50034
50072
  onEnterExpand = props.onEnterExpand,
50035
50073
  filterSameChange = props.filterSameChange,
50036
- noCache = props.noCache;
50074
+ noCache = props.noCache,
50075
+ _props$trigger = props.trigger,
50076
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger;
50037
50077
  var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
50038
50078
  var showInput = hasFilter || isFunc(onCreateProp) || onCreateProp === true;
50039
50079
  var positionProp = props.position || (direction === 'rtl' ? 'bottom-right' : 'bottom-left');
@@ -50101,7 +50141,7 @@ function Select(props0) {
50101
50141
  open: openProp,
50102
50142
  onCollapse: onCollapse,
50103
50143
  disabled: false,
50104
- trigger: 'click',
50144
+ trigger: trigger,
50105
50145
  position: positionProp
50106
50146
  }),
50107
50147
  open = _usePopup.open,
@@ -50110,6 +50150,7 @@ function Select(props0) {
50110
50150
  popupRef = _usePopup.popupRef,
50111
50151
  openPop = _usePopup.openPop,
50112
50152
  closePop = _usePopup.closePop,
50153
+ getTargetProps = _usePopup.getTargetProps,
50113
50154
  PopupProvider = _usePopup.Provider,
50114
50155
  popupProviderValue = _usePopup.providerValue;
50115
50156
  var handleSelectChange = usePersistFn(function (value, dataItem, checked) {
@@ -50196,7 +50237,7 @@ function Select(props0) {
50196
50237
  rootRef: targetRef,
50197
50238
  jssStyle: props.jssStyle
50198
50239
  });
50199
- var rootClass = classnames_default()(className, isEmpty && styles.wrapperEmpty, styles === null || styles === void 0 ? void 0 : styles.wrapper, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), defineProperty_default()({}, styles === null || styles === void 0 ? void 0 : styles.multiple, multiple));
50240
+ var rootClass = classnames_default()(className, isEmpty && styles.wrapperEmpty, styles === null || styles === void 0 ? void 0 : styles.wrapper, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), open && trigger === 'hover' && (styles === null || styles === void 0 ? void 0 : styles.triggerHover), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), defineProperty_default()({}, styles === null || styles === void 0 ? void 0 : styles.multiple, multiple));
50200
50241
  var getRenderItem = function getRenderItem(data, index) {
50201
50242
  return typeof renderItemProp === 'function' ? renderItemProp(data, index) : data[renderItemProp];
50202
50243
  };
@@ -50464,6 +50505,8 @@ function Select(props0) {
50464
50505
  emptyAfterSelect: emptyAfterSelect,
50465
50506
  renderItem: renderItem,
50466
50507
  controlType: controlType,
50508
+ onLoadMore: onLoadMore,
50509
+ threshold: threshold,
50467
50510
  onControlTypeChange: setControlType,
50468
50511
  closePop: closePop,
50469
50512
  optionListRef: optionListRef,
@@ -50552,6 +50595,9 @@ function Select(props0) {
50552
50595
  }
50553
50596
  return style;
50554
50597
  };
50598
+ var targetProps = getTargetProps();
50599
+ var onMouseEnter = targetProps.onMouseEnter,
50600
+ onMouseLeave = targetProps.onMouseLeave;
50555
50601
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
50556
50602
  ref: targetRef,
50557
50603
  tabIndex: disabled === true || showInput ? undefined : 0
@@ -50567,6 +50613,8 @@ function Select(props0) {
50567
50613
  e.preventDefault();
50568
50614
  }
50569
50615
  },
50616
+ onMouseEnter: onMouseEnter,
50617
+ onMouseLeave: onMouseLeave,
50570
50618
  children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
50571
50619
  adjust: adjust,
50572
50620
  focus: open,
@@ -56686,7 +56734,6 @@ var useTableRow = function useTableRow(props) {
56686
56734
 
56687
56735
 
56688
56736
 
56689
-
56690
56737
  var Tr = function Tr(props) {
56691
56738
  var _props$jssStyle, _props$jssStyle$table, _props$rowClassName;
56692
56739
  var treeFunc = props.treeFunc;
@@ -56740,22 +56787,12 @@ var Tr = function Tr(props) {
56740
56787
  columnKey: props.columns[colIndex].key
56741
56788
  });
56742
56789
  });
56743
- var setVirtualRowHeight = usePersistFn(function () {
56790
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
56744
56791
  if (props.setRowHeight && trRef.current) {
56745
56792
  var expandHeight = expandRef.current ? expandRef.current.getBoundingClientRect().height : 0;
56746
56793
  props.setRowHeight(props.rowIndex, trRef.current.getBoundingClientRect().height + expandHeight);
56747
56794
  }
56748
- });
56749
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(setVirtualRowHeight, [props.expanded, props.rowIndex, props.bodyScrollWidth, props.resizeFlag]);
56750
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
56751
- if (!trRef.current) return;
56752
- var cancelObserver = addResizeObserver(trRef.current, setVirtualRowHeight, {
56753
- direction: 'y'
56754
- });
56755
- return function () {
56756
- cancelObserver();
56757
- };
56758
- }, []);
56795
+ }, [props.expanded, props.rowIndex, props.bodyScrollWidth, props.resizeFlag]);
56759
56796
  var renderTreeExpand = function renderTreeExpand(content) {
56760
56797
  var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
56761
56798
  var level = props.treeExpandLevel.get(props.originKey) || 0;
@@ -57871,11 +57908,10 @@ var useTransform = function useTransform(props) {
57871
57908
 
57872
57909
 
57873
57910
 
57874
-
57875
57911
  var Tab = function Tab(props, ref) {
57876
57912
  var _jssStyle$tabs;
57877
57913
  var jssStyle = props.jssStyle,
57878
- propTab = props.tab,
57914
+ tab = props.tab,
57879
57915
  disabled = props.disabled,
57880
57916
  id = props.id,
57881
57917
  color = props.color;
@@ -57903,9 +57939,6 @@ var Tab = function Tab(props, ref) {
57903
57939
  if (disabled) return;
57904
57940
  onChange === null || onChange === void 0 || onChange(id);
57905
57941
  };
57906
- var tab = isLink(propTab) ?
57907
- // 直接返回a标签的内容,不要a标签
57908
- propTab.props.children : propTab;
57909
57942
  var renderCardTab = function renderCardTab() {
57910
57943
  return tab;
57911
57944
  };
@@ -57937,35 +57970,27 @@ var Tab = function Tab(props, ref) {
57937
57970
  if (shape === 'card') {
57938
57971
  style.color = color;
57939
57972
  }
57940
- var containerProps = objectSpread2_default()(objectSpread2_default()({
57973
+ if (shape === 'button') return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
57974
+ className: tabClass,
57975
+ jssStyle: {
57976
+ button: buttonStyle
57977
+ }
57978
+ }, getStateProps()), {}, {
57979
+ style: style,
57980
+ disabled: disabled,
57981
+ type: isActive ? 'primary' : 'secondary',
57982
+ onClick: handleClick,
57983
+ dir: config.direction,
57984
+ children: tab
57985
+ }));
57986
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
57987
+ dir: config.direction,
57941
57988
  className: tabClass
57942
57989
  }, getStateProps()), {}, {
57943
57990
  style: style,
57944
57991
  onClick: handleClick,
57945
57992
  ref: ref,
57946
- dir: config.direction
57947
- });
57948
- if (shape === 'button') {
57949
- return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
57950
- jssStyle: {
57951
- button: buttonStyle
57952
- },
57953
- disabled: disabled,
57954
- type: isActive ? 'primary' : 'secondary'
57955
- }, containerProps), {}, {
57956
- children: tab
57957
- }));
57958
- }
57959
- var $children = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
57960
57993
  children: [shape === 'card' && renderCardTab(), shape === 'line' && renderLineTab(), shape === 'dash' && renderDashTab(), shape === 'fill' && renderFillTab()]
57961
- });
57962
- if (isLink(propTab)) {
57963
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(propTab, objectSpread2_default()({
57964
- children: $children
57965
- }, containerProps));
57966
- }
57967
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, containerProps), {}, {
57968
- children: $children
57969
57994
  }));
57970
57995
  };
57971
57996
  /* harmony default export */ var tabs_tab = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Tab));
@@ -63708,7 +63733,7 @@ var upload_interface = __webpack_require__(8821);
63708
63733
 
63709
63734
 
63710
63735
  /* harmony default export */ var src_0 = ({
63711
- version: '3.3.3-beta.8'
63736
+ version: '3.4.0-beta.1'
63712
63737
  });
63713
63738
  }();
63714
63739
  /******/ return __webpack_exports__;