@kengic/vue 0.26.6-beta.108 → 0.26.6-beta.110
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +5158 -5251
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +3 -3
- package/dist/src/component/KgAppSelect/index.store.d.ts +2 -2
- package/dist/src/component/KgButton/index.hooks.d.ts +5 -5
- package/dist/src/component/KgButton/index.store.d.ts +2 -2
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +0 -3
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +15 -0
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +1 -4
- package/dist/src/component/KgCanvas/index.event.d.ts +225 -0
- package/dist/src/component/KgCanvas/index.hooks.d.ts +18 -13
- package/dist/src/component/KgCanvas/index.store.d.ts +0 -229
- package/dist/src/component/KgCanvas/index.vm.d.ts +4 -0
- package/dist/src/component/KgForm/index.hooks.d.ts +8 -8
- package/dist/src/component/KgForm/index.store.d.ts +2 -2
- package/dist/src/component/KgSearch/index.hooks.d.ts +4 -4
- package/dist/src/component/KgSearch/index.store.d.ts +2 -2
- package/dist/src/component/KgSubmit/index.hooks.d.ts +11 -11
- package/dist/src/component/KgSubmit/index.store.d.ts +1 -1
- package/dist/src/component/KgTable/index.hooks.d.ts +11 -11
- package/dist/src/component/KgTable/index.store.d.ts +2 -2
- package/dist/src/component/KgVar/index.hooks.d.ts +2 -2
- package/dist/src/component/KgVar/index.store.d.ts +2 -2
- package/dist/src/component/KgWarehouse/index.hooks.d.ts +2 -2
- package/dist/src/const/index.vm.d.ts +3 -3
- package/dist/src/const/injection-keys.const.d.ts +2 -0
- package/dist/src/util/index.d.ts +36 -0
- package/dist/src/util/kg.util.d.ts +3 -1
- package/package.json +2 -2
- package/dist/src/component/util.d.ts +0 -14
- /package/dist/{close-outlined-DMcSQWxQ.907df5e6.mjs → close-outlined-DMcSQWxQ.28ef3d50.mjs} +0 -0
- /package/dist/{fullscreen-exit-outlined-X1iYkFc4.1c0e1630.mjs → fullscreen-exit-outlined-X1iYkFc4.769dc9a7.mjs} +0 -0
- /package/dist/{fullscreen-outlined-DDBrsRcy.1c53818b.mjs → fullscreen-outlined-DDBrsRcy.472a314c.mjs} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { IRemoveEventListener, KG_APP, Menu } from '../../const';
|
2
2
|
import { IKgAppSelectGotoAppEventListener, IKgAppSelectGotoPathEventListener, IKgAppSelectStore } from './index.store';
|
3
3
|
export declare type IUseKgAppSelect = {
|
4
4
|
/** 状态数据. */
|
@@ -30,12 +30,12 @@ export declare type IUseKgAppSelect = {
|
|
30
30
|
* @param listener 事件监听函数.
|
31
31
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
32
32
|
*/
|
33
|
-
onGotoApp(listener: IKgAppSelectGotoAppEventListener, isOnce?: boolean):
|
33
|
+
onGotoApp(listener: IKgAppSelectGotoAppEventListener, isOnce?: boolean): IRemoveEventListener;
|
34
34
|
/**
|
35
35
|
* 监听事件: 进入某个地址.
|
36
36
|
* @param listener 事件监听函数.
|
37
37
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
38
38
|
*/
|
39
|
-
onGotoPath(listener: IKgAppSelectGotoPathEventListener, isOnce?: boolean):
|
39
|
+
onGotoPath(listener: IKgAppSelectGotoPathEventListener, isOnce?: boolean): IRemoveEventListener;
|
40
40
|
};
|
41
41
|
export declare function useKgAppSelect(): IUseKgAppSelect;
|
@@ -37,9 +37,9 @@ export interface IUseKgAppSelectStoreActions {
|
|
37
37
|
/**
|
38
38
|
* 触发事件.
|
39
39
|
* @param event 事件名称.
|
40
|
-
* @param
|
40
|
+
* @param parameter 事件参数.
|
41
41
|
*/
|
42
|
-
emit<T = IKgAppSelectEventListenerParameter>(event: IKgAppSelectEvent,
|
42
|
+
emit<T = IKgAppSelectEventListenerParameter>(event: IKgAppSelectEvent, parameter?: T | null): Promise<boolean>;
|
43
43
|
/**
|
44
44
|
* 进入某个模块.
|
45
45
|
* @param app 要进入的模块.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
|
-
import {
|
2
|
+
import { IRemoveEventListener, KG__VAR_BUTTON__TYPE } from '../../const';
|
3
3
|
import { IKgButtonClickEventListener, IKgButtonImportOkEventListener, IKgButtonStore, IKgButtonSubmitCancelEventListener, IKgButtonSubmitSaveEventListener } from './index.store';
|
4
4
|
export interface IUseKgButton {
|
5
5
|
/**
|
@@ -85,28 +85,28 @@ export interface IUseKgButton {
|
|
85
85
|
* @param listener 事件监听函数.
|
86
86
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
87
87
|
*/
|
88
|
-
onClick(listener: IKgButtonClickEventListener, isOnce?: boolean):
|
88
|
+
onClick(listener: IKgButtonClickEventListener, isOnce?: boolean): IRemoveEventListener;
|
89
89
|
/**
|
90
90
|
* 监听事件: 导入成功, 导入接口调用成功.
|
91
91
|
*
|
92
92
|
* @param listener 事件监听函数.
|
93
93
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
94
94
|
*/
|
95
|
-
onImportOk(listener: IKgButtonImportOkEventListener, isOnce?: boolean):
|
95
|
+
onImportOk(listener: IKgButtonImportOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
96
96
|
/**
|
97
97
|
* 监听事件: 表格内编辑时, 点击取消按钮.
|
98
98
|
*
|
99
99
|
* @param listener 事件监听函数.
|
100
100
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
101
101
|
*/
|
102
|
-
onSubmitCancel(listener: IKgButtonSubmitCancelEventListener, isOnce?: boolean):
|
102
|
+
onSubmitCancel(listener: IKgButtonSubmitCancelEventListener, isOnce?: boolean): IRemoveEventListener;
|
103
103
|
/**
|
104
104
|
* 监听事件: 表格内编辑时, 点击保存按钮.
|
105
105
|
*
|
106
106
|
* @param listener 事件监听函数.
|
107
107
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
108
108
|
*/
|
109
|
-
onSubmitSave(listener: IKgButtonSubmitSaveEventListener, isOnce?: boolean):
|
109
|
+
onSubmitSave(listener: IKgButtonSubmitSaveEventListener, isOnce?: boolean): IRemoveEventListener;
|
110
110
|
/**
|
111
111
|
* <p>「查询按钮」.</p>
|
112
112
|
*/
|
@@ -88,9 +88,9 @@ export interface IUseKgButtonStoreActions {
|
|
88
88
|
* 触发事件.
|
89
89
|
* @param formID 界面标识.
|
90
90
|
* @param event 事件名称.
|
91
|
-
* @param
|
91
|
+
* @param parameter 事件参数.
|
92
92
|
*/
|
93
|
-
emit<T = IKgButtonEventListenerParameter>(formID: string, event: IKgButtonEvent,
|
93
|
+
emit<T = IKgButtonEventListenerParameter>(formID: string, event: IKgButtonEvent, parameter: T): Promise<boolean>;
|
94
94
|
/**
|
95
95
|
* 退订事件监听.
|
96
96
|
* @param formID 界面标识.
|
@@ -26,7 +26,6 @@ export declare type IKgCanvasContextMenu = {
|
|
26
26
|
name?: string;
|
27
27
|
};
|
28
28
|
export declare const getProps: () => {
|
29
|
-
eid: PropType<string>;
|
30
29
|
kgElement: PropType<Q.Element<any>>;
|
31
30
|
kgElementUi: PropType<Q.ElementUI>;
|
32
31
|
/**
|
@@ -51,7 +50,6 @@ export declare const getProps: () => {
|
|
51
50
|
};
|
52
51
|
export declare type KgCanvasContextMenuProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
53
52
|
declare const _default: import("vue").DefineComponent<{
|
54
|
-
eid: PropType<string>;
|
55
53
|
kgElement: PropType<Q.Element<any>>;
|
56
54
|
kgElementUi: PropType<Q.ElementUI>;
|
57
55
|
/**
|
@@ -74,7 +72,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
72
|
kgUi: PropType<Q.BaseUI>;
|
75
73
|
'onUpdate:kgIsVisible': PropType<(value: boolean) => void>;
|
76
74
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:kgIsVisible"[], "update:kgIsVisible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
77
|
-
eid: PropType<string>;
|
78
75
|
kgElement: PropType<Q.Element<any>>;
|
79
76
|
kgElementUi: PropType<Q.ElementUI>;
|
80
77
|
/**
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
2
2
|
import './KgCanvas.css';
|
3
3
|
export declare const getProps: () => {
|
4
|
+
/** 该组件实例的唯一标识. */
|
5
|
+
id: {
|
6
|
+
type: PropType<string>;
|
7
|
+
required: boolean;
|
8
|
+
};
|
4
9
|
/**
|
5
10
|
* 组件 KgCanvasToolbarFullscreen 的参数.
|
6
11
|
*/
|
@@ -51,6 +56,11 @@ export declare const getProps: () => {
|
|
51
56
|
};
|
52
57
|
export declare type KgCanvasProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
53
58
|
declare const _default: import("vue").DefineComponent<{
|
59
|
+
/** 该组件实例的唯一标识. */
|
60
|
+
id: {
|
61
|
+
type: PropType<string>;
|
62
|
+
required: boolean;
|
63
|
+
};
|
54
64
|
/**
|
55
65
|
* 组件 KgCanvasToolbarFullscreen 的参数.
|
56
66
|
*/
|
@@ -99,6 +109,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
109
|
default: boolean;
|
100
110
|
};
|
101
111
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
112
|
+
/** 该组件实例的唯一标识. */
|
113
|
+
id: {
|
114
|
+
type: PropType<string>;
|
115
|
+
required: boolean;
|
116
|
+
};
|
102
117
|
/**
|
103
118
|
* 组件 KgCanvasToolbarFullscreen 的参数.
|
104
119
|
*/
|
@@ -31,12 +31,9 @@ export declare type IKgCanvasElementProperties = {
|
|
31
31
|
export declare type IUseGlobalContextMenus = {
|
32
32
|
globalContextMenus: Array<IKgCanvasContextMenu>;
|
33
33
|
};
|
34
|
-
export declare function _useGlobalContextMenus(param: {
|
35
|
-
eid: string;
|
36
|
-
}): IUseGlobalContextMenus;
|
34
|
+
export declare function _useGlobalContextMenus(param: {}): IUseGlobalContextMenus;
|
37
35
|
export declare type IUseResizeObserver = {};
|
38
36
|
export declare function _useResizeObserver(param: {
|
39
|
-
eid: string;
|
40
37
|
graph: () => Q.Graph | null;
|
41
38
|
kgCanvasContextMenuProps: Ref<KgCanvasContextMenuProps>;
|
42
39
|
kgCanvasRef: Ref<HTMLDivElement | null>;
|
@@ -0,0 +1,225 @@
|
|
1
|
+
import { Q } from '@thymine/xunee';
|
2
|
+
import { Ref } from 'vue';
|
3
|
+
import { IKgEventListener } from '../../const';
|
4
|
+
import { IKgCanvasContextMenu } from './KgCanvas.ContextMenu';
|
5
|
+
/**
|
6
|
+
* 事件类型.
|
7
|
+
* 'onInit': 图形组件初始完成
|
8
|
+
* 'onReload': 重新加载
|
9
|
+
* 'onResize': 尺寸变化
|
10
|
+
* 'onMouseMove': 鼠标移动
|
11
|
+
* 'onMouseEnter': 鼠标进入
|
12
|
+
* 'onMouseLeave': 鼠标离开
|
13
|
+
* 'onClick': 单击鼠标左键
|
14
|
+
* 'onRightClick': 单击鼠标右键
|
15
|
+
* 'onContextMenuOpen': 右键菜单打开
|
16
|
+
* 'onContextMenuClose': 右键菜单关闭
|
17
|
+
*/
|
18
|
+
export declare type IKgCanvasEvent = 'onInit' | 'onReload' | 'onResize' | 'onMouseMove' | 'onMouseEnter' | 'onMouseLeave' | 'onClick' | 'onRightClick' | 'onContextMenuOpen' | 'onContextMenuClose';
|
19
|
+
export declare type IKgCanvasOnInitEventListenerParameter = {
|
20
|
+
/**
|
21
|
+
* Q.
|
22
|
+
*/
|
23
|
+
Q: typeof Q;
|
24
|
+
/**
|
25
|
+
* 图形组件对象.
|
26
|
+
*/
|
27
|
+
graph: Q.Graph;
|
28
|
+
};
|
29
|
+
export declare type IKgCanvasOnInitEventListener = ((param: IKgCanvasOnInitEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
30
|
+
export declare type IKgCanvasOnReloadEventListenerParameter = {
|
31
|
+
/**
|
32
|
+
* Q.
|
33
|
+
*/
|
34
|
+
Q: typeof Q;
|
35
|
+
/**
|
36
|
+
* 图形组件对象.
|
37
|
+
*/
|
38
|
+
graph: Q.Graph;
|
39
|
+
};
|
40
|
+
export declare type IKgCanvasOnReloadEventListener = ((param: IKgCanvasOnReloadEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
41
|
+
export declare type IKgCanvasOnResizeEventListenerParameter = {
|
42
|
+
/**
|
43
|
+
* Q.
|
44
|
+
*/
|
45
|
+
Q: typeof Q;
|
46
|
+
/**
|
47
|
+
* 图形组件对象.
|
48
|
+
*/
|
49
|
+
graph: Q.Graph;
|
50
|
+
/**
|
51
|
+
* 当前高度.
|
52
|
+
*/
|
53
|
+
height: number;
|
54
|
+
/**
|
55
|
+
* 当前宽度.
|
56
|
+
*/
|
57
|
+
width: number;
|
58
|
+
};
|
59
|
+
export declare type IKgCanvasOnResizeEventListener = ((param: IKgCanvasOnResizeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
60
|
+
export declare type IKgCanvasOnRightClickEventListenerParameter = {
|
61
|
+
/**
|
62
|
+
* Q.
|
63
|
+
*/
|
64
|
+
Q: typeof Q;
|
65
|
+
/**
|
66
|
+
* <p>右键菜单列表.</p>
|
67
|
+
* <p>用户可以直接修改该参数的值, 从而修改此次单击右键事件弹出的右键菜单.</p>
|
68
|
+
*/
|
69
|
+
contextMenus: Ref<Array<IKgCanvasContextMenu>>;
|
70
|
+
/**
|
71
|
+
* 图元.
|
72
|
+
*/
|
73
|
+
element?: Q.Element;
|
74
|
+
/**
|
75
|
+
* 图元组件.
|
76
|
+
*/
|
77
|
+
elementUI?: Q.ElementUI;
|
78
|
+
/**
|
79
|
+
* 鼠标事件.
|
80
|
+
*/
|
81
|
+
event: MouseEvent;
|
82
|
+
/**
|
83
|
+
* 图形组件对象.
|
84
|
+
*/
|
85
|
+
graph: Q.Graph;
|
86
|
+
/**
|
87
|
+
* 图元组件.
|
88
|
+
*/
|
89
|
+
ui?: Q.BaseUI;
|
90
|
+
};
|
91
|
+
export declare type IKgCanvasOnRightClickEventListener = ((param: IKgCanvasOnRightClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
92
|
+
export declare type IKgCanvasOnMouseMoveEventListenerParameter = {
|
93
|
+
/**
|
94
|
+
* Q.
|
95
|
+
*/
|
96
|
+
Q: typeof Q;
|
97
|
+
/**
|
98
|
+
* 图元.
|
99
|
+
*/
|
100
|
+
element?: Q.Element;
|
101
|
+
/**
|
102
|
+
* 图元组件.
|
103
|
+
*/
|
104
|
+
elementUI?: Q.ElementUI;
|
105
|
+
/**
|
106
|
+
* 图形组件对象.
|
107
|
+
*/
|
108
|
+
graph: Q.Graph;
|
109
|
+
/**
|
110
|
+
* 图元组件.
|
111
|
+
*/
|
112
|
+
ui?: Q.BaseUI;
|
113
|
+
};
|
114
|
+
export declare type IKgCanvasOnMouseMoveEventListener = ((param: IKgCanvasOnMouseMoveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
115
|
+
export declare type IKgCanvasOnMouseLeaveEventListenerParameter = {
|
116
|
+
/**
|
117
|
+
* Q.
|
118
|
+
*/
|
119
|
+
Q: typeof Q;
|
120
|
+
/**
|
121
|
+
* 图元.
|
122
|
+
*/
|
123
|
+
element?: Q.Element;
|
124
|
+
/**
|
125
|
+
* 图元组件.
|
126
|
+
*/
|
127
|
+
elementUI?: Q.ElementUI;
|
128
|
+
/**
|
129
|
+
* 图形组件对象.
|
130
|
+
*/
|
131
|
+
graph: Q.Graph;
|
132
|
+
/**
|
133
|
+
* 图元组件.
|
134
|
+
*/
|
135
|
+
ui?: Q.BaseUI;
|
136
|
+
};
|
137
|
+
export declare type IKgCanvasOnMouseLeaveEventListener = ((param: IKgCanvasOnMouseLeaveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
138
|
+
export declare type IKgCanvasOnMouseEnterEventListenerParameter = {
|
139
|
+
/**
|
140
|
+
* Q.
|
141
|
+
*/
|
142
|
+
Q: typeof Q;
|
143
|
+
/**
|
144
|
+
* 图元.
|
145
|
+
*/
|
146
|
+
element?: Q.Element;
|
147
|
+
/**
|
148
|
+
* 图元组件.
|
149
|
+
*/
|
150
|
+
elementUI?: Q.ElementUI;
|
151
|
+
/**
|
152
|
+
* 图形组件对象.
|
153
|
+
*/
|
154
|
+
graph: Q.Graph;
|
155
|
+
/**
|
156
|
+
* 图元组件.
|
157
|
+
*/
|
158
|
+
ui?: Q.BaseUI;
|
159
|
+
};
|
160
|
+
export declare type IKgCanvasOnMouseEnterEventListener = ((param: IKgCanvasOnMouseEnterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
161
|
+
export declare type IKgCanvasOnClickEventListenerParameter = {
|
162
|
+
/**
|
163
|
+
* Q.
|
164
|
+
*/
|
165
|
+
Q: typeof Q;
|
166
|
+
/**
|
167
|
+
* 图元.
|
168
|
+
*/
|
169
|
+
element?: Q.Element;
|
170
|
+
/**
|
171
|
+
* 图元组件.
|
172
|
+
*/
|
173
|
+
elementUI?: Q.ElementUI;
|
174
|
+
/**
|
175
|
+
* 图形组件对象.
|
176
|
+
*/
|
177
|
+
graph: Q.Graph;
|
178
|
+
/**
|
179
|
+
* 图元组件.
|
180
|
+
*/
|
181
|
+
ui?: Q.BaseUI;
|
182
|
+
};
|
183
|
+
export declare type IKgCanvasOnClickEventListener = ((param: IKgCanvasOnClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
184
|
+
export declare type IKgCanvasOnContextMenuOpenEventListenerParameter = {};
|
185
|
+
export declare type IKgCanvasOnContextMenuOpenEventListener = ((param: IKgCanvasOnContextMenuOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
186
|
+
export declare type IKgCanvasOnContextMenuCloseEventListenerParameter = {};
|
187
|
+
export declare type IKgCanvasOnContextMenuCloseEventListener = ((param: IKgCanvasOnContextMenuCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
188
|
+
export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter | IKgCanvasOnReloadEventListenerParameter | IKgCanvasOnResizeEventListenerParameter | IKgCanvasOnRightClickEventListenerParameter | IKgCanvasOnMouseMoveEventListenerParameter | IKgCanvasOnMouseEnterEventListenerParameter | IKgCanvasOnMouseLeaveEventListenerParameter | IKgCanvasOnClickEventListenerParameter | IKgCanvasOnContextMenuOpenEventListenerParameter | IKgCanvasOnContextMenuCloseEventListenerParameter;
|
189
|
+
export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener | IKgCanvasOnReloadEventListener | IKgCanvasOnResizeEventListener | IKgCanvasOnRightClickEventListener | IKgCanvasOnMouseMoveEventListener | IKgCanvasOnMouseEnterEventListener | IKgCanvasOnMouseLeaveEventListener | IKgCanvasOnClickEventListener | IKgCanvasOnContextMenuOpenEventListener | IKgCanvasOnContextMenuCloseEventListener;
|
190
|
+
/**
|
191
|
+
* 添加事件监听.
|
192
|
+
*
|
193
|
+
* @param param.event 事件名称.
|
194
|
+
* @param param.id 唯一标识.
|
195
|
+
* @param param.listener 事件监听函数.
|
196
|
+
*/
|
197
|
+
export declare function addEventListener<T extends IKgCanvasEventListener>(param: {
|
198
|
+
event: IKgCanvasEvent;
|
199
|
+
id?: string | undefined;
|
200
|
+
listener: T;
|
201
|
+
}): void;
|
202
|
+
/**
|
203
|
+
* 移除事件监听.
|
204
|
+
*
|
205
|
+
* @param param.event 事件名称.
|
206
|
+
* @param param.id 唯一标识.
|
207
|
+
* @param param.listener 事件监听函数.
|
208
|
+
*/
|
209
|
+
export declare function removeEventListener(param: {
|
210
|
+
event: IKgCanvasEvent;
|
211
|
+
id?: string | undefined;
|
212
|
+
listener?: any;
|
213
|
+
}): void;
|
214
|
+
/**
|
215
|
+
* 触发事件.
|
216
|
+
*
|
217
|
+
* @param param.event 事件名称.
|
218
|
+
* @param param.id 唯一标识.
|
219
|
+
* @param param.parameter 事件参数.
|
220
|
+
*/
|
221
|
+
export declare function emit<T = IKgCanvasEventListenerParameter>(param: {
|
222
|
+
event: IKgCanvasEvent;
|
223
|
+
id?: string | undefined;
|
224
|
+
parameter: T;
|
225
|
+
}): Promise<boolean>;
|
@@ -1,67 +1,72 @@
|
|
1
|
-
import {
|
2
|
-
import { IKgCanvasOnClickEventListener, IKgCanvasOnContextMenuCloseEventListener, IKgCanvasOnContextMenuOpenEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnResizeEventListener, IKgCanvasOnRightClickEventListener
|
1
|
+
import { IRemoveEventListener } from '../../const';
|
2
|
+
import { IKgCanvasOnClickEventListener, IKgCanvasOnContextMenuCloseEventListener, IKgCanvasOnContextMenuOpenEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnResizeEventListener, IKgCanvasOnRightClickEventListener } from './index.event';
|
3
|
+
import { IKgCanvasStore } from './index.store';
|
3
4
|
export declare type IUseKgCanvas = {
|
4
5
|
/**
|
5
6
|
* 监听事件: 单击鼠标左键.
|
6
7
|
* @param listener 事件监听函数.
|
7
8
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
8
9
|
*/
|
9
|
-
onClick(listener: IKgCanvasOnClickEventListener, isOnce?: boolean):
|
10
|
+
onClick(listener: IKgCanvasOnClickEventListener, isOnce?: boolean): IRemoveEventListener;
|
10
11
|
/**
|
11
12
|
* 监听事件: 右键菜单关闭.
|
12
13
|
* @param listener 事件监听函数.
|
13
14
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
14
15
|
*/
|
15
|
-
onContextMenuClose(listener: IKgCanvasOnContextMenuCloseEventListener, isOnce?: boolean):
|
16
|
+
onContextMenuClose(listener: IKgCanvasOnContextMenuCloseEventListener, isOnce?: boolean): IRemoveEventListener;
|
16
17
|
/**
|
17
18
|
* 监听事件: 右键菜单打开.
|
18
19
|
* @param listener 事件监听函数.
|
19
20
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
20
21
|
*/
|
21
|
-
onContextMenuOpen(listener: IKgCanvasOnContextMenuOpenEventListener, isOnce?: boolean):
|
22
|
+
onContextMenuOpen(listener: IKgCanvasOnContextMenuOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
22
23
|
/**
|
23
24
|
* 监听事件: 图形组件初始完成.
|
24
25
|
* @param listener 事件监听函数.
|
25
26
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
26
27
|
*/
|
27
|
-
onInit(listener: IKgCanvasOnInitEventListener, isOnce?: boolean):
|
28
|
+
onInit(listener: IKgCanvasOnInitEventListener, isOnce?: boolean): IRemoveEventListener;
|
28
29
|
/**
|
29
30
|
* 监听事件: 鼠标进入.
|
30
31
|
* @param listener 事件监听函数.
|
31
32
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
32
33
|
*/
|
33
|
-
onMouseEnter(listener: IKgCanvasOnMouseEnterEventListener, isOnce?: boolean):
|
34
|
+
onMouseEnter(listener: IKgCanvasOnMouseEnterEventListener, isOnce?: boolean): IRemoveEventListener;
|
34
35
|
/**
|
35
36
|
* 监听事件: 鼠标离开.
|
36
37
|
* @param listener 事件监听函数.
|
37
38
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
38
39
|
*/
|
39
|
-
onMouseLeave(listener: IKgCanvasOnMouseLeaveEventListener, isOnce?: boolean):
|
40
|
+
onMouseLeave(listener: IKgCanvasOnMouseLeaveEventListener, isOnce?: boolean): IRemoveEventListener;
|
40
41
|
/**
|
41
42
|
* 监听事件: 鼠标移动.
|
42
43
|
* @param listener 事件监听函数.
|
43
44
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
44
45
|
*/
|
45
|
-
onMouseMove(listener: IKgCanvasOnMouseMoveEventListener, isOnce?: boolean):
|
46
|
+
onMouseMove(listener: IKgCanvasOnMouseMoveEventListener, isOnce?: boolean): IRemoveEventListener;
|
46
47
|
/**
|
47
48
|
* 监听事件: 重新加载.
|
48
49
|
* @param listener 事件监听函数.
|
49
50
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
50
51
|
*/
|
51
|
-
onReload(listener: IKgCanvasOnReloadEventListener, isOnce?: boolean):
|
52
|
+
onReload(listener: IKgCanvasOnReloadEventListener, isOnce?: boolean): IRemoveEventListener;
|
52
53
|
/**
|
53
54
|
* 监听事件: 尺寸变化.
|
54
55
|
* @param listener 事件监听函数.
|
55
56
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
56
57
|
*/
|
57
|
-
onResize(listener: IKgCanvasOnResizeEventListener, isOnce?: boolean):
|
58
|
+
onResize(listener: IKgCanvasOnResizeEventListener, isOnce?: boolean): IRemoveEventListener;
|
58
59
|
/**
|
59
60
|
* 监听事件: 单击鼠标右键.
|
60
61
|
* @param listener 事件监听函数.
|
61
62
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
62
63
|
*/
|
63
|
-
onRightClick(listener: IKgCanvasOnRightClickEventListener, isOnce?: boolean):
|
64
|
+
onRightClick(listener: IKgCanvasOnRightClickEventListener, isOnce?: boolean): IRemoveEventListener;
|
64
65
|
/** 状态数据. */
|
65
66
|
store: IKgCanvasStore;
|
66
67
|
};
|
67
|
-
|
68
|
+
/**
|
69
|
+
*
|
70
|
+
* @param id 唯一标识.
|
71
|
+
*/
|
72
|
+
export declare function useKgCanvas(id: string): IUseKgCanvas;
|