ronds-metadata 1.0.47 → 1.0.48
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,7 +8,8 @@ import { EditableContext } from '../interface';
|
|
8
8
|
|
9
9
|
var EditableAction = function EditableAction(props) {
|
10
10
|
var type = props.type,
|
11
|
-
record = props.record
|
11
|
+
record = props.record,
|
12
|
+
defaultValue = props.defaultValue;
|
12
13
|
|
13
14
|
var _ref = React.useContext(EditableContext) || undefined,
|
14
15
|
editableStream = _ref.editableStream,
|
@@ -69,7 +70,13 @@ var EditableAction = function EditableAction(props) {
|
|
69
70
|
title: '取消'
|
70
71
|
}), /*#__PURE__*/React.createElement(_Divider, {
|
71
72
|
type: "vertical"
|
72
|
-
})))
|
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, {
|
73
80
|
type: "link",
|
74
81
|
size: "small",
|
75
82
|
icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
|
@@ -286,7 +286,8 @@ 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
|
289
|
+
record: record,
|
290
|
+
defaultValue: defaultValue
|
290
291
|
}));
|
291
292
|
}
|
292
293
|
};
|
@@ -373,7 +374,7 @@ var Editable = function Editable(props) {
|
|
373
374
|
index: index
|
374
375
|
};
|
375
376
|
}
|
376
|
-
})), (type === 'multiple' || type === 'freedom') && !readonly && /*#__PURE__*/React.createElement(_Button, {
|
377
|
+
})), (type === 'multiple' || type === 'freedom') && !readonly && defaultValue && /*#__PURE__*/React.createElement(_Button, {
|
377
378
|
block: true,
|
378
379
|
type: "dashed",
|
379
380
|
style: {
|