easy3wui 1.5.64-beta.4 → 1.5.64-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/editBigTable.css +28 -0
- package/assets/index.css +28 -0
- package/lib/Easy3wDownLoad/Easy3wRCView.js +12 -7
- package/lib/Easy3wEditBigTable/index.js +30 -10
- package/package.json +1 -1
package/assets/editBigTable.css
CHANGED
|
@@ -44,3 +44,31 @@
|
|
|
44
44
|
padding: 4px;
|
|
45
45
|
font-size: 14px;
|
|
46
46
|
}
|
|
47
|
+
.Easy3wEditBigTable .textEditor {
|
|
48
|
+
-webkit-appearance: none;
|
|
49
|
+
-moz-appearance: none;
|
|
50
|
+
appearance: none;
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
inline-size: 100%;
|
|
53
|
+
block-size: 100%;
|
|
54
|
+
padding-block: 0;
|
|
55
|
+
padding-inline: 6px;
|
|
56
|
+
border: 2px solid #ccc;
|
|
57
|
+
vertical-align: top;
|
|
58
|
+
color: var(--rdg-color);
|
|
59
|
+
background-color: var(--rdg-background-color);
|
|
60
|
+
font-family: inherit;
|
|
61
|
+
font-size: var(--rdg-font-size);
|
|
62
|
+
}
|
|
63
|
+
.Easy3wEditBigTable .textEditor:focus {
|
|
64
|
+
border-color: var(--rdg-selection-color);
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
.Easy3wEditBigTable .textEditor:-ms-input-placeholder {
|
|
68
|
+
color: #999;
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
.Easy3wEditBigTable .textEditor::placeholder {
|
|
72
|
+
color: #999;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
package/assets/index.css
CHANGED
|
@@ -1528,3 +1528,31 @@ input.ant-input-number-input {
|
|
|
1528
1528
|
padding: 4px;
|
|
1529
1529
|
font-size: 14px;
|
|
1530
1530
|
}
|
|
1531
|
+
.Easy3wEditBigTable .textEditor {
|
|
1532
|
+
-webkit-appearance: none;
|
|
1533
|
+
-moz-appearance: none;
|
|
1534
|
+
appearance: none;
|
|
1535
|
+
box-sizing: border-box;
|
|
1536
|
+
inline-size: 100%;
|
|
1537
|
+
block-size: 100%;
|
|
1538
|
+
padding-block: 0;
|
|
1539
|
+
padding-inline: 6px;
|
|
1540
|
+
border: 2px solid #ccc;
|
|
1541
|
+
vertical-align: top;
|
|
1542
|
+
color: var(--rdg-color);
|
|
1543
|
+
background-color: var(--rdg-background-color);
|
|
1544
|
+
font-family: inherit;
|
|
1545
|
+
font-size: var(--rdg-font-size);
|
|
1546
|
+
}
|
|
1547
|
+
.Easy3wEditBigTable .textEditor:focus {
|
|
1548
|
+
border-color: var(--rdg-selection-color);
|
|
1549
|
+
outline: none;
|
|
1550
|
+
}
|
|
1551
|
+
.Easy3wEditBigTable .textEditor:-ms-input-placeholder {
|
|
1552
|
+
color: #999;
|
|
1553
|
+
opacity: 1;
|
|
1554
|
+
}
|
|
1555
|
+
.Easy3wEditBigTable .textEditor::placeholder {
|
|
1556
|
+
color: #999;
|
|
1557
|
+
opacity: 1;
|
|
1558
|
+
}
|
|
@@ -27,16 +27,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
|
|
|
27
27
|
var Easy3wRCView = function (_PureComponent) {
|
|
28
28
|
(0, _inherits3['default'])(Easy3wRCView, _PureComponent);
|
|
29
29
|
|
|
30
|
-
function Easy3wRCView() {
|
|
30
|
+
function Easy3wRCView(props) {
|
|
31
31
|
(0, _classCallCheck3['default'])(this, Easy3wRCView);
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _PureComponent.call(this, props));
|
|
34
|
+
|
|
35
|
+
_this.viewerRef = _react2['default'].createRef(); // 创建 ref
|
|
36
|
+
return _this;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
Easy3wRCView.prototype.componentDidUpdate = function componentDidUpdate() {
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
var viewer = this.viewerRef.current; // 使用 ref 的 current 属性
|
|
41
|
+
if (viewer) {
|
|
42
|
+
viewer.show();
|
|
43
|
+
}
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
Easy3wRCView.prototype.render = function render() {
|
|
@@ -52,7 +56,8 @@ var Easy3wRCView = function (_PureComponent) {
|
|
|
52
56
|
hide: hideModal
|
|
53
57
|
}
|
|
54
58
|
// eslint-disable-next-line react/no-string-refs
|
|
55
|
-
|
|
59
|
+
// ref="viewer"
|
|
60
|
+
, ref: this.viewerRef // 使用回调 ref 或 createRef
|
|
56
61
|
},
|
|
57
62
|
_react2['default'].createElement('img', { style: { display: 'none' }, src: imgUrl, alt: '' })
|
|
58
63
|
);
|
|
@@ -34,6 +34,8 @@ var _reactDataGrid = require('react-data-grid');
|
|
|
34
34
|
|
|
35
35
|
var _reactDataGrid2 = _interopRequireDefault(_reactDataGrid);
|
|
36
36
|
|
|
37
|
+
require('react-data-grid/lib/styles.css');
|
|
38
|
+
|
|
37
39
|
var _reactDataGridAddons = require('react-data-grid-addons');
|
|
38
40
|
|
|
39
41
|
var _xlsx = require('xlsx');
|
|
@@ -54,8 +56,7 @@ var _Easy3wEditBigTableForm2 = _interopRequireDefault(_Easy3wEditBigTableForm);
|
|
|
54
56
|
|
|
55
57
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
56
58
|
|
|
57
|
-
/* eslint-disable no-alert */
|
|
58
|
-
var Selectors = _reactDataGridAddons.Data.Selectors;
|
|
59
|
+
var Selectors = _reactDataGridAddons.Data.Selectors; /* eslint-disable no-alert */
|
|
59
60
|
|
|
60
61
|
var Easy3wEditBigTable = function (_Component) {
|
|
61
62
|
(0, _inherits3['default'])(Easy3wEditBigTable, _Component);
|
|
@@ -556,6 +557,19 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
556
557
|
});
|
|
557
558
|
};
|
|
558
559
|
|
|
560
|
+
_this.touchRowsChange = function (updatedRows, _ref3) {
|
|
561
|
+
var indexes = _ref3.indexes,
|
|
562
|
+
column = _ref3.column;
|
|
563
|
+
}
|
|
564
|
+
// const { cellKey, toRowData, updated } = objUpdated;
|
|
565
|
+
// const { cellKey }
|
|
566
|
+
// const touchAutoCompute
|
|
567
|
+
|
|
568
|
+
// #endregion 表单编辑
|
|
569
|
+
|
|
570
|
+
// #region 行选择
|
|
571
|
+
;
|
|
572
|
+
|
|
559
573
|
_this.touchSelectedRowsChange = function (selectedRows) {
|
|
560
574
|
var rowKey = _this.props.rowKey;
|
|
561
575
|
|
|
@@ -596,9 +610,9 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
596
610
|
Easy3wEditBigTable.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
597
611
|
var objToolbarProps = this.props.objToolbarProps;
|
|
598
612
|
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
unloadSaveFlag =
|
|
613
|
+
var _ref4 = objToolbarProps || {},
|
|
614
|
+
_ref4$unloadSaveFlag = _ref4.unloadSaveFlag,
|
|
615
|
+
unloadSaveFlag = _ref4$unloadSaveFlag === undefined ? true : _ref4$unloadSaveFlag;
|
|
602
616
|
// unloadSaveFlag 是否在卸载后保存 true 需要保存 false 不需要保存
|
|
603
617
|
|
|
604
618
|
|
|
@@ -685,7 +699,7 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
685
699
|
|
|
686
700
|
// #endregion 保存
|
|
687
701
|
|
|
688
|
-
// #region
|
|
702
|
+
// #region 表单编辑
|
|
689
703
|
|
|
690
704
|
|
|
691
705
|
// #endregion 行选择
|
|
@@ -702,11 +716,11 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
702
716
|
selectedRows = _state.selectedRows;
|
|
703
717
|
var _props = this.props,
|
|
704
718
|
columns = _props.columns,
|
|
705
|
-
rows = _props.rows,
|
|
706
719
|
objToolbarProps = _props.objToolbarProps,
|
|
707
720
|
rowKey = _props.rowKey,
|
|
708
721
|
topTotalFlag = _props.topTotalFlag,
|
|
709
|
-
bottomTotalFlag = _props.bottomTotalFlag
|
|
722
|
+
bottomTotalFlag = _props.bottomTotalFlag,
|
|
723
|
+
objOtherProps = _props.objOtherProps;
|
|
710
724
|
// #region 表格数据处理,排序(sort)、筛选(filter)
|
|
711
725
|
|
|
712
726
|
this.arrRows = this.touchDP();
|
|
@@ -727,7 +741,10 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
727
741
|
objToolbarProps ? this.getToolbar() : '',
|
|
728
742
|
_react2['default'].createElement(_reactDataGrid2['default'], (0, _extends5['default'])({}, objPrps, {
|
|
729
743
|
columns: columns // 表头
|
|
730
|
-
,
|
|
744
|
+
, defaultColumnOptions: {
|
|
745
|
+
resizable: true // 可调整列宽
|
|
746
|
+
},
|
|
747
|
+
rows: this.arrRows // 行数据
|
|
731
748
|
, headerRowHeight: objFilters.enabled ? 70 : undefined // 表头高度
|
|
732
749
|
// 排序
|
|
733
750
|
, sortColumns: sortColumns // 排序字段
|
|
@@ -738,7 +755,10 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
738
755
|
},
|
|
739
756
|
selectedRows: selectedRows,
|
|
740
757
|
onSelectedRowsChange: this.touchSelectedRowsChange
|
|
741
|
-
|
|
758
|
+
// 表格编辑时触发
|
|
759
|
+
// onRowsChange={rows => this.saveEditBigTableModelZJ('onSelectedRowsChange', rows)}
|
|
760
|
+
, onRowsChange: this.touchRowsChange
|
|
761
|
+
}, objOtherProps)),
|
|
742
762
|
visible ? _react2['default'].createElement(_Easy3wEditBigTableForm2['default'] // 批量录入Modal
|
|
743
763
|
, { visible: visible // 是否显示
|
|
744
764
|
, objOtherParameters: {
|