ronds-metadata 1.0.70 → 1.0.73
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.
@@ -6,7 +6,9 @@ import React from 'react';
|
|
6
6
|
import { EditableContext } from '../interface';
|
7
7
|
|
8
8
|
var EditableRow = function EditableRow(props) {
|
9
|
-
var record = props.record
|
9
|
+
var record = props.record,
|
10
|
+
index = props.index,
|
11
|
+
className = props.className;
|
10
12
|
|
11
13
|
var _Form$useForm = _Form.useForm(),
|
12
14
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
@@ -40,6 +42,7 @@ var EditableRow = function EditableRow(props) {
|
|
40
42
|
onValuesChange: onValuesChange,
|
41
43
|
component: false
|
42
44
|
}, /*#__PURE__*/React.createElement("tr", _extends({}, props, {
|
45
|
+
className: "".concat(className, " ").concat(index % 2 === 0 ? 'ant-table-row--even' : 'ant-table-row--odd'),
|
43
46
|
style: {
|
44
47
|
height: '30px'
|
45
48
|
}
|
@@ -13,6 +13,7 @@
|
|
13
13
|
.ronds-edit-table .ant-table-cell,
|
14
14
|
.ronds-edit-table .ant-table-row {
|
15
15
|
height: 30px;
|
16
|
+
padding: 0px 8px !important;
|
16
17
|
}
|
17
18
|
.ronds-edit-table .ant-table-body {
|
18
19
|
overflow-y: auto !important;
|
@@ -29,16 +30,8 @@
|
|
29
30
|
word-wrap: break-word;
|
30
31
|
word-break: break-all;
|
31
32
|
}
|
32
|
-
.ronds-edit-table .ant-table.ant-table-small .ant-table-title,
|
33
|
-
.ronds-edit-table .ant-table.ant-table-small .ant-table-footer,
|
34
|
-
.ronds-edit-table .ant-table.ant-table-small .ant-table-thead > tr > th,
|
35
|
-
.ronds-edit-table .ant-table.ant-table-small .ant-table-tbody > tr > td,
|
36
|
-
.ronds-edit-table .ant-table.ant-table-small tfoot > tr > th,
|
37
|
-
.ronds-edit-table .ant-table.ant-table-small tfoot > tr > td {
|
38
|
-
padding: 4px 8px;
|
39
|
-
}
|
40
33
|
.ronds-edit-table .ant-table.ant-table-bordered > .ant-table-container {
|
41
|
-
border: 1px solid #f0f0f0;
|
34
|
+
border-bottom: 1px solid #f0f0f0;
|
42
35
|
}
|
43
36
|
.ronds-edit-table .ant-table .ant-table-expanded-row-fixed {
|
44
37
|
padding: 0% !important;
|
@@ -31,6 +31,7 @@ var Editable = function Editable(props) {
|
|
31
31
|
addPosition = _props$addPosition === void 0 ? 'bottom' : _props$addPosition,
|
32
32
|
_props$isAddColumn = props.isAddColumn,
|
33
33
|
isAddColumn = _props$isAddColumn === void 0 ? false : _props$isAddColumn,
|
34
|
+
whiteColumn = props.whiteColumn,
|
34
35
|
tableProps = props.tableProps,
|
35
36
|
onRowConfirm = props.onRowConfirm,
|
36
37
|
onRowDelete = props.onRowDelete,
|
@@ -232,6 +233,13 @@ var Editable = function Editable(props) {
|
|
232
233
|
var processDeleteColumnsData = function processDeleteColumnsData(data) {
|
233
234
|
var _columns = addColumnsRef.current.length > 0 ? addColumnsRef.current : columns;
|
234
235
|
|
236
|
+
if (whiteColumn.findIndex(function (v) {
|
237
|
+
return v === data.dataIndex;
|
238
|
+
}) > -1) {
|
239
|
+
// message.warning(`${data.dataIndex}无法删除`);
|
240
|
+
return;
|
241
|
+
}
|
242
|
+
|
235
243
|
_columns = _columns.filter(function (v) {
|
236
244
|
return v.dataIndex != data.dataIndex;
|
237
245
|
});
|
@@ -28,6 +28,7 @@ export interface EditableHeardCellProps extends React.HTMLAttributes<HTMLElement
|
|
28
28
|
export interface EditableRowProps extends React.HTMLAttributes<HTMLElement> {
|
29
29
|
rowIndex: number;
|
30
30
|
record?: any;
|
31
|
+
index?: any;
|
31
32
|
}
|
32
33
|
export declare type InputType = 'bool' | 'number' | 'text' | 'enum' | string;
|
33
34
|
export interface EditColumnsType extends ColumnsType<any> {
|