ronds-metadata 1.0.48 → 1.0.49
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.
@@ -8,8 +8,7 @@ import { EditableContext } from '../interface';
|
|
8
8
|
|
9
9
|
var EditableAction = function EditableAction(props) {
|
10
10
|
var type = props.type,
|
11
|
-
record = props.record
|
12
|
-
defaultValue = props.defaultValue;
|
11
|
+
record = props.record;
|
13
12
|
|
14
13
|
var _ref = React.useContext(EditableContext) || undefined,
|
15
14
|
editableStream = _ref.editableStream,
|
@@ -70,13 +69,7 @@ var EditableAction = function EditableAction(props) {
|
|
70
69
|
title: '取消'
|
71
70
|
}), /*#__PURE__*/React.createElement(_Divider, {
|
72
71
|
type: "vertical"
|
73
|
-
}))), /*#__PURE__*/React.createElement(_Button, {
|
74
|
-
type: "link",
|
75
|
-
size: "small",
|
76
|
-
icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
|
77
|
-
onClick: onDelete,
|
78
|
-
title: '删除'
|
79
|
-
})), type !== 'single' && defaultValue && /*#__PURE__*/React.createElement(_Button, {
|
72
|
+
})))), /*#__PURE__*/React.createElement(_Button, {
|
80
73
|
type: "link",
|
81
74
|
size: "small",
|
82
75
|
icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
|
@@ -50,6 +50,14 @@ var EditableCell = function EditableCell(props) {
|
|
50
50
|
rowIndex: undefined
|
51
51
|
}
|
52
52
|
});
|
53
|
+
editableStream.next({
|
54
|
+
type: 'onValuesChange',
|
55
|
+
payload: {
|
56
|
+
rowIdx: record === null || record === void 0 ? void 0 : record._rowKey_,
|
57
|
+
values: {},
|
58
|
+
allValues: record
|
59
|
+
}
|
60
|
+
});
|
53
61
|
}
|
54
62
|
|
55
63
|
if (isAddColumn) {
|
@@ -286,12 +286,16 @@ var Editable = function Editable(props) {
|
|
286
286
|
render: function render(val, record) {
|
287
287
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditableAction, {
|
288
288
|
type: type,
|
289
|
-
record: record
|
290
|
-
defaultValue: defaultValue
|
289
|
+
record: record
|
291
290
|
}));
|
292
291
|
}
|
293
292
|
};
|
294
|
-
|
293
|
+
|
294
|
+
if (type === 'single') {
|
295
|
+
res.push(_aciton_);
|
296
|
+
} else if (defaultValue) {
|
297
|
+
res.push(_aciton_);
|
298
|
+
}
|
295
299
|
}
|
296
300
|
|
297
301
|
return res;
|