@kengic/vue 0.26.6-beta.131 → 0.26.6-beta.133

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,9 +2,10 @@ import { IKgEventListener } from '@kengic/core.core';
2
2
  /**
3
3
  * 事件类型.
4
4
  * 'onRequest': 变量配置查询完成
5
- * 'onUnmounted': 页面销毁
5
+ * 'onSetup': 页面创建
6
+ * 'onUnmounted': 页面卸载
6
7
  */
7
- export declare type IKgVarEvent = 'onRequest' | 'onUnmounted';
8
+ export declare type IKgVarEvent = 'onRequest' | 'onSetup' | 'onUnmounted';
8
9
  export declare type IKgVarOnRequestEventListenerParameter = {
9
10
  /**
10
11
  * 界面标识.
@@ -12,6 +13,13 @@ export declare type IKgVarOnRequestEventListenerParameter = {
12
13
  formID: string;
13
14
  };
14
15
  export declare type IKgVarOnRequestEventListener = ((param: IKgVarOnRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
16
+ export declare type IKgVarOnSetupEventListenerParameter = {
17
+ /**
18
+ * 界面标识.
19
+ */
20
+ formID: string;
21
+ };
22
+ export declare type IKgVarOnSetupEventListener = ((param: IKgVarOnSetupEventListenerParameter) => void) & IKgEventListener;
15
23
  export declare type IKgVarOnUnmountedEventListenerParameter = {
16
24
  /**
17
25
  * 界面标识.
@@ -19,10 +27,11 @@ export declare type IKgVarOnUnmountedEventListenerParameter = {
19
27
  formID: string;
20
28
  };
21
29
  export declare type IKgVarOnUnmountedEventListener = ((param: IKgVarOnUnmountedEventListenerParameter) => Promise<boolean>) & IKgEventListener;
22
- export declare type IKgVarEventListenerParameter = IKgVarOnRequestEventListenerParameter | IKgVarOnUnmountedEventListenerParameter;
23
- export declare type IKgVarEventListener = IKgVarOnRequestEventListener | IKgVarOnUnmountedEventListener;
30
+ export declare type IKgVarEventListenerParameter = IKgVarOnRequestEventListenerParameter | IKgVarOnSetupEventListenerParameter | IKgVarOnUnmountedEventListenerParameter;
31
+ export declare type IKgVarEventListener = IKgVarOnRequestEventListener | IKgVarOnSetupEventListener | IKgVarOnUnmountedEventListener;
24
32
  export declare const eventListenerListRecordRecord: Record<string, {
25
33
  onRequest: Array<IKgVarOnRequestEventListener>;
34
+ onSetup: Array<IKgVarOnSetupEventListener>;
26
35
  onUnmounted: Array<IKgVarOnUnmountedEventListener>;
27
36
  }>;
28
37
  /**
@@ -37,3 +46,15 @@ export declare function emit<P extends IKgVarEventListenerParameter>(param: {
37
46
  id?: string | undefined;
38
47
  parameter: P;
39
48
  }): Promise<boolean>;
49
+ /**
50
+ * 触发事件:同步.
51
+ *
52
+ * @param param.event 事件名称.
53
+ * @param param.id 唯一标识.
54
+ * @param param.parameter 事件参数.
55
+ */
56
+ export declare function emitSync<P extends IKgVarEventListenerParameter>(param: {
57
+ event: IKgVarEvent;
58
+ id?: string | undefined;
59
+ parameter: P;
60
+ }): void;
@@ -8,7 +8,7 @@ import { type IUseKgSearch } from '../KgSearch';
8
8
  import { IUseKgSubmit } from '../KgSubmit';
9
9
  import { IUseKgTable } from '../KgTable';
10
10
  import { IUseKgVarConfig } from '../KgVarConfig';
11
- import { IKgVarOnRequestEventListener, IKgVarOnUnmountedEventListener } from './index.event';
11
+ import { IKgVarOnRequestEventListener, IKgVarOnSetupEventListener, IKgVarOnUnmountedEventListener } from './index.event';
12
12
  import { IKgVarStore } from './index.store';
13
13
  import { IKgProps, IKgSlots } from './index.vm';
14
14
  export declare type IUseKgVar = {
@@ -132,7 +132,14 @@ export declare type IUseKgVar = {
132
132
  */
133
133
  onRetrieve(listener: IKgVarOnRequestEventListener, isOnce?: boolean): IRemoveEventListener;
134
134
  /**
135
- * 监听事件: 页面销毁.
135
+ * 监听事件: 页面创建.
136
+ *
137
+ * @param listener 事件监听函数.
138
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
139
+ */
140
+ onSetup(listener: IKgVarOnSetupEventListener, isOnce?: boolean): IRemoveEventListener;
141
+ /**
142
+ * 监听事件: 页面卸载.
136
143
  *
137
144
  * @param listener 事件监听函数.
138
145
  * @param isOnce 是否只会触发一次. 默认为 undefined.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.6-beta.131",
3
+ "version": "0.26.6-beta.133",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
@@ -39,8 +39,8 @@
39
39
  "@iconify-icons/mdi": "1.2.48",
40
40
  "@iconify-icons/ph": "1.2.5",
41
41
  "@iconify/vue": "4.1.2",
42
- "@kengic/core.core": "0.0.1-beta.14",
43
- "@kengic/core.react": "0.0.1-beta.20",
42
+ "@kengic/core.core": "0.0.1-beta.16",
43
+ "@kengic/core.react": "0.0.1-beta.22",
44
44
  "@kengic/pont": "1.2.17-beta.1",
45
45
  "@rys-fe/vite-plugin-theme": "0.8.6",
46
46
  "@thymine/xunee": "0.4.9-beta.8",