easy3wui 1.5.49-beta2 → 1.5.49-beta5

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.
@@ -114,7 +114,6 @@ var Easy3wGridPage = function (_Component) {
114
114
  _this.state = {
115
115
  // 数据
116
116
  arrData: arrData, // 列表
117
- arrColumns: [], // 列
118
117
  // 选择
119
118
  selectedRowKeysState: selectedKey || [],
120
119
  selectedRowsState: selectedVal || [],
@@ -125,20 +124,14 @@ var Easy3wGridPage = function (_Component) {
125
124
  }
126
125
 
127
126
  Easy3wGridPage.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
128
- var _props = this.props,
129
- _props$dataList = _props.dataList,
130
- dataList = _props$dataList === undefined ? [] : _props$dataList,
131
- _props$columns = _props.columns,
132
- columns = _props$columns === undefined ? [] : _props$columns;
127
+ var _props$dataList = this.props.dataList,
128
+ dataList = _props$dataList === undefined ? [] : _props$dataList;
129
+ var _nextProps$dataList = nextProps.dataList,
130
+ nextDataList = _nextProps$dataList === undefined ? [] : _nextProps$dataList;
133
131
 
134
- if (nextProps.dataList.length !== dataList.length || JSON.stringify(nextProps.dataList) !== JSON.stringify(dataList)) {
135
- this.setState({
136
- arrData: nextProps.dataList && nextProps.dataList.length ? JSON.parse(JSON.stringify(nextProps.dataList)) : []
137
- });
138
- }
139
- if (nextProps.columns.length !== columns.length || JSON.stringify(nextProps.columns) !== JSON.stringify(columns)) {
132
+ if (nextDataList.length !== dataList.length || JSON.stringify(nextDataList) !== JSON.stringify(dataList)) {
140
133
  this.setState({
141
- arrColumns: nextProps.columns && nextProps.columns.length ? this.formatColumns((0, _cloneDeep2['default'])(nextProps.columns)) : []
134
+ arrData: nextDataList.length ? JSON.parse(JSON.stringify(nextDataList)) : []
142
135
  });
143
136
  }
144
137
  if (nextProps.cleanFlag === '1') {
@@ -157,20 +150,20 @@ var Easy3wGridPage = function (_Component) {
157
150
  Easy3wGridPage.prototype.render = function render() {
158
151
  var _this2 = this;
159
152
 
160
- var _props2 = this.props,
161
- columns = _props2.columns,
162
- loading = _props2.loading,
163
- getCheckboxProps = _props2.getCheckboxProps,
164
- needPaginationFlag = _props2.needPaginationFlag,
165
- gridProps = _props2.gridProps,
166
- totalResult = _props2.totalResult,
167
- rowKey = _props2.rowKey,
168
- checkType = _props2.checkType,
169
- bordered = _props2.bordered,
170
- chooseFlag = _props2.chooseFlag,
171
- scroll = _props2.scroll,
172
- className = _props2.className,
173
- paginationInfo = _props2.paginationInfo;
153
+ var _props = this.props,
154
+ columns = _props.columns,
155
+ loading = _props.loading,
156
+ getCheckboxProps = _props.getCheckboxProps,
157
+ needPaginationFlag = _props.needPaginationFlag,
158
+ gridProps = _props.gridProps,
159
+ totalResult = _props.totalResult,
160
+ rowKey = _props.rowKey,
161
+ checkType = _props.checkType,
162
+ bordered = _props.bordered,
163
+ chooseFlag = _props.chooseFlag,
164
+ scroll = _props.scroll,
165
+ className = _props.className,
166
+ paginationInfo = _props.paginationInfo;
174
167
  var arrData = this.state.arrData;
175
168
  // [].concat(arrA)
176
169
  // const arrColumns = this.touchCreateColumns([].concat(columns));
@@ -251,7 +244,7 @@ var Easy3wGridPage = function (_Component) {
251
244
  { className: gridProps || this.props.rowType ? gridProps.onRow || this.props.rowType ? 'onRow' : null : null },
252
245
  _react2['default'].createElement(_table2['default'], (0, _extends3['default'])({
253
246
  className: printFlag ? 'scrollPrint' : className || 'scrollX',
254
- columns: this.state.arrColumns && this.state.arrColumns.length ? this.state.arrColumns : arrColumns,
247
+ columns: arrColumns,
255
248
  dataSource: arrData,
256
249
  pagination: paginationProps,
257
250
  loading: loading,
@@ -292,11 +285,11 @@ var _initialiseProps = function _initialiseProps() {
292
285
  var _state2 = _this3.state,
293
286
  selectedRowKeysState = _state2.selectedRowKeysState,
294
287
  selectedRowsState = _state2.selectedRowsState;
295
- var _props3 = _this3.props,
296
- rowKey = _props3.rowKey,
297
- rowKeyCname = _props3.rowKeyCname,
298
- selectChangeCallback = _props3.selectChangeCallback,
299
- chooseFlag = _props3.chooseFlag;
288
+ var _props2 = _this3.props,
289
+ rowKey = _props2.rowKey,
290
+ rowKeyCname = _props2.rowKeyCname,
291
+ selectChangeCallback = _props2.selectChangeCallback,
292
+ chooseFlag = _props2.chooseFlag;
300
293
 
301
294
  selectedRowKeysState.splice(selectedRowKeysState.findIndex(function (selectedRowKey) {
302
295
  return selectedRowKey === closeKey;
@@ -333,11 +326,11 @@ var _initialiseProps = function _initialiseProps() {
333
326
 
334
327
  var selectedRowKeysStateArr = selectedRowKeysState;
335
328
  var selectedRowsStateArr = selectedRowsState;
336
- var _props4 = _this3.props,
337
- rowKey = _props4.rowKey,
338
- rowKeyCname = _props4.rowKeyCname,
339
- selectChangeCallback = _props4.selectChangeCallback,
340
- chooseFlag = _props4.chooseFlag;
329
+ var _props3 = _this3.props,
330
+ rowKey = _props3.rowKey,
331
+ rowKeyCname = _props3.rowKeyCname,
332
+ selectChangeCallback = _props3.selectChangeCallback,
333
+ chooseFlag = _props3.chooseFlag;
341
334
 
342
335
  var newSelRowKeysTags = [];
343
336
  selectedRowKeysStateArr.splice(selectedRowKeysStateArr.findIndex(function (selectedRowKey) {
@@ -384,12 +377,12 @@ var _initialiseProps = function _initialiseProps() {
384
377
  var _state4 = _this3.state,
385
378
  selectedRowKeysState = _state4.selectedRowKeysState,
386
379
  selectedRowsState = _state4.selectedRowsState;
387
- var _props5 = _this3.props,
388
- rowKey = _props5.rowKey,
389
- rowKeyCname = _props5.rowKeyCname,
390
- selectChangeCallback = _props5.selectChangeCallback,
391
- chooseFlag = _props5.chooseFlag,
392
- checkType = _props5.checkType;
380
+ var _props4 = _this3.props,
381
+ rowKey = _props4.rowKey,
382
+ rowKeyCname = _props4.rowKeyCname,
383
+ selectChangeCallback = _props4.selectChangeCallback,
384
+ chooseFlag = _props4.chooseFlag,
385
+ checkType = _props4.checkType;
393
386
 
394
387
  if (checkType === 'radio') {
395
388
  selectedRowKeysState = [];
@@ -425,11 +418,11 @@ var _initialiseProps = function _initialiseProps() {
425
418
  var _state5 = _this3.state,
426
419
  selectedRowKeysState = _state5.selectedRowKeysState,
427
420
  selectedRowsState = _state5.selectedRowsState;
428
- var _props6 = _this3.props,
429
- rowKey = _props6.rowKey,
430
- rowKeyCname = _props6.rowKeyCname,
431
- selectChangeCallback = _props6.selectChangeCallback,
432
- chooseFlag = _props6.chooseFlag;
421
+ var _props5 = _this3.props,
422
+ rowKey = _props5.rowKey,
423
+ rowKeyCname = _props5.rowKeyCname,
424
+ selectChangeCallback = _props5.selectChangeCallback,
425
+ chooseFlag = _props5.chooseFlag;
433
426
 
434
427
  removeRows.forEach(function (removeRow) {
435
428
  selectedRowKeysState.splice(selectedRowKeysState.findIndex(function (selectedRowKey) {
@@ -502,11 +495,11 @@ var _initialiseProps = function _initialiseProps() {
502
495
 
503
496
  var selectedRowKeysStateArr = selectedRowKeysState;
504
497
  var selectedRowsStateArr = selectedRowsState;
505
- var _props7 = _this3.props,
506
- rowKey = _props7.rowKey,
507
- rowKeyCname = _props7.rowKeyCname,
508
- selectChangeCallback = _props7.selectChangeCallback,
509
- chooseFlag = _props7.chooseFlag;
498
+ var _props6 = _this3.props,
499
+ rowKey = _props6.rowKey,
500
+ rowKeyCname = _props6.rowKeyCname,
501
+ selectChangeCallback = _props6.selectChangeCallback,
502
+ chooseFlag = _props6.chooseFlag;
510
503
 
511
504
  var flag = false;
512
505
  var newSelRowKeysTags = [];
@@ -575,10 +568,10 @@ var _initialiseProps = function _initialiseProps() {
575
568
  };
576
569
 
577
570
  this.handleTableChange = function (pagination) {
578
- var _props8 = _this3.props,
579
- selfDealPageChangeFunc = _props8.selfDealPageChangeFunc,
580
- getSearchCondition = _props8.getSearchCondition,
581
- handleSearch = _props8.handleSearch;
571
+ var _props7 = _this3.props,
572
+ selfDealPageChangeFunc = _props7.selfDealPageChangeFunc,
573
+ getSearchCondition = _props7.getSearchCondition,
574
+ handleSearch = _props7.handleSearch;
582
575
 
583
576
  var formVal = getSearchCondition();
584
577
  var paginationInfo = { offset: pagination.current, limit: pagination.pageSize };
@@ -667,10 +660,10 @@ var _initialiseProps = function _initialiseProps() {
667
660
  };
668
661
 
669
662
  this.touchCreateColumns = function (columns) {
670
- var _props9 = _this3.props,
671
- dataList = _props9.dataList,
672
- autoAddNumber = _props9.autoAddNumber,
673
- paginationInfo = _props9.paginationInfo;
663
+ var _props8 = _this3.props,
664
+ dataList = _props8.dataList,
665
+ autoAddNumber = _props8.autoAddNumber,
666
+ paginationInfo = _props8.paginationInfo;
674
667
  var arrData = _this3.state.arrData;
675
668
 
676
669
  var current = paginationInfo ? paginationInfo.offset : _this3.state.pagination.offset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.49-beta2",
3
+ "version": "1.5.49-beta5",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",