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.
@@ -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(_Divider, {
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
- title: '确定'
74
- }), /*#__PURE__*/React.createElement(_Divider, {
75
- type: "vertical"
76
- }), editConfig.type === 'edit' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
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
- title: '取消'
82
- }), /*#__PURE__*/React.createElement(_Divider, {
83
- type: "vertical"
84
- })))), 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, {
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
- title: '确定'
90
- }), /*#__PURE__*/React.createElement(_Divider, {
91
- type: "vertical"
92
- }))), /*#__PURE__*/React.createElement(_Popconfirm, {
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
- size: "small",
104
- icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
105
- title: '删除'
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; // console.log('EditableCell', props, 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' : '', " ")
@@ -40,3 +40,7 @@
40
40
  .ronds-edit-table .ant-table.ant-table-bordered > .ant-table-container {
41
41
  border: 1px solid #f0f0f0;
42
42
  }
43
+ .ronds-edit-table .ant-table .ant-table-expanded-row-fixed {
44
+ padding: 0% !important;
45
+ margin: 0% !important;
46
+ }
@@ -9,6 +9,7 @@ export interface EditableCellProps extends React.HTMLAttributes<HTMLElement> {
9
9
  isAddColumn: boolean;
10
10
  rowIndex: number;
11
11
  record: any;
12
+ colSpan?: number;
12
13
  type: InputType;
13
14
  editableType: 'single' | 'multiple' | 'freedom';
14
15
  enum?: {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author: wangxian
3
3
  * @Date: 2022-03-04 15:07:57
4
- * @LastEditTime: 2022-03-10 13:49:40
4
+ * @LastEditTime: 2022-04-15 10:23:17
5
5
  */
6
6
  import React from 'react';
7
7
  export var EditableContext = /*#__PURE__*/React.createContext(null);
@@ -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-02 17:19:55
8
+ * @LastEditTime: 2022-04-15 10:50:40
9
9
  */
10
10
  import React from 'react';
11
11
  import Input from './DataCell/Input';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.0.67",
4
+ "version": "1.0.70",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",