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.js
CHANGED
|
@@ -10349,10 +10349,30 @@ function useVisibleHeight() {
|
|
|
10349
10349
|
const h = screenHeight >= 900 ? screenHeight * 0.8 : screenHeight * 0.79;
|
|
10350
10350
|
// 当内容高度占屏幕高度90%以上时,使用按比例计算的高度
|
|
10351
10351
|
// 否则使用实际内容高度
|
|
10352
|
-
const isRatio = ratio >= threshold
|
|
10352
|
+
const isRatio = ratio >= threshold;
|
|
10353
10353
|
const finalHeight = isRatio ? Math.round(h) : visibleHeight;
|
|
10354
|
+
const b = screenHeight - Math.round(h);
|
|
10354
10355
|
if (isRatio) {
|
|
10355
|
-
|
|
10356
|
+
const banner = document.querySelector('#onetrust-banner-sdk');
|
|
10357
|
+
if (banner) {
|
|
10358
|
+
banner.style.bottom = `${b}px`;
|
|
10359
|
+
}
|
|
10360
|
+
const styleElement = document.createElement('style');
|
|
10361
|
+
styleElement.id = 'onetrust-pc-sdk';
|
|
10362
|
+
styleElement.setAttribute('type', 'text/css');
|
|
10363
|
+
document.head.appendChild(styleElement);
|
|
10364
|
+
const css = `
|
|
10365
|
+
#onetrust-pc-sdk {
|
|
10366
|
+
height: ${finalHeight}px !important;
|
|
10367
|
+
}
|
|
10368
|
+
#onetrust-pc-sdk #ot-pc-content{
|
|
10369
|
+
bottom: ${b}px !important;
|
|
10370
|
+
}
|
|
10371
|
+
`;
|
|
10372
|
+
styleElement.textContent = css;
|
|
10373
|
+
}
|
|
10374
|
+
if (isRatio) {
|
|
10375
|
+
setBottomHeight(b);
|
|
10356
10376
|
}
|
|
10357
10377
|
else {
|
|
10358
10378
|
setBottomHeight(0);
|