dlt-for-react 1.1.5 → 1.1.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/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.6
12
12
 
13
13
  ##### 安装依赖
14
14
 
@@ -16,6 +16,10 @@ npm publish
16
16
 
17
17
  ##### 版本修改记录
18
18
 
19
+ #### V1.1.6—2023 年 11 月 22 日
20
+
21
+ 1. 解决KyTable存在二级表头时,无法固定操作列的问题
22
+
19
23
  #### V1.1.5—2023 年 11 月 22 日
20
24
 
21
25
  1. 修改getSizebug
@@ -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
  })
@@ -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.6",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {