@bit-sun/business-component 3.0.0-alpha.5 → 3.0.0-alpha.6

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
@@ -11739,9 +11739,11 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11739
11739
  var _this$props = _this.props,
11740
11740
  _this$props$summary = _this$props.summary,
11741
11741
  summary = _this$props$summary === void 0 ? undefined : _this$props$summary,
11742
- rowSelection = _this$props.rowSelection;
11742
+ rowSelection = _this$props.rowSelection,
11743
+ expandable = _this$props.expandable;
11743
11744
  var showColumns = _this.state.showColumns;
11744
- var summaryRow = rowSelection ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns);
11745
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
11746
+ var summaryRow = rowSelection && expandable ? [{}, {}].concat(_toConsumableArray(showColumns)) : rowSelection || expandable ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns); //兼容table配置展开expandable属性导致汇总列位置不对的问题
11745
11747
  var summaryInitial = summary().cont;
11746
11748
  var summaryDom = /*#__PURE__*/React.createElement(Table.Summary, {
11747
11749
  fixed: true
@@ -11985,9 +11987,11 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
11985
11987
  var _this$props = _this.props,
11986
11988
  _this$props$summary = _this$props.summary,
11987
11989
  summary = _this$props$summary === void 0 ? undefined : _this$props$summary,
11988
- rowSelection = _this$props.rowSelection;
11990
+ rowSelection = _this$props.rowSelection,
11991
+ expandable = _this$props.expandable;
11989
11992
  var showColumns = _this.state.showColumns;
11990
- var summaryRow = rowSelection ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns);
11993
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
11994
+ var summaryRow = rowSelection && expandable ? [{}, {}].concat(_toConsumableArray(showColumns)) : rowSelection || expandable ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns); //兼容table配置展开expandable属性导致汇总列位置不对的问题
11991
11995
  var summaryInitial = summary().cont;
11992
11996
  var summaryDom = /*#__PURE__*/React.createElement(Table.Summary, {
11993
11997
  fixed: true
package/dist/index.js CHANGED
@@ -11761,9 +11761,11 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11761
11761
  var _this$props = _this.props,
11762
11762
  _this$props$summary = _this$props.summary,
11763
11763
  summary = _this$props$summary === void 0 ? undefined : _this$props$summary,
11764
- rowSelection = _this$props.rowSelection;
11764
+ rowSelection = _this$props.rowSelection,
11765
+ expandable = _this$props.expandable;
11765
11766
  var showColumns = _this.state.showColumns;
11766
- var summaryRow = rowSelection ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns);
11767
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
11768
+ var summaryRow = rowSelection && expandable ? [{}, {}].concat(_toConsumableArray(showColumns)) : rowSelection || expandable ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns); //兼容table配置展开expandable属性导致汇总列位置不对的问题
11767
11769
  var summaryInitial = summary().cont;
11768
11770
  var summaryDom = /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary, {
11769
11771
  fixed: true
@@ -12007,9 +12009,11 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
12007
12009
  var _this$props = _this.props,
12008
12010
  _this$props$summary = _this$props.summary,
12009
12011
  summary = _this$props$summary === void 0 ? undefined : _this$props$summary,
12010
- rowSelection = _this$props.rowSelection;
12012
+ rowSelection = _this$props.rowSelection,
12013
+ expandable = _this$props.expandable;
12011
12014
  var showColumns = _this.state.showColumns;
12012
- var summaryRow = rowSelection ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns);
12015
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
12016
+ var summaryRow = rowSelection && expandable ? [{}, {}].concat(_toConsumableArray(showColumns)) : rowSelection || expandable ? [{}].concat(_toConsumableArray(showColumns)) : _toConsumableArray(showColumns); //兼容table配置展开expandable属性导致汇总列位置不对的问题
12013
12017
  var summaryInitial = summary().cont;
12014
12018
  var summaryDom = /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary, {
12015
12019
  fixed: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.6",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -69,9 +69,10 @@ export default class ColumnSettingTable extends React.Component {
69
69
  };
70
70
 
71
71
  getTableSummaryInfo = () => {
72
- const { summary = undefined, rowSelection }: any = this.props;
72
+ const { summary = undefined, rowSelection, expandable }: any = this.props;
73
73
  const { showColumns }: any = this.state;
74
- let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
74
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
75
+ let summaryRow = rowSelection && expandable ? [{}, {}, ...showColumns] : rowSelection || expandable ? [{}, ...showColumns] : [...showColumns]; //兼容table配置展开expandable属性导致汇总列位置不对的问题
75
76
  let summaryInitial = summary().cont;
76
77
  let summaryDom: any = <Table.Summary fixed>
77
78
  <Table.Summary.Row>
@@ -75,9 +75,10 @@ export default class ColumnSettingSulaTable extends React.Component {
75
75
  };
76
76
 
77
77
  getTableSummaryInfo = () => {
78
- const { summary = undefined, rowSelection }: any = this.props;
78
+ const { summary = undefined, rowSelection, expandable }: any = this.props;
79
79
  const { showColumns }: any = this.state;
80
- let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
80
+ // let summaryRow = rowSelection ? [{}, ...showColumns] : [...showColumns];
81
+ let summaryRow = rowSelection && expandable ? [{}, {}, ...showColumns] : rowSelection || expandable ? [{}, ...showColumns] : [...showColumns]; //兼容table配置展开expandable属性导致汇总列位置不对的问题
81
82
  let summaryInitial = summary().cont;
82
83
  let summaryDom: any = <Table.Summary fixed>
83
84
  <Table.Summary.Row>