uview-plus组件库全面升级更新,订单结算判断支付方式是否可用代码调整,公众号关注二维码修改

This commit is contained in:
2025-10-21 10:44:31 +08:00
parent 5d98b7efc2
commit 5f3a307fec
395 changed files with 31264 additions and 2477 deletions

View File

@@ -0,0 +1,18 @@
// @ts-nocheck
export function findClosestElementWithStyle(startEl: UniElement | null, styleProperty: string): UniElement | null {
let currentEl: UniElement | null = startEl;
while (currentEl != null) {
// Check if the current element has the style property with a non-empty value
const styleValue = currentEl?.style.getPropertyValue(styleProperty) ?? '';
if (styleValue.trim() != '') {
return currentEl;
}
// Move to parent element
currentEl = currentEl.parentElement;
}
// Return null if no element with the specified style was found
return null;
};