@kengic/core.react 0.0.1-beta.4 → 0.0.1-beta.6
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.
package/package.json
CHANGED
|
@@ -15,10 +15,10 @@ export type IKgWorkStationEventListener = IKgWorkStationOnMountEventListener;
|
|
|
15
15
|
* @param param.id 唯一标识.
|
|
16
16
|
* @param param.listener 事件监听函数.
|
|
17
17
|
*/
|
|
18
|
-
export declare function addEventListener<
|
|
18
|
+
export declare function addEventListener<L extends IKgWorkStationEventListener>(param: {
|
|
19
19
|
event: IKgWorkStationEvent;
|
|
20
20
|
id?: string | undefined;
|
|
21
|
-
listener:
|
|
21
|
+
listener: L;
|
|
22
22
|
}): void;
|
|
23
23
|
/**
|
|
24
24
|
* 移除事件监听.
|
|
@@ -27,10 +27,10 @@ export declare function addEventListener<T extends IKgWorkStationEventListener>(
|
|
|
27
27
|
* @param param.id 唯一标识.
|
|
28
28
|
* @param param.listener 事件监听函数.
|
|
29
29
|
*/
|
|
30
|
-
export declare function removeEventListener(param: {
|
|
30
|
+
export declare function removeEventListener<L extends IKgWorkStationEventListener>(param: {
|
|
31
31
|
event: IKgWorkStationEvent;
|
|
32
32
|
id?: string | undefined;
|
|
33
|
-
listener?:
|
|
33
|
+
listener?: L;
|
|
34
34
|
}): void;
|
|
35
35
|
/**
|
|
36
36
|
* 触发事件.
|
|
@@ -39,8 +39,8 @@ export declare function removeEventListener(param: {
|
|
|
39
39
|
* @param param.id 唯一标识.
|
|
40
40
|
* @param param.parameter 事件参数.
|
|
41
41
|
*/
|
|
42
|
-
export declare function emit<
|
|
42
|
+
export declare function emit<P = IKgWorkStationEventListenerParameter>(param: {
|
|
43
43
|
event: IKgWorkStationEvent;
|
|
44
44
|
id?: string | undefined;
|
|
45
|
-
parameter
|
|
45
|
+
parameter?: P;
|
|
46
46
|
}): Promise<boolean>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { IKgWorkStationState, store } from './index.store';
|
|
2
|
+
import { IKgWorkStationOnMountEventListener } from './index.event.ts';
|
|
3
|
+
import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
4
|
export interface IDoKgWorkStation {
|
|
3
5
|
/**
|
|
4
6
|
* 关闭弹窗.
|
|
@@ -8,6 +10,13 @@ export interface IDoKgWorkStation {
|
|
|
8
10
|
* 挂载.
|
|
9
11
|
*/
|
|
10
12
|
mount(): void;
|
|
13
|
+
/**
|
|
14
|
+
* 监听事件: 挂载.
|
|
15
|
+
*
|
|
16
|
+
* @param listener 事件监听函数.
|
|
17
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
|
18
|
+
*/
|
|
19
|
+
onMount(listener: IKgWorkStationOnMountEventListener, isOnce?: boolean): IRemoveEventListener;
|
|
11
20
|
/**
|
|
12
21
|
* 打开弹窗.
|
|
13
22
|
*/
|