@kengic/vue 0.26.6-beta.127 → 0.26.6-beta.128
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IRemoveEventListener } from '../../const';
|
2
|
-
import { IKgFormChangeEventListener, IKgFormLookupBeforeOkEventListener, IKgFormLookupBeforeOpenEventListener, IKgFormLookupOkEventListener, IKgFormSelectBeforeRequestEventListener, IKgFormSelectBeforeSetDatasEventListener, IKgFormSelectChangeEventListener, IKgFormStore } from './index.store';
|
2
|
+
import { IKgFormChangeEventListener, IKgFormLookupBeforeOkEventListener, IKgFormLookupBeforeOpenEventListener, IKgFormLookupOkEventListener, IKgFormOnBlurEventListener, IKgFormSelectBeforeRequestEventListener, IKgFormSelectBeforeSetDatasEventListener, IKgFormSelectChangeEventListener, IKgFormStore } from './index.store';
|
3
3
|
export declare type IUseKgForm = {
|
4
4
|
Select: {
|
5
5
|
/**
|
@@ -12,6 +12,13 @@ export declare type IUseKgForm = {
|
|
12
12
|
}): void;
|
13
13
|
};
|
14
14
|
formID: string;
|
15
|
+
/**
|
16
|
+
* 监听事件: 失去焦点.
|
17
|
+
*
|
18
|
+
* @param listener 事件监听函数.
|
19
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
20
|
+
*/
|
21
|
+
onBlur(listener: IKgFormOnBlurEventListener, isOnce?: boolean): IRemoveEventListener;
|
15
22
|
/**
|
16
23
|
* 监听事件: 表单控件的值发生变更.
|
17
24
|
*
|
@@ -5,14 +5,15 @@ import { IKgTableRow } from '../KgTable';
|
|
5
5
|
/**
|
6
6
|
* 事件类型.
|
7
7
|
* 'change': 表单控件的值发生变更
|
8
|
-
* '
|
8
|
+
* 'onBlur': 失去焦点
|
9
|
+
* 'onSelectBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求,
|
9
10
|
* 'selectBeforeSetDatas': 下拉列表查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
|
10
11
|
* 'selectChange': 下拉列表选中某个(可能多个)数据
|
11
12
|
* 'lookupBeforeOpen': 查找弹窗打开之前
|
12
13
|
* 'lookupBeforeOk': 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件
|
13
14
|
* 'lookupOk': 查找弹窗点击确定
|
14
15
|
*/
|
15
|
-
export declare type IKgFormEvent = 'change' | 'onSelectBeforeRequest' | 'selectBeforeSetDatas' | 'selectChange' | 'lookupBeforeOpen' | 'lookupBeforeOk' | 'lookupOk';
|
16
|
+
export declare type IKgFormEvent = 'change' | 'onBlur' | 'onSelectBeforeRequest' | 'selectBeforeSetDatas' | 'selectChange' | 'lookupBeforeOpen' | 'lookupBeforeOk' | 'lookupOk';
|
16
17
|
export declare type IKgFormChangeEventListenerParameter = {
|
17
18
|
/**
|
18
19
|
* 表单控件所处环境.
|
@@ -38,6 +39,21 @@ export declare type IKgFormChangeEventListenerParameter = {
|
|
38
39
|
variableName: string;
|
39
40
|
};
|
40
41
|
export declare type IKgFormChangeEventListener = ((param: IKgFormChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
42
|
+
export declare type IKgFormOnBlurEventListenerParameter = {
|
43
|
+
/**
|
44
|
+
* 表单控件所处环境.
|
45
|
+
*/
|
46
|
+
context: KG_FORM_CONTEXT;
|
47
|
+
/**
|
48
|
+
* 表单控件当前数据.
|
49
|
+
*/
|
50
|
+
value: any;
|
51
|
+
/**
|
52
|
+
* 变量名称.
|
53
|
+
*/
|
54
|
+
varName: string;
|
55
|
+
};
|
56
|
+
export declare type IKgFormOnBlurEventListener = ((param: IKgFormOnBlurEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
41
57
|
export declare type IKgFormSelectBeforeRequestEventListenerParameter = {
|
42
58
|
/**
|
43
59
|
* 表单控件所处环境.
|
@@ -165,10 +181,11 @@ export declare type IKgFormLookupOkEventListenerParameter = {
|
|
165
181
|
var_nam: string;
|
166
182
|
};
|
167
183
|
export declare type IKgFormLookupOkEventListener = ((param: IKgFormLookupOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
168
|
-
export declare type IKgFormEventListenerParameter = IKgFormChangeEventListenerParameter | IKgFormSelectBeforeRequestEventListenerParameter | IKgFormSelectBeforeSetDatasEventListenerParameter | IKgFormSelectChangeEventListenerParameter | IKgFormLookupBeforeOpenEventListenerParameter | IKgFormLookupBeforeOkEventListenerParameter | IKgFormLookupOkEventListenerParameter;
|
169
|
-
export declare type IKgFormEventListener = IKgFormChangeEventListener | IKgFormSelectBeforeRequestEventListener | IKgFormSelectBeforeSetDatasEventListener | IKgFormSelectChangeEventListener | IKgFormLookupBeforeOpenEventListener | IKgFormLookupBeforeOkEventListener | IKgFormLookupOkEventListener;
|
184
|
+
export declare type IKgFormEventListenerParameter = IKgFormChangeEventListenerParameter | IKgFormOnBlurEventListenerParameter | IKgFormSelectBeforeRequestEventListenerParameter | IKgFormSelectBeforeSetDatasEventListenerParameter | IKgFormSelectChangeEventListenerParameter | IKgFormLookupBeforeOpenEventListenerParameter | IKgFormLookupBeforeOkEventListenerParameter | IKgFormLookupOkEventListenerParameter;
|
185
|
+
export declare type IKgFormEventListener = IKgFormChangeEventListener | IKgFormOnBlurEventListener | IKgFormSelectBeforeRequestEventListener | IKgFormSelectBeforeSetDatasEventListener | IKgFormSelectChangeEventListener | IKgFormLookupBeforeOpenEventListener | IKgFormLookupBeforeOkEventListener | IKgFormLookupOkEventListener;
|
170
186
|
export interface IUseKgFormStoreState {
|
171
187
|
changeEventListenerMap: Map<string, Array<IKgFormChangeEventListener>>;
|
188
|
+
onBlurEventListenerMap: Map<string, Array<IKgFormOnBlurEventListener>>;
|
172
189
|
lookupBeforeOkEventListenerMap: Map<string, Array<IKgFormLookupBeforeOkEventListener>>;
|
173
190
|
lookupBeforeOpenEventListenerMap: Map<string, Array<IKgFormLookupBeforeOpenEventListener>>;
|
174
191
|
lookupOkEventListenerMap: Map<string, Array<IKgFormLookupOkEventListener>>;
|
@@ -459,6 +459,10 @@ export declare enum KG_DYNAMIC_QUERY_OPERATOR {
|
|
459
459
|
}
|
460
460
|
/** 请求头部. */
|
461
461
|
export declare enum KG_HTTP_HEADERS {
|
462
|
+
/** 当前页码. */
|
463
|
+
KG_PAGE_INDEX = "Kg-Page-Index",
|
464
|
+
/** 每页条数. */
|
465
|
+
KG_PAGE_SISE = "Kg-Page-Size",
|
462
466
|
/** 界面标识. */
|
463
467
|
KG_FORM_ID = "Kg-Form-Id",
|
464
468
|
KG_BUTTON_VAR_NAME = "Kg-Button-Var-Name",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.26.6-beta.
|
3
|
+
"version": "0.26.6-beta.128",
|
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",
|