@whitesev/pops 2.0.12 → 2.0.14

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.
@@ -10259,7 +10259,7 @@ System.register('pops', [], (function (exports) {
10259
10259
  if (typeof item.icon === "string" && item.icon.trim() !== "") {
10260
10260
  let iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
10261
10261
  let iconElement = popsDOMUtils.parseTextToDOM(
10262
- /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
10262
+ /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
10263
10263
  menuLiElement.appendChild(iconElement);
10264
10264
  }
10265
10265
  /* 插入文字 */
@@ -10316,11 +10316,14 @@ System.register('pops', [], (function (exports) {
10316
10316
  */
10317
10317
  async function liElementClickEvent(clickEvent) {
10318
10318
  if (typeof item.callback === "function") {
10319
- OriginPrototype.Object.defineProperty(menuEvent, "target", {
10320
- get() {
10321
- return menuEventTarget;
10322
- },
10323
- });
10319
+ try {
10320
+ OriginPrototype.Object.defineProperty(menuEvent, "target", {
10321
+ get() {
10322
+ return menuEventTarget;
10323
+ },
10324
+ });
10325
+ }
10326
+ catch (error) { }
10324
10327
  let callbackResult = await item.callback(clickEvent, menuEvent, menuLiElement, menuListenerRootNode);
10325
10328
  if (typeof callbackResult === "boolean" &&
10326
10329
  callbackResult == false) {