@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.
- package/address-edit.cjs.js +1 -1
- package/address-edit.es.js +2 -2
- package/address-edit.umd.js +1 -1
- package/address-item.cjs.js +1 -1
- package/address-item.es.js +2 -2
- package/address-item.umd.js +1 -1
- package/address-list.cjs.js +1 -1
- package/address-list.es.js +2 -2
- package/address-list.umd.js +1 -1
- package/index.cjs.js +1 -1
- package/index.es.js +24 -20
- package/index.umd.js +1 -1
- package/mobile-product-pendant.cjs.js +1 -1
- package/mobile-product-pendant.es.js +2 -2
- package/mobile-product-pendant.umd.js +1 -1
- package/order-confirm.cjs.js +1 -1
- package/order-confirm.es.js +2 -2
- package/order-confirm.umd.js +1 -1
- package/order-detail.cjs.js +1 -1
- package/order-detail.es.js +2 -2
- package/order-detail.umd.js +1 -1
- package/order-item.cjs.js +1 -1
- package/order-item.es.js +2 -2
- package/order-item.umd.js +1 -1
- package/order-list-popup.cjs.js +1 -1
- package/order-list-popup.es.js +2 -2
- package/order-list-popup.umd.js +1 -1
- package/order-list.cjs.js +1 -1
- package/order-list.es.js +2 -2
- package/order-list.umd.js +1 -1
- package/order-popup.cjs.js +1 -1
- package/order-popup.es.js +2 -2
- package/order-popup.umd.js +1 -1
- package/package.json +1 -1
- package/pc-product-pendant.cjs.js +1 -1
- package/pc-product-pendant.es.js +2 -2
- package/pc-product-pendant.umd.js +1 -1
- package/product-button.cjs.js +1 -1
- package/product-button.es.js +2 -2
- package/product-button.umd.js +1 -1
- package/product-detail-popup.cjs.js +1 -1
- package/product-detail-popup.es.js +24 -20
- package/product-detail-popup.umd.js +1 -1
- package/product-detail.cjs.js +1 -1
- package/product-detail.es.js +24 -20
- package/product-detail.umd.js +2 -2
- package/product-iframe-link-popup.cjs.js +1 -1
- package/product-iframe-link-popup.es.js +2 -2
- package/product-iframe-link-popup.umd.js +1 -1
- package/product-item.cjs.js +1 -1
- package/product-item.es.js +24 -20
- package/product-item.umd.js +1 -1
- package/product-list-popup.cjs.js +2 -2
- package/product-list-popup.es.js +24 -20
- package/product-list-popup.umd.js +2 -2
- package/product-list.cjs.js +1 -1
- package/product-list.es.js +24 -20
- package/product-list.umd.js +1 -1
package/product-item.es.js
CHANGED
|
@@ -1774,24 +1774,31 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1774
1774
|
}
|
|
1775
1775
|
function isTitleOverflowing() {
|
|
1776
1776
|
const titleEl = titleRef.value;
|
|
1777
|
-
if (!titleEl)
|
|
1777
|
+
if (!titleEl || !titleEl.parentElement) {
|
|
1778
|
+
return false;
|
|
1779
|
+
}
|
|
1780
|
+
const originalRect = titleEl.getBoundingClientRect();
|
|
1778
1781
|
const clone = titleEl.cloneNode(true);
|
|
1779
|
-
const computedStyle = window.getComputedStyle(titleEl);
|
|
1780
|
-
clone.style.font = computedStyle.font;
|
|
1781
|
-
clone.style.lineHeight = computedStyle.lineHeight;
|
|
1782
|
-
clone.style.display = "block";
|
|
1783
|
-
clone.style.width = titleEl.clientWidth + "px";
|
|
1784
|
-
clone.style.visibility = "hidden";
|
|
1785
1782
|
clone.style.position = "absolute";
|
|
1783
|
+
clone.style.top = "-9999px";
|
|
1784
|
+
clone.style.left = "-9999px";
|
|
1785
|
+
clone.style.visibility = "hidden";
|
|
1786
|
+
clone.style.width = `${originalRect.width}px`;
|
|
1787
|
+
clone.style.boxSizing = "border-box";
|
|
1786
1788
|
clone.style.whiteSpace = "normal";
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1789
|
+
clone.style.webkitLineClamp = "unset";
|
|
1790
|
+
clone.style.display = "block";
|
|
1791
|
+
titleEl.parentElement.appendChild(clone);
|
|
1792
|
+
const cloneHeight = clone.getBoundingClientRect().height;
|
|
1793
|
+
titleEl.parentElement.removeChild(clone);
|
|
1794
|
+
return cloneHeight > originalRect.height + 1;
|
|
1791
1795
|
}
|
|
1792
|
-
|
|
1796
|
+
const checkOverflow = () => {
|
|
1793
1797
|
moreArrowVisible.value = isTitleOverflowing();
|
|
1794
|
-
}
|
|
1798
|
+
};
|
|
1799
|
+
onMounted(() => {
|
|
1800
|
+
checkOverflow();
|
|
1801
|
+
});
|
|
1795
1802
|
watch(
|
|
1796
1803
|
() => props.title,
|
|
1797
1804
|
() => {
|
|
@@ -1799,14 +1806,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1799
1806
|
titleRef.value.classList.remove("plv-product-c-item__title--expanded");
|
|
1800
1807
|
}
|
|
1801
1808
|
nextTick(() => {
|
|
1802
|
-
|
|
1809
|
+
checkOverflow();
|
|
1803
1810
|
});
|
|
1804
1811
|
}
|
|
1805
1812
|
);
|
|
1806
|
-
|
|
1807
|
-
checkTitleOverflow();
|
|
1808
|
-
});
|
|
1809
|
-
return { __sfc: true, props, titleRef, moreArrowVisible, handleExpand, isTitleOverflowing, checkTitleOverflow, ProductIconArrowDown };
|
|
1813
|
+
return { __sfc: true, props, titleRef, moreArrowVisible, handleExpand, isTitleOverflowing, checkOverflow, ProductIconArrowDown };
|
|
1810
1814
|
}
|
|
1811
1815
|
});
|
|
1812
1816
|
var _sfc_render$4 = function render2() {
|
|
@@ -3692,8 +3696,8 @@ console.log(
|
|
|
3692
3696
|
"%c@polyv/product-ui",
|
|
3693
3697
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
3694
3698
|
"[component: product-item]",
|
|
3695
|
-
"[version: 1.0.0-rc-20250612.
|
|
3696
|
-
"[buildTime: 2025-06-12
|
|
3699
|
+
"[version: 1.0.0-rc-20250612.4]",
|
|
3700
|
+
"[buildTime: 2025-06-12 09:58:17]"
|
|
3697
3701
|
);
|
|
3698
3702
|
export {
|
|
3699
3703
|
productItem as default
|