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/index.cjs CHANGED
@@ -10208,10 +10208,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
10208
10208
  if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
10209
10209
  return;
10210
10210
  requestAnimationFrame(() => {
10211
+ realRef.current.style.position = 'relative';
10211
10212
  const realHeight = realRef.current.getBoundingClientRect().height;
10212
10213
  const clampHeight = clampRef.current.getBoundingClientRect().height;
10213
10214
  const isActuallyClamped = realHeight > clampHeight + 1;
10214
10215
  setIsShow(isActuallyClamped);
10216
+ realRef.current.style.position = 'absolute';
10215
10217
  });
10216
10218
  }, [isPost, text, isShowMore]);
10217
10219
  // 增强版监听(同时监听字体加载)
@@ -10246,8 +10248,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
10246
10248
  visibility: 'hidden',
10247
10249
  opacity: 0,
10248
10250
  clipPath: 'inset(100%)',
10249
- transform: 'translateX(-9999px)',
10250
- position: 'absolute'
10251
+ transform: 'translateX(-9999px)'
10252
+ // position: 'absolute'
10251
10253
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
10252
10254
  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: {
10253
10255
  __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)