@bit-sun/business-component 4.2.0-alpha.16 → 4.2.0-alpha.17

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
@@ -20137,9 +20137,16 @@ var BsSulaQueryTable = (function (props) {
20137
20137
  }
20138
20138
  }));
20139
20139
  }));
20140
- } else {
20141
- return undefined;
20142
20140
  }
20141
+ // 判断summaryList 是否为reactNode
20142
+ if (/*#__PURE__*/React$1.isValidElement(summaryList)) {
20143
+ return summaryList;
20144
+ }
20145
+ // 判断summaryList 是否为函数
20146
+ if (Object.prototype.toString.call(summaryList) === '[object Function]') {
20147
+ return summaryList();
20148
+ }
20149
+ return undefined;
20143
20150
  };
20144
20151
  var columnsDom = /*#__PURE__*/React$1.createElement("span", {
20145
20152
  className: "ant-dropdown-link"
@@ -20164,7 +20171,7 @@ var BsSulaQueryTable = (function (props) {
20164
20171
  var memoConfig = useMemo(function () {
20165
20172
  return _objectSpread2(_objectSpread2({}, config), {}, {
20166
20173
  summary: props.summary,
20167
- summaryList: props.summaryList ? getTableSummaryInfo : props.summary,
20174
+ summaryList: props.summaryList ? getTableSummaryInfo : undefined,
20168
20175
  statusMapping: props.statusMapping,
20169
20176
  isBsSulaQueryTable: true,
20170
20177
  columnsDom: columnsDom,
package/dist/index.js CHANGED
@@ -20160,9 +20160,16 @@ var BsSulaQueryTable = (function (props) {
20160
20160
  }
20161
20161
  }));
20162
20162
  }));
20163
- } else {
20164
- return undefined;
20165
20163
  }
20164
+ // 判断summaryList 是否为reactNode
20165
+ if (/*#__PURE__*/React__default['default'].isValidElement(summaryList)) {
20166
+ return summaryList;
20167
+ }
20168
+ // 判断summaryList 是否为函数
20169
+ if (Object.prototype.toString.call(summaryList) === '[object Function]') {
20170
+ return summaryList();
20171
+ }
20172
+ return undefined;
20166
20173
  };
20167
20174
  var columnsDom = /*#__PURE__*/React__default['default'].createElement("span", {
20168
20175
  className: "ant-dropdown-link"
@@ -20187,7 +20194,7 @@ var BsSulaQueryTable = (function (props) {
20187
20194
  var memoConfig = React$1.useMemo(function () {
20188
20195
  return _objectSpread2(_objectSpread2({}, config), {}, {
20189
20196
  summary: props.summary,
20190
- summaryList: props.summaryList ? getTableSummaryInfo : props.summary,
20197
+ summaryList: props.summaryList ? getTableSummaryInfo : undefined,
20191
20198
  statusMapping: props.statusMapping,
20192
20199
  isBsSulaQueryTable: true,
20193
20200
  columnsDom: columnsDom,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.0-alpha.16",
3
+ "version": "4.2.0-alpha.17",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -1079,9 +1079,16 @@ export default (props: any) => {
1079
1079
  ))}
1080
1080
  </Table.Summary>
1081
1081
  );
1082
- } else {
1083
- return undefined;
1084
1082
  }
1083
+ // 判断summaryList 是否为reactNode
1084
+ if(React.isValidElement(summaryList)){
1085
+ return summaryList;
1086
+ }
1087
+ // 判断summaryList 是否为函数
1088
+ if(Object.prototype.toString.call(summaryList) === '[object Function]'){
1089
+ return summaryList();
1090
+ }
1091
+ return undefined;
1085
1092
  };
1086
1093
 
1087
1094
  const columnsDom = <span className="ant-dropdown-link">
@@ -1098,11 +1105,11 @@ export default (props: any) => {
1098
1105
  bsTableCode={bsTableCode}
1099
1106
  />
1100
1107
 
1101
- const memoConfig = useMemo(
1108
+ const memoConfig = useMemo(
1102
1109
  () => ({
1103
1110
  ...config,
1104
1111
  summary: props.summary,
1105
- summaryList: props.summaryList ? getTableSummaryInfo : props.summary,
1112
+ summaryList: props.summaryList ? getTableSummaryInfo : undefined,
1106
1113
  statusMapping: props.statusMapping,
1107
1114
  isBsSulaQueryTable: true,
1108
1115
  columnsDom:columnsDom,