pb-sxp-ui 1.19.10 → 1.19.12
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/dist/index.cjs +11 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.js +11 -25
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +11 -25
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +8 -2
- package/es/core/hooks/useVisibleHeight.js +2 -1
- package/lib/core/components/SxpPageRender/index.js +8 -2
- package/lib/core/hooks/useVisibleHeight.js +2 -1
- package/package.json +1 -1
|
@@ -215,6 +215,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
215
215
|
return minusHeight;
|
|
216
216
|
}, [globalConfig]);
|
|
217
217
|
const getHeightWithSafeArea = () => {
|
|
218
|
+
const root = document.documentElement;
|
|
219
|
+
const value = getComputedStyle(root).getPropertyValue('--safe-area-inset-bottom');
|
|
220
|
+
const numericValue = parseInt(value) || 0;
|
|
221
|
+
return numericValue;
|
|
222
|
+
};
|
|
223
|
+
const getHeightWithSafeArea2 = () => {
|
|
218
224
|
const detector = document.createElement('div');
|
|
219
225
|
detector.style.position = 'fixed';
|
|
220
226
|
detector.style.bottom = '0';
|
|
@@ -228,8 +234,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
228
234
|
return safeAreaBottom;
|
|
229
235
|
};
|
|
230
236
|
const height = useMemo(() => {
|
|
231
|
-
return visibleHeight - minusHeight - tagHeight;
|
|
232
|
-
}, [minusHeight, visibleHeight, tagHeight]);
|
|
237
|
+
return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
|
|
238
|
+
}, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea2]);
|
|
233
239
|
const visList = useMemo(() => {
|
|
234
240
|
var _a;
|
|
235
241
|
const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
|
|
@@ -17,7 +17,8 @@ export const useVisibleHeight = () => {
|
|
|
17
17
|
return height;
|
|
18
18
|
};
|
|
19
19
|
const updateHeight = useCallback(() => {
|
|
20
|
-
|
|
20
|
+
var _a;
|
|
21
|
+
const height = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight);
|
|
21
22
|
setVisibleHeight(height);
|
|
22
23
|
}, []);
|
|
23
24
|
useEffect(() => {
|
|
@@ -218,6 +218,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
218
218
|
return minusHeight;
|
|
219
219
|
}, [globalConfig]);
|
|
220
220
|
const getHeightWithSafeArea = () => {
|
|
221
|
+
const root = document.documentElement;
|
|
222
|
+
const value = getComputedStyle(root).getPropertyValue('--safe-area-inset-bottom');
|
|
223
|
+
const numericValue = parseInt(value) || 0;
|
|
224
|
+
return numericValue;
|
|
225
|
+
};
|
|
226
|
+
const getHeightWithSafeArea2 = () => {
|
|
221
227
|
const detector = document.createElement('div');
|
|
222
228
|
detector.style.position = 'fixed';
|
|
223
229
|
detector.style.bottom = '0';
|
|
@@ -231,8 +237,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
231
237
|
return safeAreaBottom;
|
|
232
238
|
};
|
|
233
239
|
const height = (0, react_1.useMemo)(() => {
|
|
234
|
-
return visibleHeight - minusHeight - tagHeight;
|
|
235
|
-
}, [minusHeight, visibleHeight, tagHeight]);
|
|
240
|
+
return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
|
|
241
|
+
}, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea2]);
|
|
236
242
|
const visList = (0, react_1.useMemo)(() => {
|
|
237
243
|
var _a;
|
|
238
244
|
const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
|
|
@@ -20,7 +20,8 @@ const useVisibleHeight = () => {
|
|
|
20
20
|
return height;
|
|
21
21
|
};
|
|
22
22
|
const updateHeight = (0, react_1.useCallback)(() => {
|
|
23
|
-
|
|
23
|
+
var _a;
|
|
24
|
+
const height = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight);
|
|
24
25
|
setVisibleHeight(height);
|
|
25
26
|
}, []);
|
|
26
27
|
(0, react_1.useEffect)(() => {
|