@kengic/vue 0.19.1 → 0.19.2-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +36 -2
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +5219 -5216
- package/dist/src/components/KgForm/index.hooks.d.ts +5 -5
- package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +3 -6
- package/dist/src/components/KgSearch/index.hooks.d.ts +1 -1
- package/dist/src/components/KgSubmit/index.hooks.d.ts +50 -34
- package/dist/src/components/KgTable/index.hooks.d.ts +468 -33
- package/dist/src/components/KgVar/index.hooks.d.ts +47 -72
- package/dist/src/components/KgVar/index.store.d.ts +1 -1
- package/dist/src/components/util.d.ts +4 -4
- package/dist/src/consts/index.vm.d.ts +1 -1
- package/package.json +1 -1
@@ -14,29 +14,29 @@ export declare function useKgForm(formID?: string | null): {
|
|
14
14
|
* @param cb 回调函数.
|
15
15
|
* @param once 是否只会触发一次. 默认为 undefined.
|
16
16
|
*/
|
17
|
-
onSelectBeforeSetDatas: (cb: IKgFormSelectBeforeSetDatasCb) => import("../..").IRemoveEventListenerHandler;
|
17
|
+
onSelectBeforeSetDatas: (cb: IKgFormSelectBeforeSetDatasCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
18
18
|
/**
|
19
19
|
* 事件: 下拉列表选中某个(可能多个)数据.
|
20
20
|
* @param cb 回调函数.
|
21
21
|
* @param once 是否只会触发一次. 默认为 undefined.
|
22
22
|
*/
|
23
|
-
onSelectChange: (cb: IKgFormSelectChangeCb) => import("../..").IRemoveEventListenerHandler;
|
23
|
+
onSelectChange: (cb: IKgFormSelectChangeCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
24
24
|
/**
|
25
25
|
* 事件: 查找弹窗打开之前.
|
26
26
|
* @param cb 回调函数.
|
27
27
|
* @param once 是否只会触发一次. 默认为 undefined.
|
28
28
|
*/
|
29
|
-
onLookupBeforeOpen: (cb: IKgFormLookupBeforeOpenCb) => import("../..").IRemoveEventListenerHandler;
|
29
|
+
onLookupBeforeOpen: (cb: IKgFormLookupBeforeOpenCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
30
30
|
/**
|
31
31
|
* 事件: 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件.
|
32
32
|
* @param cb 回调函数.
|
33
33
|
* @param once 是否只会触发一次. 默认为 undefined.
|
34
34
|
*/
|
35
|
-
onLookupBeforeOk: (cb: IKgFormLookupBeforeOkCb) => import("../..").IRemoveEventListenerHandler;
|
35
|
+
onLookupBeforeOk: (cb: IKgFormLookupBeforeOkCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
36
36
|
/**
|
37
37
|
* 事件: 查找弹窗点击确定.
|
38
38
|
* @param cb 回调函数.
|
39
39
|
* @param once 是否只会触发一次. 默认为 undefined.
|
40
40
|
*/
|
41
|
-
onLookupOk: (cb: IKgFormLookupOkCb) => import("../..").IRemoveEventListenerHandler;
|
41
|
+
onLookupOk: (cb: IKgFormLookupOkCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
42
42
|
};
|
@@ -21,8 +21,7 @@ export declare function getDefaultHeight(varProfileDetails?: Array<VarProfileDet
|
|
21
21
|
* @param headerTeleport 是否将头部放到顶部的导航栏中.
|
22
22
|
*/
|
23
23
|
export declare function getMaxHeight(varProfileDetails?: Array<VarProfileDetail> | null, headerTeleport?: boolean | null): number;
|
24
|
-
export declare
|
25
|
-
export declare function _useLayoutHeaderResizeObserver(): IUseLayoutHeaderResizeObserver;
|
24
|
+
export declare function _useLayoutHeaderResizeObserver(): {};
|
26
25
|
export declare function _useCommon(): {
|
27
26
|
isVisible: import("vue").ComputedRef<boolean>;
|
28
27
|
isResizable: import("vue").ComputedRef<boolean>;
|
@@ -32,8 +31,6 @@ export declare function _useCommon(): {
|
|
32
31
|
maxHeight: import("vue").ComputedRef<number>;
|
33
32
|
minHeight: import("vue").ComputedRef<1 | 42>;
|
34
33
|
};
|
35
|
-
export declare
|
36
|
-
|
37
|
-
initFormModel(): void;
|
34
|
+
export declare function _useFormModel(kgResizableRef: Ref<any | null>, formRef: Ref<FormInstance | null>, kgResizableProps: Ref<IKgResizableProps>): {
|
35
|
+
initFormModel: () => Promise<void>;
|
38
36
|
};
|
39
|
-
export declare function _useFormModel(kgResizableRef: Ref<any | null>, formRef: Ref<FormInstance | null>, kgResizableProps: Ref<IKgResizableProps>): IUseFormModel;
|
@@ -20,7 +20,7 @@ export declare type IUseKgSearch = {
|
|
20
20
|
* 事件: ready, 查询字段初始完成, 组件渲染完成.
|
21
21
|
* @param cb 回调函数.
|
22
22
|
* @param once 是否只会触发一次. 默认为 undefined.
|
23
|
-
|
23
|
+
*/
|
24
24
|
onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
25
25
|
/**
|
26
26
|
* 事件: search, 点击查询按钮, 并且表单验证通过.
|
@@ -1,74 +1,90 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
export declare
|
1
|
+
import { KG_VAR_SUBMIT__DISPLAY_TYPE } from '../../consts';
|
2
|
+
import { IKgSubmitAfterValidateCb, IKgSubmitBeforeOkCb, IKgSubmitBeforeOpenCb, IKgSubmitBeforeRequestCb, IKgSubmitCloseCb, IKgSubmitErrorCb, IKgSubmitEvent, IKgSubmitOkCb, IKgSubmitOpenCb } from './index.store';
|
3
|
+
/**
|
4
|
+
* @param formID 界面标识.
|
5
|
+
*/
|
6
|
+
export declare function useKgSubmit(formID?: string | null): {
|
7
|
+
/** 界面标识. */
|
7
8
|
formID: string;
|
8
9
|
/** 状态数据. */
|
9
|
-
store:
|
10
|
+
store: import("pinia").Store<"KgSubmit", import("./index.store").IKgSubmitState, {
|
11
|
+
isLoading(): (formID?: string | null | undefined) => boolean;
|
12
|
+
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
13
|
+
getFormRef(): (formID?: string | null | undefined) => import("vue").Ref<import("ant-design-vue").FormInstance | null>;
|
14
|
+
getRules(): (formID?: string | null | undefined) => import("vue").Ref<Record<string, import("ant-design-vue/es/form").RuleObject[]>>;
|
15
|
+
}, {
|
16
|
+
dispose(formID?: string | null | undefined): void;
|
17
|
+
addEventListener(formID: string, event: IKgSubmitEvent, cb: import("./index.store").IKgSubmitCb): void;
|
18
|
+
removeEventListener(formID: string, event: IKgSubmitEvent, cb?: import("./index.store").IKgSubmitCb | undefined): void;
|
19
|
+
emit(formID: string, event: IKgSubmitEvent, param: import("./index.store").IKgSubmitCbParam): Promise<boolean>;
|
20
|
+
setIsLoading(formID: string, value: boolean): void;
|
21
|
+
setModel(formID: string, model: Record<string, any>): void;
|
22
|
+
}>;
|
10
23
|
/** 表单数据对象. */
|
11
|
-
model:
|
12
|
-
|
13
|
-
|
24
|
+
model: import("vue").ComputedRef<Record<string, any>>;
|
25
|
+
/** 表单组件. */
|
26
|
+
formRef: import("vue").Ref<import("ant-design-vue").FormInstance | null>;
|
27
|
+
/** 表单验证规则. */
|
28
|
+
rules: import("vue").Ref<Record<string, import("ant-design-vue/es/form").RuleObject[]>>;
|
14
29
|
/** 显示方式. */
|
15
|
-
displayType:
|
30
|
+
displayType: import("vue").ComputedRef<KG_VAR_SUBMIT__DISPLAY_TYPE>;
|
16
31
|
/**
|
17
|
-
*
|
32
|
+
* <p>事件: 打开提交弹窗之前.</p>
|
18
33
|
* @param cb 回调函数.
|
19
34
|
* @param once 是否只会触发一次. 默认为 undefined.
|
20
35
|
* @return {} 移除事件监听函数.
|
21
36
|
*/
|
22
|
-
onBeforeOpen(cb: IKgSubmitBeforeOpenCb, once?: boolean)
|
37
|
+
onBeforeOpen: (cb: IKgSubmitBeforeOpenCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
23
38
|
/**
|
24
|
-
*
|
39
|
+
* <p>事件: 打开提交弹窗.</p>
|
25
40
|
* @param cb 回调函数.
|
26
41
|
* @param once 是否只会触发一次. 默认为 undefined.
|
27
42
|
* @return {} 移除事件监听函数.
|
28
43
|
*/
|
29
|
-
onOpen(cb: IKgSubmitOpenCb, once?: boolean)
|
44
|
+
onOpen: (cb: IKgSubmitOpenCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
30
45
|
/**
|
31
|
-
*
|
32
|
-
* <p>回调函数如果返回 true,
|
46
|
+
* <p>事件: 点击确认按钮之后, 执行默认逻辑之前. 可以在此时修改表单的值; 可以在此时对表单的值进行验证.</p>
|
47
|
+
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
33
48
|
* @param cb 回调函数.
|
34
49
|
* @param once 是否只会触发一次. 默认为 undefined.
|
35
50
|
* @return {} 移除事件监听函数.
|
36
51
|
*/
|
37
|
-
onBeforeOk(cb: IKgSubmitBeforeOkCb, once?: boolean)
|
38
|
-
/**
|
39
|
-
* <p
|
52
|
+
onBeforeOk: (cb: IKgSubmitBeforeOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
53
|
+
/**
|
54
|
+
* <p>事件: 点击确认按钮之后, 表单验证完成.</p>
|
55
|
+
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
40
56
|
* @param cb 回调函数.
|
41
57
|
* @param once 是否只会触发一次. 默认为 undefined.
|
42
58
|
* @return {} 移除事件监听函数.
|
43
59
|
*/
|
44
|
-
onAfterValidate(cb: IKgSubmitAfterValidateCb, once?: boolean)
|
45
|
-
/**
|
46
|
-
* <p
|
60
|
+
onAfterValidate: (cb: IKgSubmitAfterValidateCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
61
|
+
/**
|
62
|
+
* <p>事件: 发起接口请求之前. 表单验证完成, 参数解析完成.</p>
|
63
|
+
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
47
64
|
* @param cb 回调函数.
|
48
65
|
* @param once 是否只会触发一次. 默认为 undefined.
|
49
66
|
* @return {} 移除事件监听函数.
|
50
67
|
*/
|
51
|
-
onBeforeRequest(cb: IKgSubmitBeforeRequestCb, once?: boolean)
|
52
|
-
/**
|
68
|
+
onBeforeRequest: (cb: IKgSubmitBeforeRequestCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
69
|
+
/**
|
70
|
+
* <p>事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭提交弹窗.</p>
|
53
71
|
* @param cb 回调函数.
|
54
72
|
* @param once 是否只会触发一次. 默认为 undefined.
|
55
73
|
* @return {} 移除事件监听函数.
|
56
74
|
*/
|
57
|
-
onOk(cb: IKgSubmitOkCb, once?: boolean)
|
58
|
-
/**
|
75
|
+
onOk: (cb: IKgSubmitOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
76
|
+
/**
|
77
|
+
* <p>事件: 请求失败. 请求失败了, 或者请求返回了错误消息.</p>
|
59
78
|
* @param cb 回调函数.
|
60
79
|
* @param once 是否只会触发一次. 默认为 undefined.
|
61
80
|
* @return {} 移除事件监听函数.
|
62
81
|
*/
|
63
|
-
onError(cb: IKgSubmitErrorCb, once?: boolean)
|
64
|
-
/**
|
82
|
+
onError: (cb: IKgSubmitErrorCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
83
|
+
/**
|
84
|
+
* <p>事件: 关闭提交弹窗. 点击取消或者点击确定并且成功之后, 都会触发.</p>
|
65
85
|
* @param cb 回调函数.
|
66
86
|
* @param once 是否只会触发一次. 默认为 undefined.
|
67
87
|
* @return {} 移除事件监听函数.
|
68
88
|
*/
|
69
|
-
onClose(cb: IKgSubmitCloseCb, once?: boolean)
|
89
|
+
onClose: (cb: IKgSubmitCloseCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
70
90
|
};
|
71
|
-
/**
|
72
|
-
* @param formID 界面标识.
|
73
|
-
*/
|
74
|
-
export declare function useKgSubmit(formID?: string | null): IUseKgSubmit;
|