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.
@@ -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
  }
@@ -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;
@@ -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
  }
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tntd",
3
- "version": "1.4.23",
3
+ "version": "1.4.24",
4
4
  "description": "ued tnt design",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",