tntd 1.4.23 → 1.4.24
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/components/Handle/index.js +7 -0
- package/dist/stats.json +5237 -5237
- package/dist/tntd.js +1 -1
- package/es/Handle/README.md +20 -0
- package/es/Handle/index.js +10 -1
- package/lib/Handle/README.md +20 -0
- package/lib/Handle/index.js +10 -1
- package/package.json +1 -1
package/es/Handle/README.md
CHANGED
|
@@ -54,6 +54,26 @@ const Demo = props => {
|
|
|
54
54
|
<a>查看</a>
|
|
55
55
|
<a>编辑</a>
|
|
56
56
|
<a>测试</a>
|
|
57
|
+
{
|
|
58
|
+
false &&
|
|
59
|
+
<a>导入</a>
|
|
60
|
+
}
|
|
61
|
+
<a>导出</a>
|
|
62
|
+
<Popconfirm
|
|
63
|
+
title="Are you sure delete this task?"
|
|
64
|
+
onConfirm={void 0}
|
|
65
|
+
onCancel={void 0}
|
|
66
|
+
okText="Yes"
|
|
67
|
+
cancelText="No"
|
|
68
|
+
onClick={e => e.stopPropagation()}
|
|
69
|
+
getPopupContainer={trigger => trigger.parentNode}
|
|
70
|
+
trigger="hover"
|
|
71
|
+
overlayStyle={{
|
|
72
|
+
width: 300
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<a>Delete</a>
|
|
76
|
+
</Popconfirm>
|
|
57
77
|
</Handle>
|
|
58
78
|
)
|
|
59
79
|
}
|
package/es/Handle/index.js
CHANGED
|
@@ -62,6 +62,14 @@ export default (function (props) {
|
|
|
62
62
|
props = v.props;
|
|
63
63
|
|
|
64
64
|
if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {
|
|
65
|
+
var placement = {};
|
|
66
|
+
|
|
67
|
+
if (lang === 'en' || num && !isNaN(num) && i + 1 > num && !(lessOneMoreFit && newChildren.length - num === 1)) {
|
|
68
|
+
placement = {
|
|
69
|
+
placement: 'left'
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
newChildren[i] = React.cloneElement(v, _objectSpread({
|
|
66
74
|
overlayStyle: {
|
|
67
75
|
width: 180
|
|
@@ -69,7 +77,8 @@ export default (function (props) {
|
|
|
69
77
|
}, (v == null ? void 0 : v.props) || {}, {
|
|
70
78
|
onClick: function onClick(e) {
|
|
71
79
|
return e.stopPropagation();
|
|
72
|
-
}
|
|
80
|
+
}
|
|
81
|
+
}, placement, {
|
|
73
82
|
trigger: 'hover',
|
|
74
83
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
75
84
|
return trigger.parentNode;
|
package/lib/Handle/README.md
CHANGED
|
@@ -54,6 +54,26 @@ const Demo = props => {
|
|
|
54
54
|
<a>查看</a>
|
|
55
55
|
<a>编辑</a>
|
|
56
56
|
<a>测试</a>
|
|
57
|
+
{
|
|
58
|
+
false &&
|
|
59
|
+
<a>导入</a>
|
|
60
|
+
}
|
|
61
|
+
<a>导出</a>
|
|
62
|
+
<Popconfirm
|
|
63
|
+
title="Are you sure delete this task?"
|
|
64
|
+
onConfirm={void 0}
|
|
65
|
+
onCancel={void 0}
|
|
66
|
+
okText="Yes"
|
|
67
|
+
cancelText="No"
|
|
68
|
+
onClick={e => e.stopPropagation()}
|
|
69
|
+
getPopupContainer={trigger => trigger.parentNode}
|
|
70
|
+
trigger="hover"
|
|
71
|
+
overlayStyle={{
|
|
72
|
+
width: 300
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<a>Delete</a>
|
|
76
|
+
</Popconfirm>
|
|
57
77
|
</Handle>
|
|
58
78
|
)
|
|
59
79
|
}
|
package/lib/Handle/index.js
CHANGED
|
@@ -87,6 +87,14 @@ var _default = function _default(props) {
|
|
|
87
87
|
props = v.props;
|
|
88
88
|
|
|
89
89
|
if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {
|
|
90
|
+
var placement = {};
|
|
91
|
+
|
|
92
|
+
if (lang === 'en' || num && !isNaN(num) && i + 1 > num && !(lessOneMoreFit && newChildren.length - num === 1)) {
|
|
93
|
+
placement = {
|
|
94
|
+
placement: 'left'
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
newChildren[i] = _react["default"].cloneElement(v, _objectSpread({
|
|
91
99
|
overlayStyle: {
|
|
92
100
|
width: 180
|
|
@@ -94,7 +102,8 @@ var _default = function _default(props) {
|
|
|
94
102
|
}, (v == null ? void 0 : v.props) || {}, {
|
|
95
103
|
onClick: function onClick(e) {
|
|
96
104
|
return e.stopPropagation();
|
|
97
|
-
}
|
|
105
|
+
}
|
|
106
|
+
}, placement, {
|
|
98
107
|
trigger: 'hover',
|
|
99
108
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
100
109
|
return trigger.parentNode;
|