shineout 3.8.0-beta.15 → 3.8.0-beta.17
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/cjs/index.js +1 -1
- package/dist/shineout.js +116 -44
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.17'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12234
12234
|
};
|
|
12235
12235
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12236
12236
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12237
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.8.0-beta.17');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -22299,7 +22299,7 @@ function appendNormalizeStyle(styleString, id) {
|
|
|
22299
22299
|
document.head.insertBefore(style, document.head.firstChild);
|
|
22300
22300
|
}
|
|
22301
22301
|
function appendJssInsertionPoint() {
|
|
22302
|
-
var insertionPoint = document.createElement('
|
|
22302
|
+
var insertionPoint = document.createElement('style');
|
|
22303
22303
|
insertionPoint.id = jssInsertionPointId;
|
|
22304
22304
|
document.head.insertBefore(insertionPoint, document.head.firstChild);
|
|
22305
22305
|
react_jss_esm_defaultJss.setup({
|
|
@@ -22820,7 +22820,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22820
22820
|
borderRadius: src.popoverRadius,
|
|
22821
22821
|
border: "1px solid ".concat(src.popoverBorderColor),
|
|
22822
22822
|
wordWrap: 'break-word',
|
|
22823
|
-
'& $arrow': {
|
|
22823
|
+
'& > $arrow': {
|
|
22824
22824
|
'z-index': 1,
|
|
22825
22825
|
position: 'absolute',
|
|
22826
22826
|
content: '" "',
|
|
@@ -22841,7 +22841,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22841
22841
|
'&$hideArrow': defineProperty_default()({}, popover_cssvar, '4px'),
|
|
22842
22842
|
'&[data-soui-position^="bottom"]': {
|
|
22843
22843
|
marginTop: "calc(".concat(hideArrowGap, " - 2px)"),
|
|
22844
|
-
'& $arrow': {
|
|
22844
|
+
'& > $arrow': {
|
|
22845
22845
|
top: '0',
|
|
22846
22846
|
transform: 'translate(0, -50%) rotate(-45deg)',
|
|
22847
22847
|
left: '0',
|
|
@@ -22861,7 +22861,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22861
22861
|
'&[data-soui-position^="top"]': {
|
|
22862
22862
|
// marginTop: (arrowGap - 2) * -1,
|
|
22863
22863
|
marginTop: "calc((".concat(hideArrowGap, " - 2px) * -1)"),
|
|
22864
|
-
'& $arrow': {
|
|
22864
|
+
'& > $arrow': {
|
|
22865
22865
|
bottom: '0',
|
|
22866
22866
|
transform: 'translate(0, 50%) rotate(135deg)',
|
|
22867
22867
|
left: '0',
|
|
@@ -22887,7 +22887,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22887
22887
|
'&[dir=rtl]': {
|
|
22888
22888
|
marginLeft: "calc((".concat(hideArrowGap, " - 2px))")
|
|
22889
22889
|
},
|
|
22890
|
-
'& $arrow': {
|
|
22890
|
+
'& > $arrow': {
|
|
22891
22891
|
right: src.popoverBorderWidth,
|
|
22892
22892
|
transform: 'translate(50%, 0) rotate(45deg)',
|
|
22893
22893
|
top: '0',
|
|
@@ -22911,7 +22911,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22911
22911
|
'&[dir=rtl]': {
|
|
22912
22912
|
marginRight: "calc(".concat(hideArrowGap, " - 2px)")
|
|
22913
22913
|
},
|
|
22914
|
-
'& $arrow': {
|
|
22914
|
+
'& > $arrow': {
|
|
22915
22915
|
left: '0',
|
|
22916
22916
|
transform: 'translate(-50%, 0) rotate(-135deg)',
|
|
22917
22917
|
top: '0',
|
|
@@ -22930,19 +22930,19 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22930
22930
|
position: 'absolute'
|
|
22931
22931
|
}
|
|
22932
22932
|
},
|
|
22933
|
-
'&&[data-soui-position$="-left"] $arrow': {
|
|
22933
|
+
'&&[data-soui-position$="-left"] > $arrow': {
|
|
22934
22934
|
left: arrowMargin,
|
|
22935
22935
|
right: 'auto'
|
|
22936
22936
|
},
|
|
22937
|
-
'&&[data-soui-position$="-right"] $arrow': {
|
|
22937
|
+
'&&[data-soui-position$="-right"] > $arrow': {
|
|
22938
22938
|
right: arrowMargin,
|
|
22939
22939
|
left: 'auto'
|
|
22940
22940
|
},
|
|
22941
|
-
'&&[data-soui-position$="-top"] $arrow': {
|
|
22941
|
+
'&&[data-soui-position$="-top"] > $arrow': {
|
|
22942
22942
|
top: arrowMargin,
|
|
22943
22943
|
bottom: 'auto'
|
|
22944
22944
|
},
|
|
22945
|
-
'&&[data-soui-position$="-bottom"] $arrow': {
|
|
22945
|
+
'&&[data-soui-position$="-bottom"] > $arrow': {
|
|
22946
22946
|
bottom: arrowMargin,
|
|
22947
22947
|
top: 'auto'
|
|
22948
22948
|
},
|
|
@@ -35694,6 +35694,26 @@ var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
|
35694
35694
|
// 返回之前去重
|
|
35695
35695
|
return Array.from(new Set(completeFields));
|
|
35696
35696
|
};
|
|
35697
|
+
|
|
35698
|
+
/**
|
|
35699
|
+
* 将对象中的所有值设置为空, 如果值是数组,重置为空数组,如果是对象,重置为空对象,如果是基础类型,重置为undefined
|
|
35700
|
+
* @param obj 对象
|
|
35701
|
+
* @returns 空对象
|
|
35702
|
+
*/
|
|
35703
|
+
var clearValue = function clearValue(obj) {
|
|
35704
|
+
if (isArray(obj)) {
|
|
35705
|
+
return obj.map(function (item) {
|
|
35706
|
+
return clearValue(item);
|
|
35707
|
+
});
|
|
35708
|
+
}
|
|
35709
|
+
if (is_isObject(obj)) {
|
|
35710
|
+
return Object.keys(obj).reduce(function (acc, key) {
|
|
35711
|
+
acc[key] = clearValue(obj[key]);
|
|
35712
|
+
return acc;
|
|
35713
|
+
}, {});
|
|
35714
|
+
}
|
|
35715
|
+
return undefined;
|
|
35716
|
+
};
|
|
35697
35717
|
;// CONCATENATED MODULE: ../hooks/src/components/use-check/use-check.ts
|
|
35698
35718
|
|
|
35699
35719
|
|
|
@@ -36085,7 +36105,10 @@ var useInput = function useInput(params) {
|
|
|
36085
36105
|
(_otherHandlers$onFocu = otherHandlers.onFocus) === null || _otherHandlers$onFocu === void 0 || _otherHandlers$onFocu.call(otherHandlers, event);
|
|
36086
36106
|
setFocused(true);
|
|
36087
36107
|
if (autoSelect) {
|
|
36088
|
-
|
|
36108
|
+
// why requestAnimationFrame: 当在文字身体上hover后立即点击,select()与浏览器的光标定位逻辑产生竞争,有可能导致只选中的部分文本,所以需要延迟一下
|
|
36109
|
+
requestAnimationFrame(function () {
|
|
36110
|
+
event.target.select();
|
|
36111
|
+
});
|
|
36089
36112
|
}
|
|
36090
36113
|
};
|
|
36091
36114
|
};
|
|
@@ -36641,6 +36664,7 @@ function escapeRegExp() {
|
|
|
36641
36664
|
search: '搜索',
|
|
36642
36665
|
urlInvalidMsg: '图片格式不正确,请重新上传',
|
|
36643
36666
|
invalidAccept: '文件格式不正确',
|
|
36667
|
+
invalidImage: '图片格式不正确',
|
|
36644
36668
|
notFound: '未找到'
|
|
36645
36669
|
});
|
|
36646
36670
|
;// CONCATENATED MODULE: ../base/src/config/locale/en_US.ts
|
|
@@ -36706,6 +36730,7 @@ function escapeRegExp() {
|
|
|
36706
36730
|
search: 'search',
|
|
36707
36731
|
urlInvalidMsg: 'Picture format is incorrect, please upload again',
|
|
36708
36732
|
invalidAccept: 'Invalid file format',
|
|
36733
|
+
invalidImage: 'Invalid image format',
|
|
36709
36734
|
notFound: 'not found'
|
|
36710
36735
|
});
|
|
36711
36736
|
;// CONCATENATED MODULE: ../base/src/config/locale/index.ts
|
|
@@ -41509,7 +41534,7 @@ function getResetMore(onFilter, container, doms) {
|
|
|
41509
41534
|
var paddingLeft = parsePxToNumber(style.paddingLeft);
|
|
41510
41535
|
var paddingRight = parsePxToNumber(style.paddingRight);
|
|
41511
41536
|
var minFilterWidth = onFilter ? 16 : 0;
|
|
41512
|
-
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth
|
|
41537
|
+
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth;
|
|
41513
41538
|
var hideEl = items.pop();
|
|
41514
41539
|
var hideElStyle = getComputedStyle(hideEl);
|
|
41515
41540
|
var hideMargin = parsePxToNumber(hideElStyle.marginLeft) + parsePxToNumber(hideElStyle.marginRight);
|
|
@@ -46508,6 +46533,7 @@ var Time = function Time(props) {
|
|
|
46508
46533
|
})]
|
|
46509
46534
|
});
|
|
46510
46535
|
};
|
|
46536
|
+
var shouldRenderTimes = times && times.length > 0;
|
|
46511
46537
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
46512
46538
|
onMouseEnter: props.onMouseEnter,
|
|
46513
46539
|
onMouseLeave: props.onMouseLeave,
|
|
@@ -46516,7 +46542,7 @@ var Time = function Time(props) {
|
|
|
46516
46542
|
children: [props.showTitle && /*#__PURE__*/(0,jsx_runtime.jsx)(pickerTitle, {
|
|
46517
46543
|
position: props.position,
|
|
46518
46544
|
jssStyle: props.jssStyle
|
|
46519
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46545
|
+
}), shouldRenderTimes && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46520
46546
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerBody,
|
|
46521
46547
|
children: times.map(function (item) {
|
|
46522
46548
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(TimeScroll, {
|
|
@@ -50989,7 +51015,7 @@ var useForm = function useForm(props) {
|
|
|
50989
51015
|
var _props$onChange;
|
|
50990
51016
|
var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
|
|
50991
51017
|
context.value = newValue;
|
|
50992
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, context.value);
|
|
51018
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, deepClone(context.value));
|
|
50993
51019
|
});
|
|
50994
51020
|
var scrollToField = use_persist_fn(function (name) {
|
|
50995
51021
|
var _document;
|
|
@@ -51373,11 +51399,6 @@ var useForm = function useForm(props) {
|
|
|
51373
51399
|
// 默认值更新
|
|
51374
51400
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
51375
51401
|
context.removeLock = false;
|
|
51376
|
-
// 内部 onChange 改的 value, 不需要更新
|
|
51377
|
-
if (props.value === context.value) {
|
|
51378
|
-
if (!isControl) update();
|
|
51379
|
-
return;
|
|
51380
|
-
}
|
|
51381
51402
|
if (initValidate && !context.resetTime) {
|
|
51382
51403
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
51383
51404
|
var oldValue = deepGet(preValue || emptyObj, key);
|
|
@@ -51387,6 +51408,7 @@ var useForm = function useForm(props) {
|
|
|
51387
51408
|
validateFields(keys).catch(function () {});
|
|
51388
51409
|
}
|
|
51389
51410
|
update();
|
|
51411
|
+
if (!isControl) return;
|
|
51390
51412
|
// 默认值上位时会提前触发外部的onChange, 导致外部的多次setFormValue不能合并后生效的问题(ReactDOM.render方式渲染)
|
|
51391
51413
|
setTimeout(updateDefaultValue);
|
|
51392
51414
|
context.resetTime = 0;
|
|
@@ -51892,8 +51914,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51892
51914
|
},
|
|
51893
51915
|
onInsert: function onInsert(val) {
|
|
51894
51916
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
51917
|
+
var insertValue = val;
|
|
51918
|
+
var valueTemplate = oldValue[i];
|
|
51919
|
+
if (insertValue === undefined) {
|
|
51920
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
51921
|
+
}
|
|
51895
51922
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51896
|
-
draft.splice(i, 0,
|
|
51923
|
+
draft.splice(i, 0, insertValue);
|
|
51897
51924
|
});
|
|
51898
51925
|
_onChange(newValue);
|
|
51899
51926
|
// context.ids.splice(i, 0, util.generateUUID());
|
|
@@ -51901,8 +51928,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51901
51928
|
},
|
|
51902
51929
|
onAppend: function onAppend(val) {
|
|
51903
51930
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
51931
|
+
var insertValue = val;
|
|
51932
|
+
var valueTemplate = oldValue[i];
|
|
51933
|
+
if (insertValue === undefined) {
|
|
51934
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
51935
|
+
}
|
|
51904
51936
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51905
|
-
draft.splice(i + 1, 0,
|
|
51937
|
+
draft.splice(i + 1, 0, insertValue);
|
|
51906
51938
|
});
|
|
51907
51939
|
_onChange(newValue);
|
|
51908
51940
|
// context.ids.splice(i + 1, 0, util.generateUUID());
|
|
@@ -62032,7 +62064,8 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62032
62064
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
62033
62065
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
62034
62066
|
isMouseDown: false,
|
|
62035
|
-
lastTableHeight: 0
|
|
62067
|
+
lastTableHeight: 0,
|
|
62068
|
+
unmounted: false
|
|
62036
62069
|
}),
|
|
62037
62070
|
context = _useRef.current;
|
|
62038
62071
|
var _props$scrollHeight = props.scrollHeight,
|
|
@@ -62141,7 +62174,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62141
62174
|
|
|
62142
62175
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
62143
62176
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
62144
|
-
if (!props.tableRef.current) return;
|
|
62177
|
+
if (!props.tableRef.current || context.unmounted) return;
|
|
62145
62178
|
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
62146
62179
|
var container = containerRef.current;
|
|
62147
62180
|
// 判断内容滚动高度是否真的超过了容器高度
|
|
@@ -62153,6 +62186,9 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62153
62186
|
} else {
|
|
62154
62187
|
context.lastTableHeight = rootTableHeight;
|
|
62155
62188
|
}
|
|
62189
|
+
return function () {
|
|
62190
|
+
context.unmounted = true;
|
|
62191
|
+
};
|
|
62156
62192
|
}, [paddingTop]);
|
|
62157
62193
|
if (props.isEmpty) {
|
|
62158
62194
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
@@ -63039,7 +63075,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63039
63075
|
for (var i = 0; i <= index; i++) {
|
|
63040
63076
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
63041
63077
|
}
|
|
63042
|
-
return sum + props.
|
|
63078
|
+
return sum + props.theadHeight + props.tfootHeight;
|
|
63043
63079
|
};
|
|
63044
63080
|
var setRowHeight = usePersistFn(function (index, height) {
|
|
63045
63081
|
if (props.disabled) return;
|
|
@@ -63182,7 +63218,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63182
63218
|
callback();
|
|
63183
63219
|
}
|
|
63184
63220
|
};
|
|
63185
|
-
props.scrollRef.current.scrollTop = beforeHeight;
|
|
63221
|
+
props.scrollRef.current.scrollTop = beforeHeight - props.theadHeight;
|
|
63186
63222
|
}
|
|
63187
63223
|
});
|
|
63188
63224
|
var scrollColumnByLeft = usePersistFn(function (targetLeft) {
|
|
@@ -63259,7 +63295,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63259
63295
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63260
63296
|
if (props.disabled) return;
|
|
63261
63297
|
setHeight(getContentHeight(props.data.length - 1));
|
|
63262
|
-
}, [props.data.length, props.
|
|
63298
|
+
}, [props.data.length, props.theadHeight, props.tfootHeight]);
|
|
63263
63299
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63264
63300
|
if (props.disabled) return;
|
|
63265
63301
|
if (context.heightCallback) {
|
|
@@ -65061,7 +65097,8 @@ var emptyRef = {
|
|
|
65061
65097
|
};
|
|
65062
65098
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
65063
65099
|
emptyHeight: 0,
|
|
65064
|
-
|
|
65100
|
+
theadHeight: 0,
|
|
65101
|
+
tfootHeight: 0,
|
|
65065
65102
|
scrollingTimer: null
|
|
65066
65103
|
}),
|
|
65067
65104
|
context = _useRef.current;
|
|
@@ -65194,15 +65231,38 @@ var emptyRef = {
|
|
|
65194
65231
|
onChange: inputableData.onChange,
|
|
65195
65232
|
disabled: props.disabled
|
|
65196
65233
|
});
|
|
65197
|
-
(
|
|
65234
|
+
var handleTheadAndTfootHeight = usePersistFn(function () {
|
|
65198
65235
|
var _theadRef$current, _tfootRef$current;
|
|
65199
65236
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
65200
65237
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
65201
65238
|
if (props.sticky) {
|
|
65202
|
-
context.
|
|
65239
|
+
context.tfootHeight = tfootHeight;
|
|
65203
65240
|
} else {
|
|
65204
|
-
context.
|
|
65241
|
+
context.theadHeight = theadHeight;
|
|
65242
|
+
context.tfootHeight = tfootHeight;
|
|
65243
|
+
}
|
|
65244
|
+
});
|
|
65245
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
65246
|
+
handleTheadAndTfootHeight();
|
|
65247
|
+
var cancelFunc1;
|
|
65248
|
+
if (theadRef !== null && theadRef !== void 0 && theadRef.current) {
|
|
65249
|
+
cancelFunc1 = addResizeObserver(theadRef === null || theadRef === void 0 ? void 0 : theadRef.current, handleTheadAndTfootHeight, {
|
|
65250
|
+
direction: 'y',
|
|
65251
|
+
timer: 10
|
|
65252
|
+
});
|
|
65253
|
+
}
|
|
65254
|
+
var cancelFunc2;
|
|
65255
|
+
if (tfootRef !== null && tfootRef !== void 0 && tfootRef.current) {
|
|
65256
|
+
cancelFunc2 = addResizeObserver(tfootRef === null || tfootRef === void 0 ? void 0 : tfootRef.current, handleTheadAndTfootHeight, {
|
|
65257
|
+
direction: 'y',
|
|
65258
|
+
timer: 10
|
|
65259
|
+
});
|
|
65205
65260
|
}
|
|
65261
|
+
return function () {
|
|
65262
|
+
var _cancelFunc, _cancelFunc2;
|
|
65263
|
+
(_cancelFunc = cancelFunc1) === null || _cancelFunc === void 0 || _cancelFunc();
|
|
65264
|
+
(_cancelFunc2 = cancelFunc2) === null || _cancelFunc2 === void 0 || _cancelFunc2();
|
|
65265
|
+
};
|
|
65206
65266
|
}, [theadRef.current, tfootRef.current]);
|
|
65207
65267
|
var virtualInfo = use_table_virtual({
|
|
65208
65268
|
disabled: !virtual,
|
|
@@ -65215,7 +65275,8 @@ var emptyRef = {
|
|
|
65215
65275
|
innerRef: tbodyRef,
|
|
65216
65276
|
scrollLeft: props.scrollLeft,
|
|
65217
65277
|
isRtl: isRtl,
|
|
65218
|
-
|
|
65278
|
+
theadHeight: context.theadHeight,
|
|
65279
|
+
tfootHeight: context.tfootHeight
|
|
65219
65280
|
});
|
|
65220
65281
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
65221
65282
|
var _tableRef$current;
|
|
@@ -66202,36 +66263,43 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
66202
66263
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
66203
66264
|
currentTabOffset = _useState2[0],
|
|
66204
66265
|
setCurrentTabOffset = _useState2[1];
|
|
66205
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
66266
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
66267
|
+
width: 0,
|
|
66268
|
+
height: 0
|
|
66269
|
+
}),
|
|
66206
66270
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
66207
|
-
|
|
66208
|
-
|
|
66271
|
+
currentTabSize = _useState4[0],
|
|
66272
|
+
setCurrentTabSize = _useState4[1];
|
|
66209
66273
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
66210
|
-
var _currentTab$getBoundi;
|
|
66211
66274
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
66212
66275
|
var currentTab = tabRef.current[active];
|
|
66213
66276
|
setCurrentTabOffset({
|
|
66214
66277
|
offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
|
|
66215
66278
|
offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
|
|
66216
66279
|
});
|
|
66217
|
-
|
|
66218
|
-
|
|
66280
|
+
|
|
66281
|
+
// 使用 offsetWidth/offsetHeight 而不是 getBoundingClientRect()
|
|
66282
|
+
// 这样可以避免受到外部容器 CSS transform scale 的影响
|
|
66283
|
+
setCurrentTabSize({
|
|
66284
|
+
width: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetWidth) || 0,
|
|
66285
|
+
height: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetHeight) || 0
|
|
66286
|
+
});
|
|
66219
66287
|
}, [active, tabs]);
|
|
66220
66288
|
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
66221
66289
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
66222
|
-
if (!
|
|
66290
|
+
if (!currentTabSize.width || !currentTabSize.height) return;
|
|
66223
66291
|
var scrollBarStyle = isVertical ? {
|
|
66224
66292
|
right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
|
|
66225
66293
|
left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
|
|
66226
|
-
top: currentTabOffset.offsetTop +
|
|
66227
|
-
height: shape === 'line' ?
|
|
66294
|
+
top: currentTabOffset.offsetTop + currentTabSize.height / 2,
|
|
66295
|
+
height: shape === 'line' ? currentTabSize.height : 24,
|
|
66228
66296
|
width: 2,
|
|
66229
66297
|
transform: 'translateY(-50%)'
|
|
66230
66298
|
} : {
|
|
66231
66299
|
bottom: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('top') ? 0 : 'auto',
|
|
66232
66300
|
top: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('bottom') ? 0 : 'auto',
|
|
66233
|
-
left: currentTabOffset.offsetLeft +
|
|
66234
|
-
width: shape === 'line' ?
|
|
66301
|
+
left: currentTabOffset.offsetLeft + currentTabSize.width / 2,
|
|
66302
|
+
width: shape === 'line' ? currentTabSize.width : 24,
|
|
66235
66303
|
height: 2,
|
|
66236
66304
|
transform: 'translateX(-50%)'
|
|
66237
66305
|
};
|
|
@@ -69218,6 +69286,10 @@ var useInputClick = function useInputClick() {
|
|
|
69218
69286
|
type: 'file',
|
|
69219
69287
|
style: {
|
|
69220
69288
|
display: 'none'
|
|
69289
|
+
},
|
|
69290
|
+
onClick: function onClick(event) {
|
|
69291
|
+
// 阻止程序化触发(inputRef.current.click())的input点击事件冒泡
|
|
69292
|
+
event.stopPropagation();
|
|
69221
69293
|
}
|
|
69222
69294
|
};
|
|
69223
69295
|
var wrapperProps = {
|
|
@@ -72091,7 +72163,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
72091
72163
|
|
|
72092
72164
|
|
|
72093
72165
|
/* harmony default export */ var src_0 = ({
|
|
72094
|
-
version: '3.8.0-beta.
|
|
72166
|
+
version: '3.8.0-beta.17'
|
|
72095
72167
|
});
|
|
72096
72168
|
}();
|
|
72097
72169
|
/******/ return __webpack_exports__;
|