shineout 3.3.3-beta.6 → 3.3.3-beta.7

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.6'
479
+ version: '3.3.3-beta.7'
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.6');
11971
+ /* harmony default export */ var version = ('3.3.3-beta.7');
11972
11972
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11973
11973
 
11974
11974
 
@@ -36729,7 +36729,7 @@ var result_Result = function Result(props) {
36729
36729
  onRemove = props.onRemove,
36730
36730
  onResultItemClick = props.onResultItemClick,
36731
36731
  data = props.data;
36732
- var value = result_isArray(valueProp) ? valueProp : [valueProp];
36732
+ var value = [null, undefined].includes(valueProp) ? [] : Array.isArray(valueProp) ? valueProp : [valueProp];
36733
36733
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(-1),
36734
36734
  _useState2 = slicedToArray_default()(_useState, 2),
36735
36735
  more = _useState2[0],
@@ -36886,7 +36886,9 @@ var result_Result = function Result(props) {
36886
36886
  }, 'single');
36887
36887
  };
36888
36888
  var getValueArr = function getValueArr(v) {
36889
- return result_isArray(v) ? v : [v];
36889
+ return (result_isArray(v) ? v : [v]).filter(function (v) {
36890
+ return v !== undefined && v !== null;
36891
+ });
36890
36892
  };
36891
36893
  var renderMultipleResult = function renderMultipleResult() {
36892
36894
  if (isEmptyResult()) return renderNbsp();
@@ -43687,7 +43689,7 @@ DrawerComp.Submit = src_modal_0.Submit;
43687
43689
 
43688
43690
 
43689
43691
  var Item_excluded = ["className"],
43690
- Item_excluded2 = ["className"];
43692
+ Item_excluded2 = ["className", "onClick"];
43691
43693
 
43692
43694
 
43693
43695
 
@@ -43749,10 +43751,15 @@ var Item_Item = /*#__PURE__*/function (_React$PureComponent) {
43749
43751
  var _ref2 = content.props,
43750
43752
  _ref2$className = _ref2.className,
43751
43753
  contentPropsClassName = _ref2$className === void 0 ? '' : _ref2$className,
43754
+ contentPropsOnClick = _ref2.onClick,
43752
43755
  otherContentProps = objectWithoutProperties_default()(_ref2, Item_excluded2);
43753
43756
  var className = classnames_default()(propsClassName, contentPropsClassName);
43754
43757
  return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(content, Object.assign(otherProps, otherContentProps, {
43755
- className: className
43758
+ className: className,
43759
+ onClick: function onClick(e) {
43760
+ if (contentPropsOnClick) contentPropsOnClick(e);
43761
+ if (props.onClick) props.onClick(e);
43762
+ }
43756
43763
  }));
43757
43764
  }
43758
43765
  return /*#__PURE__*/(0,jsx_runtime.jsx)("a", objectSpread2_default()(objectSpread2_default()({}, props), {}, {
@@ -57842,10 +57849,11 @@ var useTransform = function useTransform(props) {
57842
57849
 
57843
57850
 
57844
57851
 
57852
+
57845
57853
  var Tab = function Tab(props, ref) {
57846
57854
  var _jssStyle$tabs;
57847
57855
  var jssStyle = props.jssStyle,
57848
- tab = props.tab,
57856
+ propTab = props.tab,
57849
57857
  disabled = props.disabled,
57850
57858
  id = props.id,
57851
57859
  color = props.color;
@@ -57871,13 +57879,11 @@ var Tab = function Tab(props, ref) {
57871
57879
  };
57872
57880
  var handleClick = function handleClick() {
57873
57881
  if (disabled) return;
57874
- if (isLink(tab)) {
57875
- if (tab.props.onClick && typeof tab.props.onClick === 'function') {
57876
- tab.props.onClick();
57877
- }
57878
- }
57879
57882
  onChange === null || onChange === void 0 || onChange(id);
57880
57883
  };
57884
+ var tab = isLink(propTab) ?
57885
+ // 直接返回a标签的内容,不要a标签
57886
+ propTab.props.children : propTab;
57881
57887
  var renderCardTab = function renderCardTab() {
57882
57888
  return tab;
57883
57889
  };
@@ -57909,27 +57915,35 @@ var Tab = function Tab(props, ref) {
57909
57915
  if (shape === 'card') {
57910
57916
  style.color = color;
57911
57917
  }
57912
- if (shape === 'button') return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
57913
- className: tabClass,
57914
- jssStyle: {
57915
- button: buttonStyle
57916
- }
57917
- }, getStateProps()), {}, {
57918
- style: style,
57919
- disabled: disabled,
57920
- type: isActive ? 'primary' : 'secondary',
57921
- onClick: handleClick,
57922
- dir: config.direction,
57923
- children: tab
57924
- }));
57925
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
57926
- dir: config.direction,
57918
+ var containerProps = objectSpread2_default()(objectSpread2_default()({
57927
57919
  className: tabClass
57928
57920
  }, getStateProps()), {}, {
57929
57921
  style: style,
57930
57922
  onClick: handleClick,
57931
57923
  ref: ref,
57924
+ dir: config.direction
57925
+ });
57926
+ if (shape === 'button') {
57927
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
57928
+ jssStyle: {
57929
+ button: buttonStyle
57930
+ },
57931
+ disabled: disabled,
57932
+ type: isActive ? 'primary' : 'secondary'
57933
+ }, containerProps), {}, {
57934
+ children: tab
57935
+ }));
57936
+ }
57937
+ var $children = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
57932
57938
  children: [shape === 'card' && renderCardTab(), shape === 'line' && renderLineTab(), shape === 'dash' && renderDashTab(), shape === 'fill' && renderFillTab()]
57939
+ });
57940
+ if (isLink(propTab)) {
57941
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(propTab, objectSpread2_default()({
57942
+ children: $children
57943
+ }, containerProps));
57944
+ }
57945
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, containerProps), {}, {
57946
+ children: $children
57933
57947
  }));
57934
57948
  };
57935
57949
  /* harmony default export */ var tabs_tab = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Tab));
@@ -63672,7 +63686,7 @@ var upload_interface = __webpack_require__(8821);
63672
63686
 
63673
63687
 
63674
63688
  /* harmony default export */ var src_0 = ({
63675
- version: '3.3.3-beta.6'
63689
+ version: '3.3.3-beta.7'
63676
63690
  });
63677
63691
  }();
63678
63692
  /******/ return __webpack_exports__;