dlt-for-react 1.1.5 → 1.1.7

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/README.md CHANGED
@@ -8,7 +8,7 @@ npm publish
8
8
 
9
9
  ## 前端 dlt-for-react 依赖包版本更新记录
10
10
 
11
- ##### 当前最新版本:1.1.5
11
+ ##### 当前最新版本:1.1.7
12
12
 
13
13
  ##### 安装依赖
14
14
 
@@ -16,6 +16,14 @@ npm publish
16
16
 
17
17
  ##### 版本修改记录
18
18
 
19
+ #### V1.1.7—2023 年 12 月 22 日
20
+
21
+ 1. 优化KyTable列表样式问题
22
+
23
+ #### V1.1.6—2023 年 11 月 22 日
24
+
25
+ 1. 解决KyTable存在二级表头时,无法固定操作列的问题
26
+
19
27
  #### V1.1.5—2023 年 11 月 22 日
20
28
 
21
29
  1. 修改getSizebug
@@ -281,10 +281,16 @@
281
281
  }
282
282
  }
283
283
  /* 新版新增---end */
284
- .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header {
284
+ .ant-table-small
285
+ > .ant-table-content
286
+ > .ant-table-scroll
287
+ > .ant-table-header {
285
288
  overflow: auto;
286
289
  }
287
- .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body {
290
+ .ant-table-small
291
+ > .ant-table-content
292
+ > .ant-table-scroll
293
+ > .ant-table-body {
288
294
  overflow: auto !important;
289
295
  }
290
296
  .ant-table-small
@@ -292,7 +298,7 @@
292
298
  > .ant-table-fixed-right
293
299
  > .ant-table-body-outer
294
300
  > .ant-table-body-inner {
295
- margin-top: -2px;
301
+ // margin-top: -2px;
296
302
  overflow: auto !important;
297
303
  }
298
304
  .ant-table-small
@@ -300,7 +306,7 @@
300
306
  > .ant-table-fixed-left
301
307
  > .ant-table-body-outer
302
308
  > .ant-table-body-inner {
303
- margin-top: -2px;
309
+ // margin-top: -2px;
304
310
  overflow: auto !important;
305
311
  }
306
312
  .ant-table-small
@@ -342,47 +348,53 @@
342
348
  .ant-table-small > .ant-table-content > .ant-table-fixed-left {
343
349
  height: 100%;
344
350
  }
345
- .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-header {
346
- border-bottom: 1px solid #e8e8e8;
347
- border-left: 1px solid #e8e8e8;
348
- }
349
- .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-header {
350
- border-right: 1px solid #e8e8e8;
351
- border-bottom: 1px solid #e8e8e8;
352
- border-left: 1px solid #e8e8e8;
353
- }
354
351
  .ant-table-small
355
352
  > .ant-table-content
356
- > .ant-table-fixed-left
357
- .ant-table-tbody
358
- > tr
359
- > td:last-child {
360
- border-right: 1px solid #e8e8e8 !important;
353
+ > .ant-table-fixed-right
354
+ > .ant-table-header {
355
+ // border-bottom: 1px solid #e8e8e8;
356
+ border-left: 1px solid #e8e8e8;
361
357
  }
362
358
  .ant-table-small
363
359
  > .ant-table-content
364
360
  > .ant-table-fixed-left
365
- > .ant-table-body-outer
366
- .ant-table-fixed {
361
+ > .ant-table-header {
367
362
  border-right: 1px solid #e8e8e8;
368
- border-left: 1px solid #e8e8e8;
363
+ // border-bottom: 1px solid #e8e8e8;
364
+ // border-left: 1px solid #e8e8e8;
369
365
  }
370
366
  .ant-table-small
371
367
  > .ant-table-content
372
368
  > .ant-table-fixed-left
373
369
  .ant-table-tbody
374
- > tr:first-child
375
- > td {
376
- border-top: 1px solid #e8e8e8;
377
- }
378
- .ant-table-small
379
- > .ant-table-content
380
- > .ant-table-fixed-right
381
- .ant-table-tbody
382
- > tr:first-child
383
- > td {
384
- border-top: 1px solid #e8e8e8;
370
+ > tr
371
+ > td:last-child {
372
+ border-right: 1px solid #e8e8e8 !important;
385
373
  }
374
+ // .ant-table-small
375
+ // > .ant-table-content
376
+ // > .ant-table-fixed-left
377
+ // > .ant-table-body-outer
378
+ // .ant-table-fixed {
379
+ // border-right: 1px solid #e8e8e8;
380
+ // border-left: 1px solid #e8e8e8;
381
+ // }
382
+ // .ant-table-small
383
+ // > .ant-table-content
384
+ // > .ant-table-fixed-left
385
+ // .ant-table-tbody
386
+ // > tr:first-child
387
+ // > td {
388
+ // border-top: 1px solid #e8e8e8;
389
+ // }
390
+ // .ant-table-small
391
+ // > .ant-table-content
392
+ // > .ant-table-fixed-right
393
+ // .ant-table-tbody
394
+ // > tr:first-child
395
+ // > td {
396
+ // border-top: 1px solid #e8e8e8;
397
+ // }
386
398
  .ant-table-small
387
399
  > .ant-table-content
388
400
  > .ant-table-fixed-right
@@ -402,6 +414,7 @@
402
414
  z-index: 3;
403
415
  height: 12px !important;
404
416
  opacity: 1 !important;
417
+ bottom: 1px !important;
405
418
  }
406
419
  .ant-table-small
407
420
  > .ant-table-content
@@ -414,6 +427,7 @@
414
427
  z-index: 3;
415
428
  width: 12px !important;
416
429
  height: auto !important;
430
+ right: 1px !important;
417
431
  }
418
432
  .ant-table-small
419
433
  > .ant-table-content
@@ -426,6 +440,15 @@
426
440
  + div {
427
441
  display: none;
428
442
  }
443
+
444
+ .ant-table-small
445
+ > .ant-table-content
446
+ > .ant-table-fixed-right
447
+ > .ant-table-body-outer {
448
+ margin-right: 14px !important;
449
+ border-right: 1px solid #e8e8e8 !important;
450
+ }
451
+
429
452
  .ant-table-scroll table .ant-table-fixed-columns-in-body {
430
453
  visibility: visible !important;
431
454
  }
@@ -418,7 +418,9 @@ var getColumns = exports.getColumns = function getColumns(columns, actionColumns
418
418
  }
419
419
  }
420
420
  if (item.fixed && !item.closeOverflow) {
421
- var styleObj = { width: item.width ? parseInt(item.width, 10) - 16 : null };
421
+ var styleObj = {
422
+ width: item.width ? parseInt(item.width, 10) - 16 : null
423
+ };
422
424
  item.render = handelPopoverDom(item, closeAdjustColumnWidth, styleObj);
423
425
  }
424
426
  return item;
@@ -431,11 +433,15 @@ var getColumns = exports.getColumns = function getColumns(columns, actionColumns
431
433
  if (item.minWidth) {
432
434
  item.width = parseInt(item.minWidth, 10);
433
435
  }
434
- if (!item.render || !item.closeOverflow) {
436
+ if (item.cacheFixed) {
437
+ item.fixed = item.cacheFixed;
438
+ } else if (!item.render || !item.closeOverflow) {
435
439
  item.render = handelPopoverDom(item, closeAdjustColumnWidth);
436
440
  }
437
441
  if (item.fixed && !item.closeOverflow) {
438
- var styleObj = { width: item.width ? parseInt(item.width, 10) - 16 : null };
442
+ var styleObj = {
443
+ width: item.width ? parseInt(item.width, 10) - 16 : null
444
+ };
439
445
  item.render = handelPopoverDom(item, closeAdjustColumnWidth, styleObj);
440
446
  }
441
447
  return item;
@@ -457,11 +463,15 @@ var getColumns = exports.getColumns = function getColumns(columns, actionColumns
457
463
  if (item.dataIndex && item.dataIndex !== 'rowId' && item.title !== '序号' && item.dataIndex !== 'ACTION' && !item.resizeWidth) {
458
464
  item.width = parseInt(item.width, 10) + parseInt(elseWidth * parseInt(item.minWidth, 10) / fieldAllWidth, 10);
459
465
  }
460
- if (!item.render || !item.closeOverflow) {
466
+ if (item.cacheFixed) {
467
+ item.fixed = item.cacheFixed;
468
+ } else if (!item.render || !item.closeOverflow) {
461
469
  item.render = handelPopoverDom(item, closeAdjustColumnWidth);
462
470
  }
463
471
  if (item.fixed && !item.closeOverflow) {
464
- var styleObj = { width: item.width ? parseInt(item.width, 10) - 16 : null };
472
+ var styleObj = {
473
+ width: item.width ? parseInt(item.width, 10) - 16 : null
474
+ };
465
475
  item.render = handelPopoverDom(item, closeAdjustColumnWidth, styleObj);
466
476
  }
467
477
  return item;
@@ -475,11 +485,15 @@ var getColumns = exports.getColumns = function getColumns(columns, actionColumns
475
485
  // parseInt((elseWidth * parseInt(item.minWidth, 10)) / minAllWidth, 10);
476
486
  item.width = parseInt(elseWidth * parseInt(item.minWidth, 10) / minAllWidth, 10);
477
487
  }
478
- if (!item.render || !item.closeOverflow) {
488
+ if (item.cacheFixed) {
489
+ item.fixed = item.cacheFixed;
490
+ } else if (!item.render || !item.closeOverflow) {
479
491
  item.render = handelPopoverDom(item, closeAdjustColumnWidth);
480
492
  }
481
493
  if (item.fixed && !item.closeOverflow) {
482
- var styleObj = { width: item.width ? parseInt(item.width, 10) - 16 : null };
494
+ var styleObj = {
495
+ width: item.width ? parseInt(item.width, 10) - 16 : null
496
+ };
483
497
  item.render = handelPopoverDom(item, closeAdjustColumnWidth, styleObj);
484
498
  }
485
499
  return item;
@@ -616,7 +630,12 @@ var getActions = exports.getActions = function getActions(actions, data, actionL
616
630
  key: 'ACTION',
617
631
  closeOverflow: true,
618
632
  render: function render(text, record, index) {
619
- return _react2.default.createElement(_action2.default, { action: newActions, record: record, key: index, actionLength: actionLength });
633
+ return _react2.default.createElement(_action2.default, {
634
+ action: newActions,
635
+ record: record,
636
+ key: index,
637
+ actionLength: actionLength
638
+ });
620
639
  }
621
640
  };
622
641
  };
@@ -45,10 +45,6 @@ var _button = require('antd/lib/button');
45
45
 
46
46
  var _button2 = _interopRequireDefault(_button);
47
47
 
48
- var _select = require('antd/lib/select');
49
-
50
- var _select2 = _interopRequireDefault(_select);
51
-
52
48
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
53
49
 
54
50
  var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -85,6 +81,10 @@ var _input = require('antd/lib/input');
85
81
 
86
82
  var _input2 = _interopRequireDefault(_input);
87
83
 
84
+ var _select = require('antd/lib/select');
85
+
86
+ var _select2 = _interopRequireDefault(_select);
87
+
88
88
  require('antd/lib/message/style');
89
89
 
90
90
  require('antd/lib/table/style');
@@ -99,10 +99,10 @@ require('antd/lib/radio/style');
99
99
 
100
100
  require('antd/lib/button/style');
101
101
 
102
- require('antd/lib/select/style');
103
-
104
102
  require('antd/lib/input/style');
105
103
 
104
+ require('antd/lib/select/style');
105
+
106
106
  var _react = require('react');
107
107
 
108
108
  var _react2 = _interopRequireDefault(_react);
@@ -111,10 +111,6 @@ var _reactCustomScrollbars = require('react-custom-scrollbars');
111
111
 
112
112
  var _NHCore = require('../../utils/NHCore');
113
113
 
114
- var _action = require('./action.js');
115
-
116
- var _action2 = _interopRequireDefault(_action);
117
-
118
114
  var _expexcel = require('./expexcel.js');
119
115
 
120
116
  var _expexcel2 = _interopRequireDefault(_expexcel);
@@ -151,12 +147,13 @@ var _marqueenText2 = _interopRequireDefault(_marqueenText);
151
147
 
152
148
  var _reactResizable = require('react-resizable');
153
149
 
154
- var _virtuallistAntd = require('virtuallist-antd');
155
-
156
150
  var _data = require('./data.js');
157
151
 
158
152
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
159
153
 
154
+ var Option = _select2.default.Option;
155
+ // import { VList } from 'virtuallist-antd';
156
+
160
157
  var Search = _input2.default.Search;
161
158
  var loadCount = 0;
162
159
  /*
@@ -243,7 +240,11 @@ var KyTable = function (_React$Component) {
243
240
  columns = this.state.params.columns;
244
241
  }
245
242
 
246
- var commonSearchParams = this.getCommonSearch({ columns: columns, searchDivFlag: searchDivFlag, searchDefaultField: searchDefaultField });
243
+ var commonSearchParams = this.getCommonSearch({
244
+ columns: columns,
245
+ searchDivFlag: searchDivFlag,
246
+ searchDefaultField: searchDefaultField
247
+ });
247
248
 
248
249
  if ((0, _keys2.default)(commonSearchParams).length > 0) {
249
250
  updateState['tySearchAllField'] = commonSearchParams.tySearchAllField;
@@ -798,12 +799,20 @@ var KyTable = function (_React$Component) {
798
799
  }),
799
800
  _react2.default.createElement(
800
801
  _button2.default,
801
- { type: 'primary', style: { margin: '0 8px 0 12px' }, onClick: this.onSearch },
802
+ {
803
+ type: 'primary',
804
+ style: { margin: '0 8px 0 12px' },
805
+ onClick: this.onSearch
806
+ },
802
807
  '\u67E5\u8BE2'
803
808
  ),
804
809
  _react2.default.createElement(
805
810
  _button2.default,
806
- { type: 'Default', style: { paddingLeft: 15 }, onClick: this.onRest },
811
+ {
812
+ type: 'Default',
813
+ style: { paddingLeft: 15 },
814
+ onClick: this.onRest
815
+ },
807
816
  '\u91CD\u7F6E'
808
817
  ),
809
818
  _react2.default.createElement(
@@ -812,7 +821,10 @@ var KyTable = function (_React$Component) {
812
821
  onClick: function onClick() {
813
822
  return _this3.setState({ highSearch: true, searchParams: {} });
814
823
  },
815
- style: { marginLeft: 10, display: showAdvancBtn ? 'inline' : 'none' }
824
+ style: {
825
+ marginLeft: 10,
826
+ display: showAdvancBtn ? 'inline' : 'none'
827
+ }
816
828
  },
817
829
  '[\u9AD8\u7EA7\u641C\u7D22]'
818
830
  )
@@ -855,6 +867,7 @@ var KyTable = function (_React$Component) {
855
867
  )
856
868
  )
857
869
  ),
870
+
858
871
  // 多行配置
859
872
  searchList && searchList.length > 1 && _react2.default.createElement(
860
873
  'div',
@@ -895,6 +908,7 @@ var KyTable = function (_React$Component) {
895
908
  );
896
909
  })
897
910
  ),
911
+
898
912
  // 只有一行的配置
899
913
  this.props.children || searchList && searchList.length === 1 ? _react2.default.createElement(
900
914
  'div',
@@ -940,7 +954,10 @@ var KyTable = function (_React$Component) {
940
954
  searchList[0].list.map(function (row, index) {
941
955
  return _react2.default.createElement(
942
956
  _radio2.default.Button,
943
- { value: row.value, key: row.value },
957
+ {
958
+ value: row.value,
959
+ key: row.value
960
+ },
944
961
  row.text
945
962
  );
946
963
  })
@@ -1013,8 +1030,8 @@ var KyTable = function (_React$Component) {
1013
1030
  ),
1014
1031
  _react2.default.createElement(
1015
1032
  'style',
1016
- { jsx: 'true', global: 'true' },
1017
- '\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-scroll\n > .ant-table-body\n > div\n > div:first-child\n > table {\n margin-bottom: ' + columnsCfg.bodyContentMarginBottom + 'px;\n }\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-fixed-left\n > .ant-table-body-outer\n > .ant-table-body-inner\n > div\n > div:first-child\n > table {\n margin-bottom: 12px;\n }\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-fixed-right\n > .ant-table-body-outer\n > .ant-table-body-inner\n > div\n > div:first-child\n > table {\n margin-bottom: 12px;\n }\n '
1033
+ { jsx: "true", global: "true" },
1034
+ '\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-scroll\n > .ant-table-body\n > div\n > div:first-child\n > table,\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-fixed-left\n > .ant-table-body-outer\n > .ant-table-body-inner\n > div\n > div:first-child\n > table,\n .ky-nhTable\n .ant-table-small\n > .ant-table-content\n > .ant-table-fixed-right\n > .ant-table-body-outer\n > .ant-table-body-inner\n > div\n > div:first-child\n > table {\n margin-bottom: ' + columnsCfg.bodyContentMarginBottom + 'px;\n }\n '
1018
1035
  )
1019
1036
  );
1020
1037
  }
@@ -1337,7 +1354,7 @@ var _initialiseProps = function _initialiseProps() {
1337
1354
  });
1338
1355
  }
1339
1356
 
1340
- var colSpanDom = document.getElementsByClassName(_this4.state.className)[0] ? document.getElementsByClassName(_this4.state.className)[0].querySelectorAll('.ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr > th[colspan]') : "";
1357
+ var colSpanDom = document.getElementsByClassName(_this4.state.className)[0] ? document.getElementsByClassName(_this4.state.className)[0].querySelectorAll('.ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr > th[colspan]') : '';
1341
1358
  if (colSpanDom && colSpanDom.length > 0 && !_this4.props.bordered) {
1342
1359
  // 存在二级表头的内容
1343
1360
  for (var i = 0; i < colSpanDom.length; i++) {
@@ -1669,10 +1686,9 @@ var _initialiseProps = function _initialiseProps() {
1669
1686
  sqlParams: sqlParams,
1670
1687
  initParams: initParams,
1671
1688
  sign: _this4.props.sign
1672
- };
1673
1689
 
1674
- //如果启用职位范围过滤
1675
- if (rangeFilter) {
1690
+ //如果启用职位范围过滤
1691
+ };if (rangeFilter) {
1676
1692
  var userId = (0, _NHCore.getLoginUser)() ? (0, _NHCore.getLoginUser)().userId : '';
1677
1693
  params.rangeFilter = { id: userId };
1678
1694
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlt-for-react",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {