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.js CHANGED
@@ -10186,10 +10186,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
10186
10186
  if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
10187
10187
  return;
10188
10188
  requestAnimationFrame(() => {
10189
+ realRef.current.style.position = 'relative';
10189
10190
  const realHeight = realRef.current.getBoundingClientRect().height;
10190
10191
  const clampHeight = clampRef.current.getBoundingClientRect().height;
10191
10192
  const isActuallyClamped = realHeight > clampHeight + 1;
10192
10193
  setIsShow(isActuallyClamped);
10194
+ realRef.current.style.position = 'absolute';
10193
10195
  });
10194
10196
  }, [isPost, text, isShowMore]);
10195
10197
  // 增强版监听(同时监听字体加载)
@@ -10224,8 +10226,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
10224
10226
  visibility: 'hidden',
10225
10227
  opacity: 0,
10226
10228
  clipPath: 'inset(100%)',
10227
- transform: 'translateX(-9999px)',
10228
- position: 'absolute'
10229
+ transform: 'translateX(-9999px)'
10230
+ // position: 'absolute'
10229
10231
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
10230
10232
  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: {
10231
10233
  __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)