pb-sxp-ui 1.19.19 → 1.20.0

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.js CHANGED
@@ -10351,25 +10351,32 @@ function useVisibleHeight() {
10351
10351
  // 否则使用实际内容高度
10352
10352
  const isRatio = ratio >= threshold && ratio !== 1;
10353
10353
  const finalHeight = isRatio ? Math.round(h) : visibleHeight;
10354
+ const b = screenHeight - Math.round(h);
10354
10355
  if (isRatio) {
10355
- setBottomHeight(screenHeight - Math.round(h));
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);
10359
10379
  }
10360
- if ('fundebug' in window) {
10361
- const systemInfo = {
10362
- ratio,
10363
- h,
10364
- finalHeight,
10365
- visibleHeight,
10366
- screenHeight,
10367
- isInstagram,
10368
- isFacebook,
10369
- ua
10370
- };
10371
- window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
10372
- }
10373
10380
  setVisibleHeight(finalHeight);
10374
10381
  }, [getVisibleContentHeight]);
10375
10382
  useEffect(() => {