shineout 3.4.2-beta.6 → 3.4.2-fix.1
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 +30 -13
- 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
|
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
492
492
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
493
493
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
494
494
|
var _default = exports.default = {
|
|
495
|
-
version: '3.4.2-
|
|
495
|
+
version: '3.4.2-fix.1'
|
|
496
496
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11991
11991
|
};
|
|
11992
11992
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11993
11993
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11994
|
-
/* harmony default export */ var version = ('3.4.2-
|
|
11994
|
+
/* harmony default export */ var version = ('3.4.2-fix.1');
|
|
11995
11995
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11996
11996
|
|
|
11997
11997
|
|
|
@@ -32458,19 +32458,18 @@ function useInputAble(props) {
|
|
|
32458
32458
|
var render = useRender(syncValue);
|
|
32459
32459
|
var shouldUseState = delay || !control;
|
|
32460
32460
|
var value = shouldUseState ? stateValue : valuePo;
|
|
32461
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.
|
|
32462
|
-
if (context.timer) {
|
|
32463
|
-
clearTimeout(context.timer);
|
|
32464
|
-
context.timer = null;
|
|
32465
|
-
}
|
|
32461
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
32466
32462
|
if (delay && control && props.value !== stateValue) {
|
|
32467
32463
|
changeStateValue(props.value);
|
|
32464
|
+
} else if (context.timer) {
|
|
32465
|
+
clearTimeout(context.timer);
|
|
32466
|
+
context.timer = null;
|
|
32468
32467
|
}
|
|
32469
32468
|
}, [props.value, delay, control]);
|
|
32470
32469
|
var forceDelayChange = use_persist_fn(function () {
|
|
32471
|
-
if (context.
|
|
32470
|
+
if (context.delayChange) context.delayChange();
|
|
32471
|
+
if (context.timer) {
|
|
32472
32472
|
clearTimeout(context.timer);
|
|
32473
|
-
context.delayChange();
|
|
32474
32473
|
context.timer = null;
|
|
32475
32474
|
context.delayChange = null;
|
|
32476
32475
|
}
|
|
@@ -59438,24 +59437,42 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
59438
59437
|
var single = isRtl && !isVertical ? -1 : 1;
|
|
59439
59438
|
setTransform(delta + headerRef.current.clientWidth * single);
|
|
59440
59439
|
};
|
|
59441
|
-
var
|
|
59440
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
59441
|
+
offsetTop: 0,
|
|
59442
|
+
offsetLeft: 0
|
|
59443
|
+
}),
|
|
59444
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
59445
|
+
currentTabOffset = _useState4[0],
|
|
59446
|
+
setCurrentTabOffset = _useState4[1];
|
|
59447
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
59448
|
+
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
59449
|
+
currentTabRect = _useState6[0],
|
|
59450
|
+
setCurrentTabRect = _useState6[1];
|
|
59451
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
59442
59452
|
var _currentTab$getBoundi;
|
|
59443
59453
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
59444
59454
|
var currentTab = tabRef.current[active];
|
|
59445
|
-
|
|
59455
|
+
setCurrentTabOffset({
|
|
59456
|
+
offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
|
|
59457
|
+
offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
|
|
59458
|
+
});
|
|
59446
59459
|
var currentTabRect = currentTab === null || currentTab === void 0 || (_currentTab$getBoundi = currentTab.getBoundingClientRect) === null || _currentTab$getBoundi === void 0 ? void 0 : _currentTab$getBoundi.call(currentTab);
|
|
59460
|
+
setCurrentTabRect(currentTabRect);
|
|
59461
|
+
}, [active]);
|
|
59462
|
+
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
59463
|
+
if (shape !== 'line' && shape !== 'dash') return;
|
|
59447
59464
|
if (!currentTabRect) return;
|
|
59448
59465
|
var scrollBarStyle = isVertical ? {
|
|
59449
59466
|
right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
|
|
59450
59467
|
left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
|
|
59451
|
-
top:
|
|
59468
|
+
top: currentTabOffset.offsetTop + currentTabRect.height / 2,
|
|
59452
59469
|
height: shape === 'line' ? currentTabRect.height : 24,
|
|
59453
59470
|
width: 2,
|
|
59454
59471
|
transform: 'translateY(-50%)'
|
|
59455
59472
|
} : {
|
|
59456
59473
|
bottom: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('top') ? 0 : 'auto',
|
|
59457
59474
|
top: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('bottom') ? 0 : 'auto',
|
|
59458
|
-
left:
|
|
59475
|
+
left: currentTabOffset.offsetLeft + currentTabRect.width / 2,
|
|
59459
59476
|
width: shape === 'line' ? currentTabRect.width : 24,
|
|
59460
59477
|
height: 2,
|
|
59461
59478
|
transform: 'translateX(-50%)'
|
|
@@ -65102,7 +65119,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
65102
65119
|
|
|
65103
65120
|
|
|
65104
65121
|
/* harmony default export */ var src_0 = ({
|
|
65105
|
-
version: '3.4.2-
|
|
65122
|
+
version: '3.4.2-fix.1'
|
|
65106
65123
|
});
|
|
65107
65124
|
}();
|
|
65108
65125
|
/******/ return __webpack_exports__;
|