@whitesev/pops 2.0.13 → 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.
@@ -5,13 +5,15 @@ import type { PopsIconType } from "../../types/icon";
5
5
  */
6
6
  export interface PopsRightClickMenuDataDetails {
7
7
  /**
8
- * svg图标
8
+ * svg图标,留空则是没图标
9
+ * @default ""
9
10
  */
10
- icon: PopsIconType | string;
11
+ icon?: PopsIconType | string;
11
12
  /**
12
13
  * 图标是否旋转
14
+ * @default false
13
15
  */
14
- iconIsLoading: boolean;
16
+ iconIsLoading?: boolean;
15
17
  /**
16
18
  * 文字
17
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "弹窗库",
5
5
  "$schema": "https://json.schemastore.org/package.json",
6
6
  "main": "dist/index.cjs.js",
@@ -457,7 +457,9 @@ export const PopsRightClickMenu = {
457
457
  if (typeof item.icon === "string" && item.icon.trim() !== "") {
458
458
  let iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
459
459
  let iconElement = popsDOMUtils.parseTextToDOM(
460
- /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`
460
+ /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${
461
+ item.iconIsLoading ?? false
462
+ }">${iconSVGHTML}</i>`
461
463
  );
462
464
  menuLiElement.appendChild(iconElement);
463
465
  }
@@ -6,13 +6,15 @@ import type { PopsIconType } from "../../types/icon";
6
6
  */
7
7
  export interface PopsRightClickMenuDataDetails {
8
8
  /**
9
- * svg图标
9
+ * svg图标,留空则是没图标
10
+ * @default ""
10
11
  */
11
- icon: PopsIconType | string;
12
+ icon?: PopsIconType | string;
12
13
  /**
13
14
  * 图标是否旋转
15
+ * @default false
14
16
  */
15
- iconIsLoading: boolean;
17
+ iconIsLoading?: boolean;
16
18
  /**
17
19
  * 文字
18
20
  */