pb-sxp-ui 1.19.19 → 1.19.20
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 +22 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +12 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +12 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +22 -2
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +12 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/hooks/useVisibleHeight.js +22 -2
- package/lib/core/hooks/useVisibleHeight.js +22 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10371,10 +10371,30 @@ function useVisibleHeight() {
|
|
|
10371
10371
|
const h = screenHeight >= 900 ? screenHeight * 0.8 : screenHeight * 0.79;
|
|
10372
10372
|
// 当内容高度占屏幕高度90%以上时,使用按比例计算的高度
|
|
10373
10373
|
// 否则使用实际内容高度
|
|
10374
|
-
const isRatio = ratio >= threshold
|
|
10374
|
+
const isRatio = ratio >= threshold;
|
|
10375
10375
|
const finalHeight = isRatio ? Math.round(h) : visibleHeight;
|
|
10376
|
+
const b = screenHeight - Math.round(h);
|
|
10376
10377
|
if (isRatio) {
|
|
10377
|
-
|
|
10378
|
+
const banner = document.querySelector('#onetrust-banner-sdk');
|
|
10379
|
+
if (banner) {
|
|
10380
|
+
banner.style.bottom = `${b}px`;
|
|
10381
|
+
}
|
|
10382
|
+
const styleElement = document.createElement('style');
|
|
10383
|
+
styleElement.id = 'onetrust-pc-sdk';
|
|
10384
|
+
styleElement.setAttribute('type', 'text/css');
|
|
10385
|
+
document.head.appendChild(styleElement);
|
|
10386
|
+
const css = `
|
|
10387
|
+
#onetrust-pc-sdk {
|
|
10388
|
+
height: ${finalHeight}px !important;
|
|
10389
|
+
}
|
|
10390
|
+
#onetrust-pc-sdk #ot-pc-content{
|
|
10391
|
+
bottom: ${b}px !important;
|
|
10392
|
+
}
|
|
10393
|
+
`;
|
|
10394
|
+
styleElement.textContent = css;
|
|
10395
|
+
}
|
|
10396
|
+
if (isRatio) {
|
|
10397
|
+
setBottomHeight(b);
|
|
10378
10398
|
}
|
|
10379
10399
|
else {
|
|
10380
10400
|
setBottomHeight(0);
|