easy3wui 1.5.85-beta.4 → 1.5.85-beta.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/assets/index.css CHANGED
@@ -2713,3 +2713,6 @@ input.ant-input-number-input {
2713
2713
  width: calc(88%);
2714
2714
  margin: 0 6px;
2715
2715
  }
2716
+ :global .ant-skeleton {
2717
+ background: #fff;
2718
+ }
@@ -0,0 +1,3 @@
1
+ :global .ant-skeleton {
2
+ background: #fff;
3
+ }
@@ -44,6 +44,8 @@ var _react = require('react');
44
44
 
45
45
  var _react2 = _interopRequireDefault(_react);
46
46
 
47
+ var _dva = require('dva');
48
+
47
49
  var _antd = require('antd');
48
50
 
49
51
  var _reactDataGrid = require('react-data-grid');
@@ -64,11 +66,14 @@ var _Easy3wEditBigTableForm = require('./Easy3wEditBigTableForm');
64
66
 
65
67
  var _Easy3wEditBigTableForm2 = _interopRequireDefault(_Easy3wEditBigTableForm);
66
68
 
69
+ var _Easy3wSpin = require('../Easy3wSpin');
70
+
71
+ var _Easy3wSpin2 = _interopRequireDefault(_Easy3wSpin);
72
+
67
73
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
68
74
 
69
- var Selectors = _reactDataGridAddons.Data.Selectors;
70
75
  // import XLSX from 'xlsx';
71
- /* eslint-disable no-alert */
76
+ var Selectors = _reactDataGridAddons.Data.Selectors; /* eslint-disable no-alert */
72
77
 
73
78
  var Easy3wEditBigTable = function (_React$Component) {
74
79
  (0, _inherits3['default'])(Easy3wEditBigTable, _React$Component);
@@ -239,6 +244,9 @@ var Easy3wEditBigTable = function (_React$Component) {
239
244
  // 校验数据
240
245
 
241
246
  // #endregion 校验数据
247
+ // #region 获取loading状态
248
+
249
+ // #endregion 获取loading状态
242
250
  // 转换数字
243
251
 
244
252
  // 变量 num 是一个有效的数字,即非空、不为 NaN 且是有限值
@@ -258,58 +266,63 @@ var Easy3wEditBigTable = function (_React$Component) {
258
266
  var objReactDataGridProps = this.getReactDataGridProps();
259
267
  var columns = this.createColumns(); // 表头
260
268
  var objTotal = totalFlag ? this.touchLoopData() : {}; // 循环数据获取
269
+ var spinLoading = this.getLoading();
261
270
  return _react2['default'].createElement(
262
- 'div',
263
- { className: (0, _classnames2['default'])(['Easy3wEditBigTable']) },
271
+ _Easy3wSpin2['default'],
272
+ { noStyle: true, spinLoading: spinLoading },
264
273
  _react2['default'].createElement(
265
- 'style',
266
- null,
267
- strReactDataGridStyle || (strAddReactDataGridStyle || '') + '\n .custom-edit-cell {\n background-color: #f6ffed;\n }\n '
268
- ),
269
- _react2['default'].createElement(_reactDataGrid2['default'], (0, _extends3['default'])({}, this.props, {
270
- ref: this.ReactDataGridRef,
271
- columns: columns // 表头
272
- // rows={rows}
273
- , rowGetter: this.rowGetter // 获取行数据
274
- , rowsCount: this.getSize() // 行数
275
- , onGridSort: this.onGridSort
276
- }, objReactDataGridProps, objOtherProps)),
277
- totalFlag ? _react2['default'].createElement(
278
274
  'div',
279
- null,
280
- objTotal && Object.keys(objTotal).map(function (key, index) {
281
- return _react2['default'].createElement(
282
- 'span',
283
- { key: key },
284
- index === 0 ? '' : ';',
285
- _react2['default'].createElement(
286
- 'span',
287
- null,
288
- objTotal[key].name,
289
- '\uFF1A'
290
- ),
291
- _react2['default'].createElement(
292
- 'span',
293
- null,
294
- ' ',
295
- objTotal[key].numberFormat ? _this2.touchFormatNum(objTotal[key].value) : objTotal[key].value,
296
- ' ',
297
- objTotal[key].unit || ''
298
- )
299
- );
300
- })
301
- ) : '',
302
- visible ? _react2['default'].createElement(_Easy3wEditBigTableForm2['default'] // 批量录入Modal
303
- , { visible: visible // 是否显示
304
- , objOtherParameters: (0, _extends3['default'])({}, objToolbarProps, { // 工具栏属性
275
+ { className: (0, _classnames2['default'])(['Easy3wEditBigTable']) },
276
+ _react2['default'].createElement(
277
+ 'style',
278
+ null,
279
+ strReactDataGridStyle || (strAddReactDataGridStyle || '') + '\n .custom-edit-cell {\n background-color: #f6ffed;\n }\n '
280
+ ),
281
+ _react2['default'].createElement(_reactDataGrid2['default'], (0, _extends3['default'])({}, this.props, {
282
+ ref: this.ReactDataGridRef,
305
283
  columns: columns // 表头
306
- }) // 其他参数
307
- , bidPureComponent: function bidPureComponent(that) {
308
- return _this2.bidPureComponent('Easy3wEditBigTableForm', that);
309
- } // 绑定组件
310
- , confirmCallback: this.confirmCallbackBatchEditBigTable,
311
- hideModal: this.hideModalBatchEditBigTable
312
- }) : ''
284
+ // rows={rows}
285
+ , rowGetter: this.rowGetter // 获取行数据
286
+ , rowsCount: this.getSize() // 行数
287
+ , onGridSort: this.onGridSort
288
+ }, objReactDataGridProps, objOtherProps)),
289
+ totalFlag ? _react2['default'].createElement(
290
+ 'div',
291
+ null,
292
+ objTotal && Object.keys(objTotal).map(function (key, index) {
293
+ return _react2['default'].createElement(
294
+ 'span',
295
+ { key: key },
296
+ index === 0 ? '' : ';',
297
+ _react2['default'].createElement(
298
+ 'span',
299
+ null,
300
+ objTotal[key].name,
301
+ '\uFF1A'
302
+ ),
303
+ _react2['default'].createElement(
304
+ 'span',
305
+ null,
306
+ ' ',
307
+ objTotal[key].numberFormat ? _this2.touchFormatNum(objTotal[key].value) : objTotal[key].value,
308
+ ' ',
309
+ objTotal[key].unit || ''
310
+ )
311
+ );
312
+ })
313
+ ) : '',
314
+ visible ? _react2['default'].createElement(_Easy3wEditBigTableForm2['default'] // 批量录入Modal
315
+ , { visible: visible // 是否显示
316
+ , objOtherParameters: (0, _extends3['default'])({}, objToolbarProps, { // 工具栏属性
317
+ columns: columns // 表头
318
+ }) // 其他参数
319
+ , bidPureComponent: function bidPureComponent(that) {
320
+ return _this2.bidPureComponent('Easy3wEditBigTableForm', that);
321
+ } // 绑定组件
322
+ , confirmCallback: this.confirmCallbackBatchEditBigTable,
323
+ hideModal: this.hideModalBatchEditBigTable
324
+ }) : ''
325
+ )
313
326
  );
314
327
  };
315
328
 
@@ -1309,6 +1322,25 @@ var _initialiseProps = function _initialiseProps() {
1309
1322
  return { arrRequiredMessage: arrRequiredMessage, strCheckFailRows: strCheckFailRows };
1310
1323
  };
1311
1324
 
1325
+ this.getLoading = function () {
1326
+ var spinLoading = false;
1327
+ var queryApi = _this3.props.queryApi;
1328
+ var globalFetch = _this3.props.loading.globalFetch;
1329
+
1330
+ if (queryApi && typeof queryApi === 'string') {
1331
+ spinLoading = globalFetch[queryApi];
1332
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
1333
+ queryApi.map(function (str) {
1334
+ var spinLoadingC = globalFetch[str];
1335
+ if (spinLoadingC) {
1336
+ spinLoading = spinLoadingC;
1337
+ }
1338
+ return str;
1339
+ });
1340
+ }
1341
+ return spinLoading;
1342
+ };
1343
+
1312
1344
  this.touchFormatNum = function (num) {
1313
1345
  return _this3.checkNum(num) ? (0, _numeral2['default'])(num).format('0,0.00') : num || '';
1314
1346
  };
@@ -1319,5 +1351,9 @@ var _initialiseProps = function _initialiseProps() {
1319
1351
  };
1320
1352
  };
1321
1353
 
1322
- exports['default'] = Easy3wEditBigTable;
1354
+ exports['default'] = (0, _dva.connect)(function (state) {
1355
+ return {
1356
+ loading: state.loading
1357
+ };
1358
+ })(Easy3wEditBigTable);
1323
1359
  module.exports = exports['default'];
@@ -215,20 +215,23 @@ var _easy3wui = require('easy3wui');
215
215
 
216
216
  var _comonConfig = require('comonConfigPath/comonConfig');
217
217
 
218
+ var _Easy3wSpin = require('../Easy3wSpin');
219
+
220
+ var _Easy3wSpin2 = _interopRequireDefault(_Easy3wSpin);
221
+
218
222
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
219
223
 
220
- // 引入富文本表格功能
224
+ // import TagSelect from '../Easy3wTagSelect/index.js';
225
+ // import Easy3wUpload from '../../Easy3wUpload';
226
+ // import Easy3wUploadB from '../../Easy3wUploadB';
227
+ // import Easy3wUploadM from '../../Easy3wUploadM';
221
228
  var objOptions = {
222
229
  defaultRows: 3, // 默认行数
223
230
  defaultColumns: 3, // 默认列数
224
231
  withDropdown: false, // 插入表格前是否弹出下拉菜单
225
232
  columnResizable: false, // 是否允许拖动调整列宽, 默认false
226
233
  exportAttrString: 'style="border: 1"' // 指定输出HTML时附加到table标签上的属性字符串
227
- };
228
- // import TagSelect from '../Easy3wTagSelect/index.js';
229
- // import Easy3wUpload from '../../Easy3wUpload';
230
- // import Easy3wUploadB from '../../Easy3wUploadB';
231
- // import Easy3wUploadM from '../../Easy3wUploadM';
234
+ }; // 引入富文本表格功能
232
235
 
233
236
  _braftEditor2['default'].use((0, _table2['default'])(objOptions)); // 表格
234
237
 
@@ -2398,6 +2401,23 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
2398
2401
  },
2399
2402
  cName
2400
2403
  );
2404
+ }, _this.getFormLoading = function () {
2405
+ var spinLoading = false;
2406
+ var queryApi = _this.props.queryApi;
2407
+ var globalFetch = _this.props.loadingFlag.globalFetch;
2408
+
2409
+ if (queryApi && typeof queryApi === 'string') {
2410
+ spinLoading = globalFetch[queryApi];
2411
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
2412
+ queryApi.map(function (str) {
2413
+ var spinLoadingC = globalFetch[str];
2414
+ if (spinLoadingC) {
2415
+ spinLoading = spinLoadingC;
2416
+ }
2417
+ return str;
2418
+ });
2419
+ }
2420
+ return spinLoading;
2401
2421
  }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
2402
2422
  }
2403
2423
  // #region 获取字段配置
@@ -2581,14 +2601,20 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
2581
2601
 
2582
2602
  /** strHandler start */
2583
2603
 
2584
-
2585
2604
  /** strHandler end */
2605
+ // 获取表单loading状态
2606
+
2586
2607
 
2587
2608
  Easy3wFormPageM.prototype.render = function render() {
2609
+ var spinLoading = this.getFormLoading();
2588
2610
  return _react2['default'].createElement(
2589
- 'div',
2590
- { className: (0, _classnames2['default'])(['e3wFormPageWrap']) },
2591
- this.getAllForms()
2611
+ _Easy3wSpin2['default'],
2612
+ { noStyle: true, spinLoading: spinLoading },
2613
+ _react2['default'].createElement(
2614
+ 'div',
2615
+ { className: (0, _classnames2['default'])(['e3wFormPageWrap']) },
2616
+ this.getAllForms()
2617
+ )
2592
2618
  );
2593
2619
  };
2594
2620
 
@@ -4278,6 +4304,23 @@ var Easy3wFormPageTightM = exports.Easy3wFormPageTightM = function (_Component2)
4278
4304
  },
4279
4305
  cName
4280
4306
  );
4307
+ }, _this2.getFormLoading = function () {
4308
+ var spinLoading = false;
4309
+ var queryApi = _this2.props.queryApi;
4310
+ var globalFetch = _this2.props.loadingFlag.globalFetch;
4311
+
4312
+ if (queryApi && typeof queryApi === 'string') {
4313
+ spinLoading = globalFetch[queryApi];
4314
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
4315
+ queryApi.map(function (str) {
4316
+ var spinLoadingC = globalFetch[str];
4317
+ if (spinLoadingC) {
4318
+ spinLoading = spinLoadingC;
4319
+ }
4320
+ return str;
4321
+ });
4322
+ }
4323
+ return spinLoading;
4281
4324
  }, _temp2), (0, _possibleConstructorReturn3['default'])(_this2, _ret2);
4282
4325
  }
4283
4326
 
@@ -4436,10 +4479,12 @@ var Easy3wFormPageTightM = exports.Easy3wFormPageTightM = function (_Component2)
4436
4479
 
4437
4480
  /** strHandler start */
4438
4481
 
4439
-
4440
4482
  /** strHandler end */
4483
+ // 获取表单loading状态
4484
+
4441
4485
 
4442
4486
  Easy3wFormPageTightM.prototype.render = function render() {
4487
+ var spinLoading = this.getFormLoading();
4443
4488
  var getAllForms = this.getAllForms();
4444
4489
  var borderFlag = this.props.borderFlag;
4445
4490
  // noLabelFlag 布尔值
@@ -4451,12 +4496,16 @@ var Easy3wFormPageTightM = exports.Easy3wFormPageTightM = function (_Component2)
4451
4496
  noBorderFlag = _comonConfig.noBorderFlag;
4452
4497
  }
4453
4498
  return _react2['default'].createElement(
4454
- 'div',
4455
- { className: (0, _classnames2['default'])(['e3wFormPageWrapTight']) },
4499
+ _Easy3wSpin2['default'],
4500
+ { noStyle: true, spinLoading: spinLoading },
4456
4501
  _react2['default'].createElement(
4457
4502
  'div',
4458
- { className: (0, _classnames2['default'])(noBorderFlag ? ['e3wFormPageNoBorder'] : ['e3wFormPage']) },
4459
- getAllForms
4503
+ { className: (0, _classnames2['default'])(['e3wFormPageWrapTight']) },
4504
+ _react2['default'].createElement(
4505
+ 'div',
4506
+ { className: (0, _classnames2['default'])(noBorderFlag ? ['e3wFormPageNoBorder'] : ['e3wFormPage']) },
4507
+ getAllForms
4508
+ )
4460
4509
  )
4461
4510
  );
4462
4511
  // if (noBorderFlag) {
@@ -215,20 +215,23 @@ var _easy3wui = require('easy3wui');
215
215
 
216
216
  var _comonConfig = require('comonConfigPath/comonConfig');
217
217
 
218
+ var _Easy3wSpin = require('../Easy3wSpin');
219
+
220
+ var _Easy3wSpin2 = _interopRequireDefault(_Easy3wSpin);
221
+
218
222
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
219
223
 
220
- // 引入富文本表格功能
224
+ // import TagSelect from '../Easy3wTagSelect/index.js';
225
+ // import Easy3wUpload from '../../Easy3wUpload';
226
+ // import Easy3wUploadB from '../../Easy3wUploadB';
227
+ // import Easy3wUploadM from '../../Easy3wUploadM';
221
228
  var objOptions = {
222
229
  defaultRows: 3, // 默认行数
223
230
  defaultColumns: 3, // 默认列数
224
231
  withDropdown: false, // 插入表格前是否弹出下拉菜单
225
232
  columnResizable: false, // 是否允许拖动调整列宽, 默认false
226
233
  exportAttrString: 'style="border: 1"' // 指定输出HTML时附加到table标签上的属性字符串
227
- };
228
- // import TagSelect from '../Easy3wTagSelect/index.js';
229
- // import Easy3wUpload from '../../Easy3wUpload';
230
- // import Easy3wUploadB from '../../Easy3wUploadB';
231
- // import Easy3wUploadM from '../../Easy3wUploadM';
234
+ }; // 引入富文本表格功能
232
235
 
233
236
  _braftEditor2['default'].use((0, _table2['default'])(objOptions)); // 表格
234
237
 
@@ -2249,6 +2252,23 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
2249
2252
  },
2250
2253
  cName
2251
2254
  );
2255
+ }, _this.getFormLoading = function () {
2256
+ var spinLoading = false;
2257
+ var queryApi = _this.props.queryApi;
2258
+ var globalFetch = _this.props.loadingFlag.globalFetch;
2259
+
2260
+ if (queryApi && typeof queryApi === 'string') {
2261
+ spinLoading = globalFetch[queryApi];
2262
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
2263
+ queryApi.map(function (str) {
2264
+ var spinLoadingC = globalFetch[str];
2265
+ if (spinLoadingC) {
2266
+ spinLoading = spinLoadingC;
2267
+ }
2268
+ return str;
2269
+ });
2270
+ }
2271
+ return spinLoading;
2252
2272
  }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
2253
2273
  }
2254
2274
  // #region 获取字段配置
@@ -2427,14 +2447,22 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
2427
2447
 
2428
2448
  /** strHandler start */
2429
2449
 
2430
-
2431
2450
  /** strHandler end */
2451
+ // #region 获取表单loading状态
2452
+
2453
+
2454
+ // #endregion 获取表单loading状态
2432
2455
 
2433
2456
  Easy3wFormPagePC.prototype.render = function render() {
2457
+ var spinLoading = this.getFormLoading();
2434
2458
  return _react2['default'].createElement(
2435
- 'div',
2436
- { className: (0, _classnames2['default'])(['e3wFormPageWrap']) },
2437
- this.getAllForms()
2459
+ _Easy3wSpin2['default'],
2460
+ { noStyle: true, spinLoading: spinLoading },
2461
+ _react2['default'].createElement(
2462
+ 'div',
2463
+ { className: (0, _classnames2['default'])(['e3wFormPageWrap']) },
2464
+ this.getAllForms()
2465
+ )
2438
2466
  );
2439
2467
  };
2440
2468
 
@@ -4013,6 +4041,23 @@ var Easy3wFormPageTightPC = exports.Easy3wFormPageTightPC = function (_Component
4013
4041
  },
4014
4042
  cName
4015
4043
  );
4044
+ }, _this2.getFormLoading = function () {
4045
+ var spinLoading = false;
4046
+ var queryApi = _this2.props.queryApi;
4047
+ var globalFetch = _this2.props.loadingFlag.globalFetch;
4048
+
4049
+ if (queryApi && typeof queryApi === 'string') {
4050
+ spinLoading = globalFetch[queryApi];
4051
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
4052
+ queryApi.map(function (str) {
4053
+ var spinLoadingC = globalFetch[str];
4054
+ if (spinLoadingC) {
4055
+ spinLoading = spinLoadingC;
4056
+ }
4057
+ return str;
4058
+ });
4059
+ }
4060
+ return spinLoading;
4016
4061
  }, _temp2), (0, _possibleConstructorReturn3['default'])(_this2, _ret2);
4017
4062
  }
4018
4063
  /** 使用何种表单域 */
@@ -4168,10 +4213,14 @@ var Easy3wFormPageTightPC = exports.Easy3wFormPageTightPC = function (_Component
4168
4213
 
4169
4214
  /** strHandler start */
4170
4215
 
4171
-
4172
4216
  /** strHandler end */
4217
+ // #region 获取表单loading状态
4218
+
4219
+
4220
+ // #endregion 获取表单loading状态
4173
4221
 
4174
4222
  Easy3wFormPageTightPC.prototype.render = function render() {
4223
+ var spinLoading = this.getFormLoading();
4175
4224
  var getAllForms = this.getAllForms();
4176
4225
  var borderFlag = this.props.borderFlag;
4177
4226
  // noLabelFlag 布尔值
@@ -4183,12 +4232,16 @@ var Easy3wFormPageTightPC = exports.Easy3wFormPageTightPC = function (_Component
4183
4232
  noBorderFlag = _comonConfig.noBorderFlag;
4184
4233
  }
4185
4234
  return _react2['default'].createElement(
4186
- 'div',
4187
- { className: (0, _classnames2['default'])(['e3wFormPageWrapTight']) },
4235
+ _Easy3wSpin2['default'],
4236
+ { noStyle: true, spinLoading: spinLoading },
4188
4237
  _react2['default'].createElement(
4189
4238
  'div',
4190
- { className: (0, _classnames2['default'])(noBorderFlag ? ['e3wFormPageNoBorder'] : ['e3wFormPage']) },
4191
- getAllForms
4239
+ { className: (0, _classnames2['default'])(['e3wFormPageWrapTight']) },
4240
+ _react2['default'].createElement(
4241
+ 'div',
4242
+ { className: (0, _classnames2['default'])(noBorderFlag ? ['e3wFormPageNoBorder'] : ['e3wFormPage']) },
4243
+ getAllForms
4244
+ )
4192
4245
  )
4193
4246
  );
4194
4247
  // if (noBorderFlag) {
@@ -17,7 +17,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
17
17
  var isMobile = window.matchMedia('(max-width: 768px)').matches;
18
18
  exports['default'] = (0, _dva.connect)(function (state) {
19
19
  return {
20
- globalData: state.globalData
20
+ globalData: state.globalData,
21
+ loading: state.loading
21
22
  };
22
23
  })(isMobile ? _indexM2['default'] : _indexPC2['default']);
23
24
  module.exports = exports['default'];
@@ -130,8 +130,11 @@ var Easy3wGridPageM = function (_Component) {
130
130
  };
131
131
  // #region 获取表头
132
132
 
133
-
134
133
  // #endregion 获取表头
134
+ // #region 获取loading状态
135
+
136
+
137
+ // #endregion 获取loading状态
135
138
  Easy3wGridPageM.prototype.render = function render() {
136
139
  var _this2 = this;
137
140
 
@@ -139,7 +142,6 @@ var Easy3wGridPageM = function (_Component) {
139
142
  columns = _props.columns,
140
143
  totalResult = _props.totalResult,
141
144
  dataList = _props.dataList,
142
- loading = _props.loading,
143
145
  getCheckboxProps = _props.getCheckboxProps,
144
146
  needPaginationFlag = _props.needPaginationFlag,
145
147
  autoAddNumber = _props.autoAddNumber,
@@ -339,7 +341,7 @@ var Easy3wGridPageM = function (_Component) {
339
341
  '\u6E05\u7A7A'
340
342
  )
341
343
  ), type: 'info' });
342
-
344
+ var spinLoading = this.getLoading();
343
345
  // console.log('父级是否有 .e3wFormPageWrap:', hasParentClass);
344
346
  return _react2['default'].createElement(
345
347
  _react2['default'].Fragment,
@@ -355,7 +357,7 @@ var Easy3wGridPageM = function (_Component) {
355
357
  columns: myColumns,
356
358
  dataSource: dataList,
357
359
  pagination: paginationProps,
358
- loading: loading,
360
+ loading: spinLoading,
359
361
  rowKey: rowKey,
360
362
  rowSelection: rowSelection,
361
363
  bordered: bordered,
@@ -876,6 +878,25 @@ var _initialiseProps = function _initialiseProps() {
876
878
  });
877
879
  return myColumns;
878
880
  };
881
+
882
+ this.getLoading = function () {
883
+ var spinLoading = false;
884
+ var queryApi = _this3.props.queryApi;
885
+ var globalFetch = _this3.props.loading.globalFetch;
886
+
887
+ if (queryApi && typeof queryApi === 'string') {
888
+ spinLoading = globalFetch[queryApi];
889
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
890
+ queryApi.map(function (str) {
891
+ var spinLoadingC = globalFetch[str];
892
+ if (spinLoadingC) {
893
+ spinLoading = spinLoadingC;
894
+ }
895
+ return str;
896
+ });
897
+ }
898
+ return spinLoading;
899
+ };
879
900
  };
880
901
 
881
902
  exports['default'] = Easy3wGridPageM;
@@ -76,6 +76,10 @@ var _easy3wui = require('easy3wui');
76
76
 
77
77
  var _comonConfig = require('comonConfigPath/comonConfig');
78
78
 
79
+ var _Easy3wSpin = require('../Easy3wSpin');
80
+
81
+ var _Easy3wSpin2 = _interopRequireDefault(_Easy3wSpin);
82
+
79
83
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
80
84
 
81
85
  var Easy3wGridPagePC = function (_Component) {
@@ -130,8 +134,11 @@ var Easy3wGridPagePC = function (_Component) {
130
134
  };
131
135
  // #region 获取表头
132
136
 
133
-
134
137
  // #endregion 获取表头
138
+ // #region 获取loading状态
139
+
140
+
141
+ // #endregion 获取loading状态
135
142
  Easy3wGridPagePC.prototype.render = function render() {
136
143
  var _this2 = this;
137
144
 
@@ -139,7 +146,6 @@ var Easy3wGridPagePC = function (_Component) {
139
146
  columns = _props.columns,
140
147
  totalResult = _props.totalResult,
141
148
  dataList = _props.dataList,
142
- loading = _props.loading,
143
149
  getCheckboxProps = _props.getCheckboxProps,
144
150
  needPaginationFlag = _props.needPaginationFlag,
145
151
  autoAddNumber = _props.autoAddNumber,
@@ -320,7 +326,7 @@ var Easy3wGridPagePC = function (_Component) {
320
326
  '\u6E05\u7A7A'
321
327
  )
322
328
  ), type: 'info' });
323
-
329
+ var spinLoading = this.getLoading();
324
330
  // console.log('父级是否有 .e3wFormPageWrap:', hasParentClass);
325
331
  return _react2['default'].createElement(
326
332
  'div',
@@ -330,7 +336,7 @@ var Easy3wGridPagePC = function (_Component) {
330
336
  columns: myColumns,
331
337
  dataSource: dataList,
332
338
  pagination: paginationProps,
333
- loading: loading,
339
+ loading: spinLoading,
334
340
  rowKey: rowKey,
335
341
  rowSelection: rowSelection,
336
342
  bordered: bordered,
@@ -849,6 +855,25 @@ var _initialiseProps = function _initialiseProps() {
849
855
  });
850
856
  return myColumns;
851
857
  };
858
+
859
+ this.getLoading = function () {
860
+ var spinLoading = false;
861
+ var queryApi = _this3.props.queryApi;
862
+ var globalFetch = _this3.props.loading.globalFetch;
863
+
864
+ if (queryApi && typeof queryApi === 'string') {
865
+ spinLoading = globalFetch[queryApi];
866
+ } else if (queryApi && queryApi instanceof Array && queryApi.length) {
867
+ queryApi.map(function (str) {
868
+ var spinLoadingC = globalFetch[str];
869
+ if (spinLoadingC) {
870
+ spinLoading = spinLoadingC;
871
+ }
872
+ return str;
873
+ });
874
+ }
875
+ return spinLoading;
876
+ };
852
877
  };
853
878
 
854
879
  exports['default'] = Easy3wGridPagePC;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.85-beta.4",
3
+ "version": "1.5.85-beta.6",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",