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