@kengic/vue 0.19.2-beta.0 → 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 +3700 -3696
- package/dist/src/components/KgSubmit/index.hooks.d.ts +50 -34
- package/dist/src/components/KgVar/index.hooks.d.ts +11 -15
- package/dist/src/consts/index.vm.d.ts +1 -1
- package/package.json +1 -1
@@ -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;
|
@@ -22,9 +22,8 @@ export declare function useKgVar(formID?: string | null, init?: boolean, level?:
|
|
22
22
|
getTopFormIDs(): string[];
|
23
23
|
getFormLevel(): (frm_id: string | null | undefined) => number;
|
24
24
|
t(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => string;
|
25
|
-
/** 正在查询变量配置. */
|
26
25
|
isRetrieving(): (frm_id: string | null | undefined) => boolean | null;
|
27
|
-
isRetrievingVarProfileMaster(): (frm_id: string | null | undefined) => boolean | null;
|
26
|
+
isRetrievingVarProfileMaster(): (frm_id: string | null | undefined) => boolean | null; /** 正在查询变量配置. */
|
28
27
|
isRetrievingVarGridMaster(): (frm_id: string | null | undefined) => boolean | null;
|
29
28
|
isSearched(): (frm_id: string | null | undefined) => boolean;
|
30
29
|
isCreating(): (frm_id: string | null | undefined) => boolean | null;
|
@@ -34,36 +33,31 @@ export declare function useKgVar(formID?: string | null, init?: boolean, level?:
|
|
34
33
|
isCreatingRequesting(): (frm_id: string | null | undefined) => boolean | null;
|
35
34
|
isUpdatingRequesting(): (frm_id: string | null | undefined) => boolean | null;
|
36
35
|
isCopyingRequesting(): (frm_id: string | null | undefined) => boolean | null;
|
36
|
+
/** 其他按钮:正在调用接口. */
|
37
37
|
isDeletingRequesting(): (frm_id: string | null | undefined) => boolean | null;
|
38
38
|
isOtherRequesting(): (frm_id: string | null | undefined) => boolean | null;
|
39
39
|
getVarCatalogs(): (frm_id: string | null | undefined) => import("../../apis/WMS/models").VarVariableCatalog[] | null;
|
40
|
-
/** 当前的 VarProfileMaster. */
|
41
40
|
getVarCatalog(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariableCatalog | null;
|
42
41
|
getVarLookup(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariableLookup | null;
|
43
42
|
getVarPossibility(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariablePossibility | null;
|
44
|
-
/**
|
45
|
-
* 设置'是否正在创建'.
|
46
|
-
* @param value 是否正在创建.
|
47
|
-
*/
|
48
|
-
getVarVariableConfig(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariableConfig | null;
|
43
|
+
getVarVariableConfig(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariableConfig | null; /** 提交弹窗的配置属性. */
|
49
44
|
getVarVariableInput(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => import("../../apis/WMS/models").VarVariableInput | null;
|
50
45
|
getVarButtons(): (frm_id: string | null | undefined) => import("../../apis/WMS/models").VarButton[] | null;
|
51
46
|
getVarSubmitConfig(): (frm_id: string | null | undefined) => import("../../apis/WMS/models").VarSubmitConfig | null;
|
52
47
|
getVarSubmitConfigProps(): (frm_id: string | null | undefined) => import("../../consts").IKgSubmitConfigProps;
|
53
48
|
getVarSubmitFields(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
54
|
-
getVarSubmitFieldsForCreate(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
55
|
-
* 修改 VarSubmitField 的部分属性.
|
56
|
-
* @param variableName 变量名称
|
57
|
-
* @param properties 要修改的部分属性.
|
58
|
-
* @param isTriggerEvent 是否触发变更事件.
|
59
|
-
*/
|
49
|
+
getVarSubmitFieldsForCreate(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
60
50
|
getVarSubmitFieldsForCreateKey(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
61
51
|
getVarSubmitFieldsForCreateNotKey(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
62
52
|
getVarSubmitFieldsForCreateKeyVisible(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
63
53
|
getVarSubmitFieldsForCreateNotKeyVisible(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
64
54
|
getVarSubmitFieldsForUpdate(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
65
55
|
getVarSubmitFieldsForUpdateKey(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
66
|
-
getVarSubmitFieldsForUpdateNotKey(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
56
|
+
getVarSubmitFieldsForUpdateNotKey(): (frm_id: string | null | undefined) => VarSubmitField[] | null; /**
|
57
|
+
* 事件: 变量配置查询完成.
|
58
|
+
* @param cb 回调函数.
|
59
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
60
|
+
*/
|
67
61
|
getVarSubmitFieldsForUpdateKeyVisible(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
68
62
|
getVarSubmitFieldsForUpdateNotKeyVisible(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
69
63
|
getVarSubmitFieldsForCopy(): (frm_id: string | null | undefined) => VarSubmitField[] | null;
|
@@ -180,6 +174,8 @@ export declare function useKgVar(formID?: string | null, init?: boolean, level?:
|
|
180
174
|
systemVarGridDetails: ComputedRef<import("../../apis/WMS/models").VarGridDetail[] | null>;
|
181
175
|
/** 当前的 VarGridDetail 列表. */
|
182
176
|
currentVarGridDetails: ComputedRef<import("../../apis/WMS/models").VarGridDetail[] | null>;
|
177
|
+
/** 提交弹窗的配置属性. */
|
178
|
+
varSubmitConfigProps: ComputedRef<import("../../consts").IKgSubmitConfigProps>;
|
183
179
|
/**
|
184
180
|
* 设置'是否正在创建'.
|
185
181
|
* @param value 是否正在创建.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.19.2-beta.
|
3
|
+
"version": "0.19.2-beta.1",
|
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",
|