ronds-metadata 1.0.67 → 1.0.70
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/es/comps/Editable/comps/EditableAction.js +25 -29
- package/es/comps/Editable/comps/EditableCell.js +10 -2
- package/es/comps/Editable/index.css +4 -0
- package/es/comps/Editable/interface.d.ts +1 -0
- package/es/comps/Editable/interface.js +1 -1
- package/es/comps/MetadataForm/utils.js +1 -1
- package/package.json +1 -1
@@ -1,10 +1,7 @@
|
|
1
1
|
import "antd/es/popconfirm/style";
|
2
2
|
import _Popconfirm from "antd/es/popconfirm";
|
3
|
-
import "antd/es/divider/style";
|
4
|
-
import _Divider from "antd/es/divider";
|
5
3
|
import "antd/es/button/style";
|
6
4
|
import _Button from "antd/es/button";
|
7
|
-
import { EditOutlined, CloseOutlined, CheckOutlined, DeleteOutlined } from '@ant-design/icons';
|
8
5
|
import React from 'react';
|
9
6
|
import { EditableContext } from '../interface';
|
10
7
|
import { isFreeEditRow } from '../utils';
|
@@ -58,38 +55,36 @@ var EditableAction = function EditableAction(props) {
|
|
58
55
|
|
59
56
|
return /*#__PURE__*/React.createElement(React.Fragment, null, type === 'single' && /*#__PURE__*/React.createElement(React.Fragment, null, editConfig.curRow !== record._rowKey_ && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
60
57
|
type: "link",
|
58
|
+
style: {
|
59
|
+
padding: 0,
|
60
|
+
marginRight: '10px'
|
61
|
+
},
|
61
62
|
disabled: (editConfig.curRow || editConfig.curRow === 0) && editConfig.curRow !== record._rowKey_,
|
62
63
|
size: "small",
|
63
|
-
icon: /*#__PURE__*/React.createElement(EditOutlined, null),
|
64
64
|
onClick: onEdit,
|
65
65
|
title: '编辑'
|
66
|
-
}), /*#__PURE__*/React.createElement(
|
67
|
-
type: "vertical"
|
68
|
-
})), editConfig.curRow === record._rowKey_ && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
66
|
+
}, "\u7F16\u8F91")), editConfig.curRow === record._rowKey_ && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
69
67
|
type: "link",
|
70
|
-
size: "small",
|
71
|
-
icon: /*#__PURE__*/React.createElement(CheckOutlined, null),
|
72
68
|
onClick: onSave,
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
69
|
+
style: {
|
70
|
+
padding: 0,
|
71
|
+
marginRight: '10px'
|
72
|
+
}
|
73
|
+
}, "\u786E\u5B9A"), editConfig.type === 'edit' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
77
74
|
type: "link",
|
78
|
-
size: "small",
|
79
|
-
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
80
75
|
onClick: onCancel,
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
76
|
+
style: {
|
77
|
+
padding: 0,
|
78
|
+
marginRight: '10px'
|
79
|
+
}
|
80
|
+
}, "\u53D6\u6D88")))), type === 'freedom' && /*#__PURE__*/React.createElement(React.Fragment, null, (record._rowKey_ === (editConfig === null || editConfig === void 0 ? void 0 : (_editConfig$editCellK = editConfig.editCellKey) === null || _editConfig$editCellK === void 0 ? void 0 : _editConfig$editCellK.rowIndex) || isFreeEditRow(editConfig.curRow, record._rowKey_)) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
85
81
|
type: "link",
|
86
|
-
size: "small",
|
87
|
-
icon: /*#__PURE__*/React.createElement(CheckOutlined, null),
|
88
82
|
onClick: onSave,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
83
|
+
style: {
|
84
|
+
padding: 0,
|
85
|
+
marginRight: '10px'
|
86
|
+
}
|
87
|
+
}, "\u786E\u5B9A"))), /*#__PURE__*/React.createElement(_Popconfirm, {
|
93
88
|
placement: 'left',
|
94
89
|
title: "\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u6570\u636E\uFF1F",
|
95
90
|
onConfirm: onDelete,
|
@@ -100,10 +95,11 @@ var EditableAction = function EditableAction(props) {
|
|
100
95
|
cancelText: "\u53D6\u6D88"
|
101
96
|
}, /*#__PURE__*/React.createElement(_Button, {
|
102
97
|
type: "link",
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
98
|
+
style: {
|
99
|
+
padding: 0,
|
100
|
+
marginRight: '10px'
|
101
|
+
}
|
102
|
+
}, "\u5220\u9664")));
|
107
103
|
};
|
108
104
|
|
109
105
|
export default EditableAction;
|
@@ -22,8 +22,7 @@ var EditableCell = function EditableCell(props) {
|
|
22
22
|
|
23
23
|
var _ref = React.useContext(EditableContext) || undefined,
|
24
24
|
editableStream = _ref.editableStream,
|
25
|
-
editConfig = _ref.editConfig;
|
26
|
-
|
25
|
+
editConfig = _ref.editConfig;
|
27
26
|
|
28
27
|
var onCellDoubleClick = function onCellDoubleClick() {
|
29
28
|
var _editConfig$editCellK, _editConfig$editCellK2;
|
@@ -63,6 +62,15 @@ var EditableCell = function EditableCell(props) {
|
|
63
62
|
}
|
64
63
|
};
|
65
64
|
|
65
|
+
if (restProps === null || restProps === void 0 ? void 0 : restProps.colSpan) {
|
66
|
+
return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
|
67
|
+
className: "ant-table-cell ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " "),
|
68
|
+
style: {
|
69
|
+
border: 0
|
70
|
+
}
|
71
|
+
}), children);
|
72
|
+
}
|
73
|
+
|
66
74
|
if (editableType === 'single') {
|
67
75
|
return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
|
68
76
|
className: "ant-table-cell ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
|
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
/*
|
6
6
|
* @Author: wangxian
|
7
7
|
* @Date: 2021-09-18 14:15:04
|
8
|
-
* @LastEditTime: 2022-04-
|
8
|
+
* @LastEditTime: 2022-04-15 10:50:40
|
9
9
|
*/
|
10
10
|
import React from 'react';
|
11
11
|
import Input from './DataCell/Input';
|