pb-sxp-ui 1.15.38 → 1.15.39

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
@@ -10201,10 +10201,12 @@
10201
10201
  if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
10202
10202
  return;
10203
10203
  requestAnimationFrame(() => {
10204
+ realRef.current.style.position = 'relative';
10204
10205
  const realHeight = realRef.current.getBoundingClientRect().height;
10205
10206
  const clampHeight = clampRef.current.getBoundingClientRect().height;
10206
10207
  const isActuallyClamped = realHeight > clampHeight + 1;
10207
10208
  setIsShow(isActuallyClamped);
10209
+ realRef.current.style.position = 'absolute';
10208
10210
  });
10209
10211
  }, [isPost, text, isShowMore]);
10210
10212
  // 增强版监听(同时监听字体加载)
@@ -10239,8 +10241,8 @@
10239
10241
  visibility: 'hidden',
10240
10242
  opacity: 0,
10241
10243
  clipPath: 'inset(100%)',
10242
- transform: 'translateX(-9999px)',
10243
- position: 'absolute'
10244
+ transform: 'translateX(-9999px)'
10245
+ // position: 'absolute'
10244
10246
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
10245
10247
  text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
10246
10248
  __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)