@vtx/components 4.0.0-beta.55 → 4.0.0-beta.57
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/es/vtx-datagrid/index.js +10 -2
- package/es/vtx-modal/index.js +6 -4
- package/lib/vtx-datagrid/index.js +10 -2
- package/lib/vtx-modal/index.js +6 -4
- package/package.json +1 -1
package/es/vtx-datagrid/index.js
CHANGED
|
@@ -130,6 +130,7 @@ function VtxTable(props) {
|
|
|
130
130
|
var tablePlaceholder = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('tr'), function (dom) {
|
|
131
131
|
return dom.className.includes('ant-table-placeholder');
|
|
132
132
|
})[0];
|
|
133
|
+
console.log('tablePlaceholder', tablePlaceholder);
|
|
133
134
|
if (bodyDiv) {
|
|
134
135
|
bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
|
|
135
136
|
}
|
|
@@ -154,7 +155,7 @@ function VtxTable(props) {
|
|
|
154
155
|
var resizeObserver = new ResizeObserver(function () {
|
|
155
156
|
calculateHeight();
|
|
156
157
|
});
|
|
157
|
-
if (autoFit && rootDomRef.current
|
|
158
|
+
if (autoFit && rootDomRef.current) {
|
|
158
159
|
resizeObserver.observe(rootDomRef.current, {
|
|
159
160
|
box: 'border-box'
|
|
160
161
|
});
|
|
@@ -164,7 +165,14 @@ function VtxTable(props) {
|
|
|
164
165
|
resizeObserver.disconnect();
|
|
165
166
|
}
|
|
166
167
|
};
|
|
167
|
-
}, [autoFit, tableSize
|
|
168
|
+
}, [autoFit, tableSize]);
|
|
169
|
+
|
|
170
|
+
// fix: 最后一页,横向滚动条上移问题
|
|
171
|
+
useEffect(function () {
|
|
172
|
+
if (scrollY > 0) {
|
|
173
|
+
calculateHeight();
|
|
174
|
+
}
|
|
175
|
+
}, [scrollY]);
|
|
168
176
|
useLayoutEffect(function () {
|
|
169
177
|
if (autoFit) {
|
|
170
178
|
calculateHeight();
|
package/es/vtx-modal/index.js
CHANGED
|
@@ -195,18 +195,20 @@ function VtxModal(props) {
|
|
|
195
195
|
destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
|
|
196
196
|
};
|
|
197
197
|
var newProps = _objectSpread(_objectSpread(_objectSpread({
|
|
198
|
-
// maskClosable: false,
|
|
199
198
|
mask: {
|
|
200
199
|
closable: false
|
|
201
200
|
},
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
width: 700,
|
|
202
|
+
focusable: {
|
|
203
|
+
autoFocusButton: null,
|
|
204
|
+
focusTriggerAfterClose: true,
|
|
205
|
+
trap: false
|
|
206
|
+
}
|
|
204
207
|
}, props), legacyProps), {}, {
|
|
205
208
|
closable: false,
|
|
206
209
|
open: open,
|
|
207
210
|
title: title,
|
|
208
211
|
wrapClassName: classnames(prefixCls, hashId, wrapClassName, _defineProperty({}, "".concat(prefixCls, "-maxClass"), isFull ? true : false), classId.current),
|
|
209
|
-
// bodyStyle,
|
|
210
212
|
onCancel: onCancel,
|
|
211
213
|
style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
|
|
212
214
|
});
|
|
@@ -140,6 +140,7 @@ function VtxTable(props) {
|
|
|
140
140
|
var tablePlaceholder = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('tr'), function (dom) {
|
|
141
141
|
return dom.className.includes('ant-table-placeholder');
|
|
142
142
|
})[0];
|
|
143
|
+
console.log('tablePlaceholder', tablePlaceholder);
|
|
143
144
|
if (bodyDiv) {
|
|
144
145
|
bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
|
|
145
146
|
}
|
|
@@ -164,7 +165,7 @@ function VtxTable(props) {
|
|
|
164
165
|
var resizeObserver = new ResizeObserver(function () {
|
|
165
166
|
calculateHeight();
|
|
166
167
|
});
|
|
167
|
-
if (autoFit && rootDomRef.current
|
|
168
|
+
if (autoFit && rootDomRef.current) {
|
|
168
169
|
resizeObserver.observe(rootDomRef.current, {
|
|
169
170
|
box: 'border-box'
|
|
170
171
|
});
|
|
@@ -174,7 +175,14 @@ function VtxTable(props) {
|
|
|
174
175
|
resizeObserver.disconnect();
|
|
175
176
|
}
|
|
176
177
|
};
|
|
177
|
-
}, [autoFit, tableSize
|
|
178
|
+
}, [autoFit, tableSize]);
|
|
179
|
+
|
|
180
|
+
// fix: 最后一页,横向滚动条上移问题
|
|
181
|
+
(0, _react.useEffect)(function () {
|
|
182
|
+
if (scrollY > 0) {
|
|
183
|
+
calculateHeight();
|
|
184
|
+
}
|
|
185
|
+
}, [scrollY]);
|
|
178
186
|
(0, _react.useLayoutEffect)(function () {
|
|
179
187
|
if (autoFit) {
|
|
180
188
|
calculateHeight();
|
package/lib/vtx-modal/index.js
CHANGED
|
@@ -202,18 +202,20 @@ function VtxModal(props) {
|
|
|
202
202
|
destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
|
|
203
203
|
};
|
|
204
204
|
var newProps = _objectSpread(_objectSpread(_objectSpread({
|
|
205
|
-
// maskClosable: false,
|
|
206
205
|
mask: {
|
|
207
206
|
closable: false
|
|
208
207
|
},
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
width: 700,
|
|
209
|
+
focusable: {
|
|
210
|
+
autoFocusButton: null,
|
|
211
|
+
focusTriggerAfterClose: true,
|
|
212
|
+
trap: false
|
|
213
|
+
}
|
|
211
214
|
}, props), legacyProps), {}, {
|
|
212
215
|
closable: false,
|
|
213
216
|
open: open,
|
|
214
217
|
title: title,
|
|
215
218
|
wrapClassName: (0, _classnames2.default)(prefixCls, hashId, wrapClassName, _defineProperty({}, "".concat(prefixCls, "-maxClass"), isFull ? true : false), classId.current),
|
|
216
|
-
// bodyStyle,
|
|
217
219
|
onCancel: onCancel,
|
|
218
220
|
style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
|
|
219
221
|
});
|