@whitesev/pops 1.2.1 → 1.2.3

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.
@@ -20,9 +20,12 @@ export interface PopsRightClickMenuDataDetails {
20
20
  * @param clickEvent 点击菜单的click事件
21
21
  * @param contextMenuEvent 触发的contextmenu事件
22
22
  * @param liElement <li>元素
23
+ * @returns
24
+ * + true(默认) 关闭菜单
25
+ * + false 不关闭菜单
23
26
  *
24
27
  */
25
- callback?: (clickEvent: PointerEvent, contextMenuEvent: PointerEvent, liElement: HTMLLIElement) => boolean | void;
28
+ callback?: (clickEvent: PointerEvent, contextMenuEvent: PointerEvent, liElement: HTMLLIElement) => boolean | void | Promise<boolean | void>;
26
29
  /**
27
30
  * 子项配置
28
31
  */
@@ -88,3 +88,29 @@ export type PopsPanelFormsTotalDetails =
88
88
  | PopsPanelButtonDetails
89
89
  | PopsPanelDeepMenuDetails
90
90
  | PopsPanelOwnDetails;
91
+
92
+ /**
93
+ * pops.xxx的调用返回值
94
+ */
95
+ export interface PopsCallResult {
96
+ /** 唯一标识id */
97
+ guid: string;
98
+ /** 影子元素 */
99
+ $shadowContainer: HTMLDivElement;
100
+ /** 影子元素的根节点 */
101
+ $shadowRoot: ShadowRoot;
102
+ /** 元素 */
103
+ element: HTMLDivElement;
104
+ /** 动画层元素 */
105
+ animElement: HTMLDivElement;
106
+ /** pops元素 */
107
+ popsElement: HTMLDivElement;
108
+ /** 遮罩层元素 */
109
+ maskElement?: HTMLDivElement;
110
+ /** 关闭弹窗 */
111
+ close(): void;
112
+ /** 隐藏弹窗 */
113
+ hide(): void;
114
+ /** 显示弹窗 */
115
+ show(): void;
116
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/node/index.esm.js",