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/pb-ui.js CHANGED
@@ -10366,25 +10366,32 @@
10366
10366
  // 否则使用实际内容高度
10367
10367
  const isRatio = ratio >= threshold && ratio !== 1;
10368
10368
  const finalHeight = isRatio ? Math.round(h) : visibleHeight;
10369
+ const b = screenHeight - Math.round(h);
10369
10370
  if (isRatio) {
10370
- setBottomHeight(screenHeight - Math.round(h));
10371
+ const banner = document.querySelector('#onetrust-banner-sdk');
10372
+ if (banner) {
10373
+ banner.style.bottom = `${b}px`;
10374
+ }
10375
+ const styleElement = document.createElement('style');
10376
+ styleElement.id = 'onetrust-pc-sdk';
10377
+ styleElement.setAttribute('type', 'text/css');
10378
+ document.head.appendChild(styleElement);
10379
+ const css = `
10380
+ #onetrust-pc-sdk {
10381
+ height: ${finalHeight}px !important;
10382
+ }
10383
+ #onetrust-pc-sdk #ot-pc-content{
10384
+ bottom: ${b}px !important;
10385
+ }
10386
+ `;
10387
+ styleElement.textContent = css;
10388
+ }
10389
+ if (isRatio) {
10390
+ setBottomHeight(b);
10371
10391
  }
10372
10392
  else {
10373
10393
  setBottomHeight(0);
10374
10394
  }
10375
- if ('fundebug' in window) {
10376
- const systemInfo = {
10377
- ratio,
10378
- h,
10379
- finalHeight,
10380
- visibleHeight,
10381
- screenHeight,
10382
- isInstagram,
10383
- isFacebook,
10384
- ua
10385
- };
10386
- window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
10387
- }
10388
10395
  setVisibleHeight(finalHeight);
10389
10396
  }, [getVisibleContentHeight]);
10390
10397
  React.useEffect(() => {