@lemon-fe/components 1.2.9-alpha.0 → 1.2.9-alpha.2

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.
@@ -71,6 +71,11 @@ declare class InternalDataGrid<TData extends Record<string, any>> extends Compon
71
71
  private updateRowData;
72
72
  private getSummaryRowData;
73
73
  private loadingTiming;
74
+ /**
75
+ *
76
+ * @param flag
77
+ * @param ignoreClientMode 为了解决明细页面出现2个loading动画的问题,非远程模式加载列定制数据的时候暂定出现表格内部加载动画
78
+ */
74
79
  private loadingChange;
75
80
  private getDataFromServer;
76
81
  private pagination;
@@ -307,9 +307,10 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
307
307
  });
308
308
  api.addEventListener('selectionChanged', function () {
309
309
  var rowSelection = _this.props.rowSelection;
310
- if (_this.selected.isDirty() && rowSelection !== undefined && rowSelection.onChange !== undefined) {
310
+ if (_this.selected.isDirty()) {
311
+ var _rowSelection$onChang;
311
312
  var result = _this.selected.flush();
312
- rowSelection.onChange(result[0], result[1].filter(Boolean));
313
+ rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang = rowSelection.onChange) === null || _rowSelection$onChang === void 0 || _rowSelection$onChang.call(rowSelection, result[0], result[1].filter(Boolean));
313
314
  }
314
315
  });
315
316
  api.addEventListener('paginationChanged', function () {
@@ -667,13 +668,13 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
667
668
  while (1) switch (_context3.prev = _context3.next) {
668
669
  case 0:
669
670
  window.addEventListener('blur', this.handleFocus);
670
- this.loadingChange(true);
671
+ this.loadingChange(true, true);
671
672
 
672
673
  // 放在componentDidMount 执行时间比onGridReady早
673
674
  _context3.next = 4;
674
675
  return this.customColumnData;
675
676
  case 4:
676
- this.loadingChange(false);
677
+ this.loadingChange(false, true);
677
678
  case 5:
678
679
  case "end":
679
680
  return _context3.stop();
@@ -1275,8 +1276,15 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
1275
1276
  }
1276
1277
  }, {
1277
1278
  key: "loadingChange",
1278
- value: function loadingChange(flag) {
1279
+ value:
1280
+ /**
1281
+ *
1282
+ * @param flag
1283
+ * @param ignoreClientMode 为了解决明细页面出现2个loading动画的问题,非远程模式加载列定制数据的时候暂定出现表格内部加载动画
1284
+ */
1285
+ function loadingChange(flag) {
1279
1286
  var _this5 = this;
1287
+ var ignoreClientMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1280
1288
  if (this.loadingTiming) {
1281
1289
  clearTimeout(this.loadingTiming);
1282
1290
  this.loadingTiming = null;
@@ -1286,9 +1294,13 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
1286
1294
  if (onLoading) {
1287
1295
  onLoading(flag);
1288
1296
  } else {
1289
- _this5.setState({
1290
- loading: flag
1291
- });
1297
+ if (_this5.isClientMode() && ignoreClientMode) {
1298
+ // noop
1299
+ } else {
1300
+ _this5.setState({
1301
+ loading: flag
1302
+ });
1303
+ }
1292
1304
  }
1293
1305
  _this5.loadingTiming = null;
1294
1306
  }, 16);
@@ -320,7 +320,6 @@
320
320
  &-bottom {
321
321
  display: flex;
322
322
  align-items: center;
323
- justify-content: space-between;
324
323
  margin-top: @space-v;
325
324
  background-color: var(--ag-background-color);
326
325
 
@@ -330,6 +329,7 @@
330
329
  }
331
330
 
332
331
  &-selected {
332
+ margin-right: @padding-md;
333
333
  color: #333;
334
334
 
335
335
  a {
@@ -35,7 +35,7 @@ var locale = {
35
35
  dataSourceSummaryDataText: 'Total value calculated based on the formula from the data source',
36
36
  addFieldText: 'Add Field'
37
37
  },
38
- maxWordText: '${headName} can not exceed ${maxLength} words',
38
+ maxWordText: '${headerName} can not exceed ${maxLength} words',
39
39
  operationSuccessText: 'Success',
40
40
  displayText: 'Show',
41
41
  searchText: 'Search',
@@ -35,7 +35,7 @@ var locale = {
35
35
  validate: {
36
36
  fieldErrorText: '${field}输入错误'
37
37
  },
38
- maxWordText: '${headName}最多${maxLength}个字符',
38
+ maxWordText: '${headerName}最多${maxLength}个字符',
39
39
  operationSuccessText: '操作成功',
40
40
  displayText: '显示',
41
41
  searchText: '按回车进行搜索',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.2.9-alpha.0",
3
+ "version": "1.2.9-alpha.2",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "registry": "https://registry.npmjs.org"
69
69
  },
70
- "gitHead": "9eac3b4183e52b0c97cd2864b209a3d97af08f29"
70
+ "gitHead": "0469d8fe24ae91bdca653d05ff6700fd9e438e6c"
71
71
  }