@kengic/vue 0.26.5-beta.7 → 0.26.5-beta.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ export interface IUseKgAppSelectStoreActions {
33
33
  * @param event 事件名称.
34
34
  * @param listener 事件监听函数.
35
35
  */
36
- addEventListener(event: IKgAppSelectEvent, listener: IKgAppSelectEventListener): void;
36
+ addEventListener(event: IKgAppSelectEvent, listener: any): void;
37
37
  /**
38
38
  * 触发事件.
39
39
  * @param event 事件名称.
@@ -67,7 +67,7 @@ export interface IUseKgAppSelectStoreActions {
67
67
  * @param event 事件名称.
68
68
  * @param listener 事件监听函数.
69
69
  */
70
- removeEventListener(event: IKgAppSelectEvent, listener?: IKgAppSelectEventListener): void;
70
+ removeEventListener(event: IKgAppSelectEvent, listener?: any): void;
71
71
  }
72
72
  export declare type IUseKgAppSelectStore = StoreDefinition<'KgAppSelect', IUseKgAppSelectStoreState, IUseKgAppSelectStoreGetters, IUseKgAppSelectStoreActions>;
73
73
  export declare type IKgAppSelectStore = ReturnType<IUseKgAppSelectStore>;
@@ -73,7 +73,7 @@ export interface IUseKgButtonStoreActions {
73
73
  * @param event 事件名称.
74
74
  * @param listener 事件监听函数.
75
75
  */
76
- addEventListener(formID: string, event: IKgButtonEvent, listener: IKgButtonEventListener): void;
76
+ addEventListener(formID: string, event: IKgButtonEvent, listener: any): void;
77
77
  /**
78
78
  * <p>手动点击某个按钮.</p>
79
79
  * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
@@ -97,7 +97,7 @@ export interface IUseKgButtonStoreActions {
97
97
  * @param event 事件名称.
98
98
  * @param listener 事件监听函数.
99
99
  */
100
- removeEventListener(formID: string, event: IKgButtonEvent, listener?: IKgButtonEventListener): void;
100
+ removeEventListener(formID: string, event: IKgButtonEvent, listener?: any): void;
101
101
  setCurrentButton(formID: string, param: {
102
102
  type?: KG__VAR_BUTTON__TYPE;
103
103
  varName?: string | null;
@@ -1,6 +1,26 @@
1
1
  import { Q } from '@thymine/xunee';
2
2
  import { Ref } from 'vue';
3
3
  import { IKgCanvasContextMenu, KgCanvasContextMenuProps } from './KgCanvas.ContextMenu';
4
+ export declare type IKgCanvasElementProperties = {
5
+ /**
6
+ * 编码, 全局唯一.
7
+ */
8
+ code?: string;
9
+ /**
10
+ * 数据.
11
+ */
12
+ data?: any;
13
+ /**
14
+ * 样式.
15
+ */
16
+ style?: {
17
+ /**
18
+ * 鼠标划过时的指针样式.
19
+ */
20
+ hoverCursor?: 'pointer' | 'default';
21
+ };
22
+ [index: string]: any;
23
+ };
4
24
  export declare type IUseGlobalContextMenus = {
5
25
  globalContextMenus: Array<IKgCanvasContextMenu>;
6
26
  };
@@ -1,3 +1,4 @@
1
1
  export { default as KgCanvas } from './KgCanvas';
2
2
  export { type IKgCanvasContextMenu } from './KgCanvas.ContextMenu';
3
3
  export * from './index.hooks';
4
+ export { type IKgCanvasElementProperties } from './KgCanvas.service';
@@ -1,12 +1,36 @@
1
1
  import { IRemoveEventListenerHandler } from '../../consts';
2
- import { IKgCanvasOnInitEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnRightClickEventListener, IKgCanvasStore } from './index.store';
2
+ import { IKgCanvasOnClickEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnRightClickEventListener, IKgCanvasStore } from './index.store';
3
3
  export declare type IUseKgCanvas = {
4
+ /**
5
+ * 监听事件: 单击鼠标左键.
6
+ * @param listener 事件监听函数.
7
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
8
+ */
9
+ onClick(listener: IKgCanvasOnClickEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
4
10
  /**
5
11
  * 监听事件: 图形组件初始完成.
6
12
  * @param listener 事件监听函数.
7
13
  * @param isOnce 是否只会触发一次. 默认为 undefined.
8
14
  */
9
15
  onInit(listener: IKgCanvasOnInitEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
16
+ /**
17
+ * 监听事件: 鼠标进入.
18
+ * @param listener 事件监听函数.
19
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
20
+ */
21
+ onMouseEnter(listener: IKgCanvasOnMouseEnterEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
22
+ /**
23
+ * 监听事件: 鼠标离开.
24
+ * @param listener 事件监听函数.
25
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
26
+ */
27
+ onMouseLeave(listener: IKgCanvasOnMouseLeaveEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
28
+ /**
29
+ * 监听事件: 鼠标移动.
30
+ * @param listener 事件监听函数.
31
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
32
+ */
33
+ onMouseMove(listener: IKgCanvasOnMouseMoveEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
10
34
  /**
11
35
  * 监听事件: 重新加载.
12
36
  * @param listener 事件监听函数.
@@ -14,7 +38,7 @@ export declare type IUseKgCanvas = {
14
38
  */
15
39
  onReload(listener: IKgCanvasOnReloadEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
16
40
  /**
17
- * 监听事件: 单击右键.
41
+ * 监听事件: 单击鼠标右键.
18
42
  * @param listener 事件监听函数.
19
43
  * @param isOnce 是否只会触发一次. 默认为 undefined.
20
44
  */
@@ -6,10 +6,14 @@ import { type IKgCanvasContextMenu } from './KgCanvas.ContextMenu';
6
6
  /**
7
7
  * 事件类型.
8
8
  * 'onInit': 图形组件初始完成
9
- * 'onRightClick': 单击右键
10
9
  * 'onReload': 重新加载
10
+ * 'onMouseMove': 鼠标移动
11
+ * 'onMouseEnter': 鼠标进入
12
+ * 'onMouseLeave': 鼠标离开
13
+ * 'onClick': 单击鼠标左键
14
+ * 'onRightClick': 单击鼠标右键
11
15
  */
12
- export declare type IKgCanvasEvent = 'onInit' | 'onRightClick' | 'onReload';
16
+ export declare type IKgCanvasEvent = 'onInit' | 'onReload' | 'onMouseMove' | 'onMouseEnter' | 'onMouseLeave' | 'onClick' | 'onRightClick';
13
17
  export declare type IKgCanvasOnInitEventListenerParameter = {
14
18
  /**
15
19
  * Q.
@@ -34,11 +38,11 @@ export declare type IKgCanvasOnRightClickEventListenerParameter = {
34
38
  contextMenus: Ref<Array<IKgCanvasContextMenu>>;
35
39
  eid: string;
36
40
  /**
37
- * 被右键单击的图元.
41
+ * 图元.
38
42
  */
39
43
  element?: Q.Element;
40
44
  /**
41
- * 被右键单击的图元组件.
45
+ * 图元组件.
42
46
  */
43
47
  elementUI?: Q.ElementUI;
44
48
  /**
@@ -46,7 +50,7 @@ export declare type IKgCanvasOnRightClickEventListenerParameter = {
46
50
  */
47
51
  graph: Q.Graph;
48
52
  /**
49
- * 被右键单击的图元组件.
53
+ * 图元组件.
50
54
  */
51
55
  ui?: Q.BaseUI;
52
56
  };
@@ -63,10 +67,110 @@ export declare type IKgCanvasOnReloadEventListenerParameter = {
63
67
  graph: Q.Graph;
64
68
  };
65
69
  export declare type IKgCanvasOnReloadEventListener = ((param: IKgCanvasOnReloadEventListenerParameter) => Promise<boolean>) & IKgEventListener;
66
- export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter | IKgCanvasOnRightClickEventListenerParameter | IKgCanvasOnReloadEventListenerParameter;
67
- export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener | IKgCanvasOnRightClickEventListener | IKgCanvasOnReloadEventListener;
70
+ export declare type IKgCanvasOnMouseMoveEventListenerParameter = {
71
+ /**
72
+ * Q.
73
+ */
74
+ Q: typeof Q;
75
+ eid: string;
76
+ /**
77
+ * 图元.
78
+ */
79
+ element?: Q.Element;
80
+ /**
81
+ * 图元组件.
82
+ */
83
+ elementUI?: Q.ElementUI;
84
+ /**
85
+ * 图形组件对象.
86
+ */
87
+ graph: Q.Graph;
88
+ /**
89
+ * 图元组件.
90
+ */
91
+ ui?: Q.BaseUI;
92
+ };
93
+ export declare type IKgCanvasOnMouseMoveEventListener = ((param: IKgCanvasOnMouseMoveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
94
+ export declare type IKgCanvasOnMouseLeaveEventListenerParameter = {
95
+ /**
96
+ * Q.
97
+ */
98
+ Q: typeof Q;
99
+ eid: string;
100
+ /**
101
+ * 图元.
102
+ */
103
+ element?: Q.Element;
104
+ /**
105
+ * 图元组件.
106
+ */
107
+ elementUI?: Q.ElementUI;
108
+ /**
109
+ * 图形组件对象.
110
+ */
111
+ graph: Q.Graph;
112
+ /**
113
+ * 图元组件.
114
+ */
115
+ ui?: Q.BaseUI;
116
+ };
117
+ export declare type IKgCanvasOnMouseLeaveEventListener = ((param: IKgCanvasOnMouseLeaveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
118
+ export declare type IKgCanvasOnMouseEnterEventListenerParameter = {
119
+ /**
120
+ * Q.
121
+ */
122
+ Q: typeof Q;
123
+ eid: string;
124
+ /**
125
+ * 图元.
126
+ */
127
+ element?: Q.Element;
128
+ /**
129
+ * 图元组件.
130
+ */
131
+ elementUI?: Q.ElementUI;
132
+ /**
133
+ * 图形组件对象.
134
+ */
135
+ graph: Q.Graph;
136
+ /**
137
+ * 图元组件.
138
+ */
139
+ ui?: Q.BaseUI;
140
+ };
141
+ export declare type IKgCanvasOnMouseEnterEventListener = ((param: IKgCanvasOnMouseEnterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
142
+ export declare type IKgCanvasOnClickEventListenerParameter = {
143
+ /**
144
+ * Q.
145
+ */
146
+ Q: typeof Q;
147
+ eid: string;
148
+ /**
149
+ * 图元.
150
+ */
151
+ element?: Q.Element;
152
+ /**
153
+ * 图元组件.
154
+ */
155
+ elementUI?: Q.ElementUI;
156
+ /**
157
+ * 图形组件对象.
158
+ */
159
+ graph: Q.Graph;
160
+ /**
161
+ * 图元组件.
162
+ */
163
+ ui?: Q.BaseUI;
164
+ };
165
+ export declare type IKgCanvasOnClickEventListener = ((param: IKgCanvasOnClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
166
+ export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter | IKgCanvasOnRightClickEventListenerParameter | IKgCanvasOnReloadEventListenerParameter | IKgCanvasOnMouseMoveEventListenerParameter | IKgCanvasOnMouseEnterEventListenerParameter | IKgCanvasOnMouseLeaveEventListenerParameter | IKgCanvasOnClickEventListenerParameter;
167
+ export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener | IKgCanvasOnRightClickEventListener | IKgCanvasOnReloadEventListener | IKgCanvasOnMouseMoveEventListener | IKgCanvasOnMouseEnterEventListener | IKgCanvasOnMouseLeaveEventListener | IKgCanvasOnClickEventListener;
68
168
  export interface IUseKgCanvasStoreState {
169
+ onClickEventListenerMap: Map<string, Array<IKgCanvasOnClickEventListener>>;
69
170
  onInitEventListenerMap: Map<string, Array<IKgCanvasOnInitEventListener>>;
171
+ onMouseEnterEventListenerMap: Map<string, Array<IKgCanvasOnMouseEnterEventListener>>;
172
+ onMouseLeaveEventListenerMap: Map<string, Array<IKgCanvasOnMouseLeaveEventListener>>;
173
+ onMouseMoveEventListenerMap: Map<string, Array<IKgCanvasOnMouseMoveEventListener>>;
70
174
  onReloadEventListenerMap: Map<string, Array<IKgCanvasOnReloadEventListener>>;
71
175
  onRightClickEventListenerMap: Map<string, Array<IKgCanvasOnRightClickEventListener>>;
72
176
  }
@@ -78,7 +182,7 @@ export interface IUseKgCanvasStoreActions {
78
182
  * @param event 事件名称.
79
183
  * @param listener 事件监听函数.
80
184
  */
81
- addEventListener(event: IKgCanvasEvent, listener: IKgCanvasEventListener): void;
185
+ addEventListener(event: IKgCanvasEvent, listener: any): void;
82
186
  /**
83
187
  * 触发事件.
84
188
  * @param event 事件名称.
@@ -90,7 +194,7 @@ export interface IUseKgCanvasStoreActions {
90
194
  * @param event 事件名称.
91
195
  * @param listener 事件监听函数.
92
196
  */
93
- removeEventListener(event: IKgCanvasEvent, listener?: IKgCanvasEventListener): void;
197
+ removeEventListener(event: IKgCanvasEvent, listener?: any): void;
94
198
  }
95
199
  export declare type IUseKgCanvasStore = StoreDefinition<'KgCanvas', IUseKgCanvasStoreState, IUseKgCanvasStoreGetters, IUseKgCanvasStoreActions>;
96
200
  export declare type IKgCanvasStore = ReturnType<IUseKgCanvasStore>;
@@ -195,7 +195,7 @@ export interface IUseKgFormStoreActions {
195
195
  * @param event 事件名称.
196
196
  * @param listener 事件监听函数.
197
197
  */
198
- addEventListener(formID: string | null | undefined, event: IKgFormEvent, listener: IKgFormEventListener): void;
198
+ addEventListener(formID: string | null | undefined, event: IKgFormEvent, listener: any): void;
199
199
  /**
200
200
  * 清理数据.
201
201
  * @param formID 页面标识.
@@ -214,7 +214,7 @@ export interface IUseKgFormStoreActions {
214
214
  * @param event 事件名称.
215
215
  * @param listener 事件监听函数.
216
216
  */
217
- removeEventListener(formID: string | null | undefined, event: IKgFormEvent, listener?: IKgFormEventListener): void;
217
+ removeEventListener(formID: string | null | undefined, event: IKgFormEvent, listener?: any): void;
218
218
  }
219
219
  export declare type IUseKgFormStore = StoreDefinition<'KgForm', IUseKgFormStoreState, IUseKgFormStoreGetters, IUseKgFormStoreActions>;
220
220
  export declare type IKgFormStore = ReturnType<IUseKgFormStore>;
@@ -82,7 +82,7 @@ export interface IUseKgSearchStoreActions {
82
82
  * @param event 事件名称.
83
83
  * @param listener 事件监听函数.
84
84
  */
85
- addEventListener(formID: string, event: IKgSearchEvent, listener: IKgSearchEventListener): void;
85
+ addEventListener(formID: string, event: IKgSearchEvent, listener: any): void;
86
86
  /**
87
87
  * 清理数据.
88
88
  * @param formID 页面标识.
@@ -115,7 +115,7 @@ export interface IUseKgSearchStoreActions {
115
115
  * @param event 事件名称.
116
116
  * @param listener 事件监听函数.
117
117
  */
118
- removeEventListener(formID: string, event: IKgSearchEvent, listener?: IKgSearchEventListener): void;
118
+ removeEventListener(formID: string, event: IKgSearchEvent, listener?: any): void;
119
119
  setDynamicQueryOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
120
120
  /**
121
121
  * 设置表单数据.
@@ -159,7 +159,7 @@ export interface IUseKgSubmitStoreActions {
159
159
  * @param event 事件名称.
160
160
  * @param listener 事件监听函数.
161
161
  */
162
- addEventListener(formID: string, event: IKgSubmitEvent, listener: IKgSubmitEventListener): void;
162
+ addEventListener(formID: string, event: IKgSubmitEvent, listener: any): void;
163
163
  /**
164
164
  * 添加一个「提交表单字段」.
165
165
  *
@@ -185,7 +185,7 @@ export interface IUseKgSubmitStoreActions {
185
185
  * @param event 事件名称.
186
186
  * @param listener 事件监听函数.
187
187
  */
188
- removeEventListener(formID: string, event: IKgSubmitEvent, listener?: IKgSubmitEventListener): void;
188
+ removeEventListener(formID: string, event: IKgSubmitEvent, listener?: any): void;
189
189
  setFormModel(formID?: string | null, model?: Record<string, any> | null): void;
190
190
  setIsLoading(formID: string, value: boolean): void;
191
191
  }
@@ -147,7 +147,7 @@ export interface IUseKgTableStoreActions {
147
147
  * @param event 事件名称.
148
148
  * @param listener 事件监听函数.
149
149
  */
150
- addEventListener(formID: string | null | undefined, event: IKgTableEvent, listener: IKgTableEventListener): void;
150
+ addEventListener(formID: string | null | undefined, event: IKgTableEvent, listener: any): void;
151
151
  /**
152
152
  * 清空表格数据.
153
153
  * @param formID 界面标识.
@@ -198,7 +198,7 @@ export interface IUseKgTableStoreActions {
198
198
  * @param event 事件名称.
199
199
  * @param listener 事件监听函数.
200
200
  */
201
- removeEventListener(formID: string | null | undefined, event: IKgTableEvent, listener?: IKgTableEventListener): void;
201
+ removeEventListener(formID: string | null | undefined, event: IKgTableEvent, listener?: any): void;
202
202
  /**
203
203
  * 设置列表数据.
204
204
  * @param param.frmId 界面标识.
@@ -151,7 +151,7 @@ export interface IUseKgVarStoreActions {
151
151
  * @param event 事件名称.
152
152
  * @param listener 事件监听函数.
153
153
  */
154
- addEventListener(formID: string | null | undefined, event: IKgVarEvent, listener: IKgVarEventListener): void;
154
+ addEventListener(formID: string | null | undefined, event: IKgVarEvent, listener: any): void;
155
155
  createVarConfigControl(formID: string | null | undefined, varConfigControl: VarConfigControl): void;
156
156
  createVarConfigDescription(formID: string | null | undefined, varConfigDescription: VarConfigDescription): void;
157
157
  createVarConfigPossibility(formID: string | null | undefined, varConfigPossibility: VarConfigPossibility): void;
@@ -205,7 +205,7 @@ export interface IUseKgVarStoreActions {
205
205
  * @param event 事件名称.
206
206
  * @param listener 事件监听函数.
207
207
  */
208
- removeEventListener(formID: string, event: IKgVarEvent, listener?: IKgVarEventListener): void;
208
+ removeEventListener(formID: string, event: IKgVarEvent, listener?: any): void;
209
209
  /**
210
210
  * 查询所有变量配置.
211
211
  *
@@ -32,7 +32,7 @@ export interface IUseKgWarehouseStoreActions {
32
32
  * @param event 事件名称.
33
33
  * @param listener 事件监听函数.
34
34
  */
35
- addEventListener(event: IKgWarehouseEvent, listener: IKgWarehouseEventListener): void;
35
+ addEventListener(event: IKgWarehouseEvent, listener: any): void;
36
36
  /**
37
37
  * 触发事件.
38
38
  * @param event 事件名称.
@@ -44,7 +44,7 @@ export interface IUseKgWarehouseStoreActions {
44
44
  * @param event 事件名称.
45
45
  * @param listener 事件监听函数.
46
46
  */
47
- removeEventListener(event: IKgWarehouseEvent, listener?: IKgWarehouseEventListener): void;
47
+ removeEventListener(event: IKgWarehouseEvent, listener?: any): void;
48
48
  /**
49
49
  * 设置是否显示弹窗.
50
50
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.5-beta.7",
3
+ "version": "0.26.5-beta.8",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
@@ -42,7 +42,7 @@
42
42
  "@iconify/vue": "4.1.1",
43
43
  "@kengic/pont": "1.2.17-beta.0",
44
44
  "@rys-fe/vite-plugin-theme": "0.8.6",
45
- "@thymine/xunee": "0.4.9-beta.3",
45
+ "@thymine/xunee": "0.4.9-beta.5",
46
46
  "@types/crypto-js": "4.1.1",
47
47
  "@types/fs-extra": "9.0.13",
48
48
  "@types/inquirer": "8.2.5",