@polyv/product-ui 1.0.0-rc-20250612.3 → 1.0.0-rc-20250612.4

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.
Files changed (58) hide show
  1. package/address-edit.cjs.js +1 -1
  2. package/address-edit.es.js +2 -2
  3. package/address-edit.umd.js +1 -1
  4. package/address-item.cjs.js +1 -1
  5. package/address-item.es.js +2 -2
  6. package/address-item.umd.js +1 -1
  7. package/address-list.cjs.js +1 -1
  8. package/address-list.es.js +2 -2
  9. package/address-list.umd.js +1 -1
  10. package/index.cjs.js +1 -1
  11. package/index.es.js +24 -20
  12. package/index.umd.js +1 -1
  13. package/mobile-product-pendant.cjs.js +1 -1
  14. package/mobile-product-pendant.es.js +2 -2
  15. package/mobile-product-pendant.umd.js +1 -1
  16. package/order-confirm.cjs.js +1 -1
  17. package/order-confirm.es.js +2 -2
  18. package/order-confirm.umd.js +1 -1
  19. package/order-detail.cjs.js +1 -1
  20. package/order-detail.es.js +2 -2
  21. package/order-detail.umd.js +1 -1
  22. package/order-item.cjs.js +1 -1
  23. package/order-item.es.js +2 -2
  24. package/order-item.umd.js +1 -1
  25. package/order-list-popup.cjs.js +1 -1
  26. package/order-list-popup.es.js +2 -2
  27. package/order-list-popup.umd.js +1 -1
  28. package/order-list.cjs.js +1 -1
  29. package/order-list.es.js +2 -2
  30. package/order-list.umd.js +1 -1
  31. package/order-popup.cjs.js +1 -1
  32. package/order-popup.es.js +2 -2
  33. package/order-popup.umd.js +1 -1
  34. package/package.json +1 -1
  35. package/pc-product-pendant.cjs.js +1 -1
  36. package/pc-product-pendant.es.js +2 -2
  37. package/pc-product-pendant.umd.js +1 -1
  38. package/product-button.cjs.js +1 -1
  39. package/product-button.es.js +2 -2
  40. package/product-button.umd.js +1 -1
  41. package/product-detail-popup.cjs.js +1 -1
  42. package/product-detail-popup.es.js +24 -20
  43. package/product-detail-popup.umd.js +1 -1
  44. package/product-detail.cjs.js +1 -1
  45. package/product-detail.es.js +24 -20
  46. package/product-detail.umd.js +2 -2
  47. package/product-iframe-link-popup.cjs.js +1 -1
  48. package/product-iframe-link-popup.es.js +2 -2
  49. package/product-iframe-link-popup.umd.js +1 -1
  50. package/product-item.cjs.js +1 -1
  51. package/product-item.es.js +24 -20
  52. package/product-item.umd.js +1 -1
  53. package/product-list-popup.cjs.js +2 -2
  54. package/product-list-popup.es.js +24 -20
  55. package/product-list-popup.umd.js +2 -2
  56. package/product-list.cjs.js +1 -1
  57. package/product-list.es.js +24 -20
  58. package/product-list.umd.js +1 -1
package/index.es.js CHANGED
@@ -6833,24 +6833,31 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6833
6833
  }
6834
6834
  function isTitleOverflowing() {
6835
6835
  const titleEl = titleRef.value;
6836
- if (!titleEl) return false;
6836
+ if (!titleEl || !titleEl.parentElement) {
6837
+ return false;
6838
+ }
6839
+ const originalRect = titleEl.getBoundingClientRect();
6837
6840
  const clone = titleEl.cloneNode(true);
6838
- const computedStyle = window.getComputedStyle(titleEl);
6839
- clone.style.font = computedStyle.font;
6840
- clone.style.lineHeight = computedStyle.lineHeight;
6841
- clone.style.display = "block";
6842
- clone.style.width = titleEl.clientWidth + "px";
6843
- clone.style.visibility = "hidden";
6844
6841
  clone.style.position = "absolute";
6842
+ clone.style.top = "-9999px";
6843
+ clone.style.left = "-9999px";
6844
+ clone.style.visibility = "hidden";
6845
+ clone.style.width = `${originalRect.width}px`;
6846
+ clone.style.boxSizing = "border-box";
6845
6847
  clone.style.whiteSpace = "normal";
6846
- document.body.appendChild(clone);
6847
- const isOverflowing = clone.scrollHeight > titleEl.clientHeight + 1;
6848
- document.body.removeChild(clone);
6849
- return isOverflowing;
6848
+ clone.style.webkitLineClamp = "unset";
6849
+ clone.style.display = "block";
6850
+ titleEl.parentElement.appendChild(clone);
6851
+ const cloneHeight = clone.getBoundingClientRect().height;
6852
+ titleEl.parentElement.removeChild(clone);
6853
+ return cloneHeight > originalRect.height + 1;
6850
6854
  }
6851
- function checkTitleOverflow() {
6855
+ const checkOverflow2 = () => {
6852
6856
  moreArrowVisible.value = isTitleOverflowing();
6853
- }
6857
+ };
6858
+ onMounted(() => {
6859
+ checkOverflow2();
6860
+ });
6854
6861
  watch(
6855
6862
  () => props.title,
6856
6863
  () => {
@@ -6858,14 +6865,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6858
6865
  titleRef.value.classList.remove("plv-product-c-item__title--expanded");
6859
6866
  }
6860
6867
  nextTick$1(() => {
6861
- checkTitleOverflow();
6868
+ checkOverflow2();
6862
6869
  });
6863
6870
  }
6864
6871
  );
6865
- onMounted(() => {
6866
- checkTitleOverflow();
6867
- });
6868
- return { __sfc: true, props, titleRef, moreArrowVisible, handleExpand, isTitleOverflowing, checkTitleOverflow, ProductIconArrowDown };
6872
+ return { __sfc: true, props, titleRef, moreArrowVisible, handleExpand, isTitleOverflowing, checkOverflow: checkOverflow2, ProductIconArrowDown };
6869
6873
  }
6870
6874
  });
6871
6875
  var _sfc_render$A = function render11() {
@@ -15321,8 +15325,8 @@ console.log(
15321
15325
  "%c@polyv/product-ui",
15322
15326
  "background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
15323
15327
  "[component: index]",
15324
- "[version: 1.0.0-rc-20250612.3]",
15325
- "[buildTime: 2025-06-12 02:28:34]"
15328
+ "[version: 1.0.0-rc-20250612.4]",
15329
+ "[buildTime: 2025-06-12 09:58:06]"
15326
15330
  );
15327
15331
  export {
15328
15332
  AddressEdit,