@kengic/vue 0.26.6-beta.137 → 0.26.6-beta.138
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +16695 -16716
- package/dist/src/component/KgAppSelect/index.event.d.ts +17 -0
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +2 -1
- package/dist/src/component/KgAppSelect/index.store.d.ts +1 -17
- package/dist/src/component/KgButton/index.event.d.ts +27 -0
- package/dist/src/component/KgButton/index.hooks.d.ts +7 -6
- package/dist/src/component/KgButton/index.store.d.ts +5 -30
- package/dist/src/component/KgForm/index.event.d.ts +191 -0
- package/dist/src/component/KgForm/index.hooks.d.ts +9 -8
- package/dist/src/component/KgForm/index.store.d.ts +9 -199
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +3 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +7 -5
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +1 -3
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
- package/dist/src/component/KgSearch/index.event.d.ts +17 -0
- package/dist/src/component/KgSearch/index.hooks.d.ts +5 -4
- package/dist/src/component/KgSearch/index.store.d.ts +12 -27
- package/dist/src/component/KgSubmit/index.event.d.ts +105 -0
- package/dist/src/component/KgSubmit/index.hooks.d.ts +9 -8
- package/dist/src/component/KgSubmit/index.store.d.ts +11 -114
- package/dist/src/component/KgTable/KgTable.service.d.ts +2 -2
- package/dist/src/component/KgTable/index.event.d.ts +57 -0
- package/dist/src/component/KgTable/index.hooks.d.ts +13 -12
- package/dist/src/component/KgTable/index.store.d.ts +8 -61
- package/dist/src/component/KgVar/index.vm.d.ts +8 -2
- package/dist/src/component/KgWarehouse/index.hooks.d.ts +2 -2
- package/dist/src/component/KgWarehouse/index.store.d.ts +5 -5
- package/package.json +1 -1
@@ -6,6 +6,7 @@ import { KG_FORM_CONTEXT } from '../../../const';
|
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
7
7
|
kgVarName: {
|
8
8
|
type: import("vue").PropType<string>;
|
9
|
+
/** 是否勾选. */
|
9
10
|
required: boolean;
|
10
11
|
};
|
11
12
|
kgContext: {
|
@@ -44,9 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
45
|
onKgSubmit: import("vue").PropType<() => void>;
|
45
46
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
46
47
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
47
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
48
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
48
49
|
kgVarName: {
|
49
50
|
type: import("vue").PropType<string>;
|
51
|
+
/** 是否勾选. */
|
50
52
|
required: boolean;
|
51
53
|
};
|
52
54
|
kgContext: {
|
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
20
20
|
default: boolean;
|
21
21
|
};
|
22
22
|
kgAllowClear: {
|
23
|
+
/** 是否全选. */
|
23
24
|
type: import("vue").PropType<boolean>;
|
24
25
|
default: undefined;
|
25
26
|
};
|
@@ -40,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value" | "kgCheckboxGroupChange")[], "kgSubmit" | "update:value" | "kgCheckboxGroupChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
45
|
kgVarName: {
|
45
46
|
type: import("vue").PropType<string>;
|
46
47
|
required: boolean;
|
@@ -61,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
62
|
default: boolean;
|
62
63
|
};
|
63
64
|
kgAllowClear: {
|
65
|
+
/** 是否全选. */
|
64
66
|
type: import("vue").PropType<boolean>;
|
65
67
|
default: undefined;
|
66
68
|
};
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -15,10 +15,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
15
|
kgSpan: import("vue").PropType<number>;
|
16
16
|
kgPlaceholder: import("vue").PropType<string>;
|
17
17
|
kgMode: import("vue").PropType<"multiple" | "tags">;
|
18
|
+
/** 初始. */
|
18
19
|
kgShowLabel: {
|
19
20
|
type: import("vue").PropType<boolean>;
|
20
|
-
default: boolean;
|
21
|
-
};
|
21
|
+
default: boolean;
|
22
|
+
};
|
22
23
|
kgAllowClear: {
|
23
24
|
type: import("vue").PropType<boolean>;
|
24
25
|
default: undefined;
|
@@ -40,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
45
|
kgVarName: {
|
45
46
|
type: import("vue").PropType<string>;
|
46
47
|
required: boolean;
|
@@ -56,10 +57,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
56
57
|
kgSpan: import("vue").PropType<number>;
|
57
58
|
kgPlaceholder: import("vue").PropType<string>;
|
58
59
|
kgMode: import("vue").PropType<"multiple" | "tags">;
|
60
|
+
/** 初始. */
|
59
61
|
kgShowLabel: {
|
60
62
|
type: import("vue").PropType<boolean>;
|
61
|
-
default: boolean;
|
62
|
-
};
|
63
|
+
default: boolean;
|
64
|
+
};
|
63
65
|
kgAllowClear: {
|
64
66
|
type: import("vue").PropType<boolean>;
|
65
67
|
default: undefined;
|
@@ -28,7 +28,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
default: undefined;
|
29
29
|
};
|
30
30
|
kgPicker: {
|
31
|
-
/** 是否允许清空. */
|
32
31
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-picker/interface").PickerMode>;
|
33
32
|
default: undefined;
|
34
33
|
};
|
@@ -41,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange")[], "kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
44
|
kgVarName: {
|
46
45
|
type: import("vue").PropType<string>;
|
47
46
|
required: boolean;
|
@@ -70,7 +69,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
70
69
|
default: undefined;
|
71
70
|
};
|
72
71
|
kgPicker: {
|
73
|
-
/** 是否允许清空. */
|
74
72
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-picker/interface").PickerMode>;
|
75
73
|
default: undefined;
|
76
74
|
};
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { IKgEventListener } from '@kengic/core.core';
|
2
|
+
import { IKgTableRequestParameter } from '../KgTable';
|
3
|
+
/**
|
4
|
+
* 事件类型.
|
5
|
+
* 'onReady': 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值
|
6
|
+
* 'onSearch': 点击查询按钮, 并且表单验证通过
|
7
|
+
* 'onReset': 点击重置按钮
|
8
|
+
*/
|
9
|
+
export declare type IKgSearchEvent = 'onReady' | 'onSearch' | 'onReset';
|
10
|
+
export declare type IKgSearchOnReadyEventListenerParameter = {};
|
11
|
+
export declare type IKgSearchOnReadyEventListener = ((param: IKgSearchOnReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
12
|
+
export declare type IKgSearchOnSearchEventListenerParameter = {} & IKgTableRequestParameter;
|
13
|
+
export declare type IKgSearchOnSearchEventListener = ((param: IKgSearchOnSearchEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
14
|
+
export declare type IKgSearchOnResetEventListenerParameter = {};
|
15
|
+
export declare type IKgSearchOnResetEventListener = ((param: IKgSearchOnResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
16
|
+
export declare type IKgSearchEventListenerParameter = IKgSearchOnReadyEventListenerParameter | IKgSearchOnSearchEventListenerParameter | IKgSearchOnResetEventListenerParameter;
|
17
|
+
export declare type IKgSearchEventListener = IKgSearchOnReadyEventListener | IKgSearchOnSearchEventListener | IKgSearchOnResetEventListener;
|
@@ -2,7 +2,8 @@ import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { VarProfileDetail } from '../../api/WMS/models';
|
4
4
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
|
-
import {
|
5
|
+
import { IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './index.event';
|
6
|
+
import { IKgSearchStore } from './index.store';
|
6
7
|
export declare type IUseKgSearch = {
|
7
8
|
/**
|
8
9
|
* 当前查询字段列表.
|
@@ -39,19 +40,19 @@ export declare type IUseKgSearch = {
|
|
39
40
|
* @param listener 事件监听函数.
|
40
41
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
41
42
|
*/
|
42
|
-
onReady(listener:
|
43
|
+
onReady(listener: IKgSearchOnReadyEventListener, isOnce?: boolean): IRemoveEventListener;
|
43
44
|
/**
|
44
45
|
* 监听事件: reset, 点击重置按钮.
|
45
46
|
* @param listener 事件监听函数.
|
46
47
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
47
48
|
*/
|
48
|
-
onReset(listener:
|
49
|
+
onReset(listener: IKgSearchOnResetEventListener, isOnce?: boolean): IRemoveEventListener;
|
49
50
|
/**
|
50
51
|
* 监听事件: search, 点击查询按钮, 并且表单验证通过.
|
51
52
|
* @param listener 事件监听函数.
|
52
53
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
53
54
|
*/
|
54
|
-
onSearch(listener:
|
55
|
+
onSearch(listener: IKgSearchOnSearchEventListener, isOnce?: boolean): IRemoveEventListener;
|
55
56
|
/** 重置. */
|
56
57
|
reset(): void;
|
57
58
|
/** 查询. */
|
@@ -1,26 +1,11 @@
|
|
1
|
-
import { IKgEventListener } from '@kengic/core.core';
|
2
1
|
import { StoreDefinition } from 'pinia';
|
3
2
|
import { VarProfileMasterDTO } from '../../api/WMS/models';
|
4
3
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
|
-
|
6
|
-
* 事件类型.
|
7
|
-
* 'ready': 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值
|
8
|
-
* 'search': 点击查询按钮, 并且表单验证通过
|
9
|
-
* 'reset': 点击重置按钮
|
10
|
-
*/
|
11
|
-
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
12
|
-
export declare type IKgSearchReadyEventListenerParameter = {};
|
13
|
-
export declare type IKgSearchReadyEventListener = ((param: IKgSearchReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
14
|
-
export declare type IKgSearchSearchEventListenerParameter = {} & IKgTableRequestParameter;
|
15
|
-
export declare type IKgSearchSearchEventListener = ((param: IKgSearchSearchEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
16
|
-
export declare type IKgSearchResetEventListenerParameter = {};
|
17
|
-
export declare type IKgSearchResetEventListener = ((param: IKgSearchResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
18
|
-
export declare type IKgSearchEventListenerParameter = IKgSearchReadyEventListenerParameter | IKgSearchSearchEventListenerParameter | IKgSearchResetEventListenerParameter;
|
19
|
-
export declare type IKgSearchEventListener = IKgSearchReadyEventListener | IKgSearchSearchEventListener | IKgSearchResetEventListener;
|
4
|
+
import { IKgSearchEvent, IKgSearchEventListenerParameter, IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './index.event';
|
20
5
|
/** 查询方法. */
|
21
|
-
export declare type
|
6
|
+
export declare type IKgSearchOnSearchFn = (param?: IKgTableRequestParameter) => void;
|
22
7
|
/** 重置方法. */
|
23
|
-
export declare type
|
8
|
+
export declare type IKgSearchOnResetFn = () => void;
|
24
9
|
export interface IUseKgSearchStoreState {
|
25
10
|
/**
|
26
11
|
* 高级查询操作符的表单数据对象.
|
@@ -33,15 +18,15 @@ export interface IUseKgSearchStoreState {
|
|
33
18
|
*/
|
34
19
|
isReadyMap: Map<string, boolean>;
|
35
20
|
/** 事件监听函数列表: ready. */
|
36
|
-
|
21
|
+
onReady: Map<string, Array<IKgSearchOnReadyEventListener>>;
|
37
22
|
/** 事件监听函数列表: reset. */
|
38
|
-
|
23
|
+
onReset: Map<string, Array<IKgSearchOnResetEventListener>>;
|
39
24
|
/** 事件监听函数列表: search. */
|
40
|
-
|
25
|
+
onSearch: Map<string, Array<IKgSearchOnSearchEventListener>>;
|
41
26
|
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
42
|
-
resetFnMap: Map<string,
|
27
|
+
resetFnMap: Map<string, IKgSearchOnResetFn>;
|
43
28
|
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
44
|
-
searchFnMap: Map<string,
|
29
|
+
searchFnMap: Map<string, IKgSearchOnSearchFn>;
|
45
30
|
}
|
46
31
|
export interface IUseKgSearchStoreGetters {
|
47
32
|
/**
|
@@ -67,13 +52,13 @@ export interface IUseKgSearchStoreGetters {
|
|
67
52
|
*
|
68
53
|
* @param formID 界面标识.
|
69
54
|
*/
|
70
|
-
getResetFn(): (formID: string | null | undefined) =>
|
55
|
+
getResetFn(): (formID: string | null | undefined) => IKgSearchOnResetFn | null;
|
71
56
|
/**
|
72
57
|
* 获取查询方法.
|
73
58
|
*
|
74
59
|
* @param formID 界面标识.
|
75
60
|
*/
|
76
|
-
getSearchFn(): (formID: string | null | undefined) =>
|
61
|
+
getSearchFn(): (formID: string | null | undefined) => IKgSearchOnSearchFn | null;
|
77
62
|
}
|
78
63
|
export interface IUseKgSearchStoreActions {
|
79
64
|
/**
|
@@ -134,13 +119,13 @@ export interface IUseKgSearchStoreActions {
|
|
134
119
|
* @param formID 界面标识.
|
135
120
|
* @param fn 重置方法.
|
136
121
|
*/
|
137
|
-
setResetFn(formID: string | null | undefined, fn?:
|
122
|
+
setResetFn(formID: string | null | undefined, fn?: IKgSearchOnResetFn | null): void;
|
138
123
|
/**
|
139
124
|
* 设置查询方法.
|
140
125
|
* @param formID 界面标识.
|
141
126
|
* @param fn 查询方法.
|
142
127
|
*/
|
143
|
-
setSearchFn(formID: string | null | undefined, fn?:
|
128
|
+
setSearchFn(formID: string | null | undefined, fn?: IKgSearchOnSearchFn | null): void;
|
144
129
|
}
|
145
130
|
export declare type IUseKgSearchStore = StoreDefinition<'KgSearch', IUseKgSearchStoreState, IUseKgSearchStoreGetters, IUseKgSearchStoreActions>;
|
146
131
|
export declare type IKgSearchStore = ReturnType<IUseKgSearchStore>;
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { IKgEventListener } from '@kengic/core.core';
|
2
|
+
import { Ref } from 'vue';
|
3
|
+
import { KgAny } from '../../type';
|
4
|
+
import { IKgTableRow } from '../KgTable';
|
5
|
+
/**
|
6
|
+
* 事件类型.
|
7
|
+
* 'onBeforeOpen': 打开提交弹窗之前
|
8
|
+
* 'onOpen': 打开提交弹窗
|
9
|
+
* 'onBeforeOk': 点击确认按钮之后, 执行默认逻辑之前
|
10
|
+
* 'onAfterValidate': 点击确认按钮之后, 表单验证完成,
|
11
|
+
* 'onBeforeRequest': 发起接口请求之前. 表单验证完成, 参数解析完成,
|
12
|
+
* 'onOk': 请求成功, 关闭提交弹窗之后
|
13
|
+
* 'onBeforeCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗,
|
14
|
+
* 'onCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗,
|
15
|
+
* 'onError': 请求失败. 请求失败了, 或者请求返回了错误消息
|
16
|
+
* 'onClose': 关闭提交弹窗
|
17
|
+
*/
|
18
|
+
export declare type IKgSubmitEvent = 'onBeforeOpen' | 'onOpen' | 'onBeforeOk' | 'onAfterValidate' | 'onBeforeRequest' | 'onOk' | 'onBeforeCancel' | 'onCancel' | 'onError' | 'onClose';
|
19
|
+
export declare type IKgSubmitOnBeforeOpenEventListenerParameter = {
|
20
|
+
isCreating: boolean | null;
|
21
|
+
isUpdating: boolean | null;
|
22
|
+
isCopying: boolean | null;
|
23
|
+
isDeleting: boolean | null;
|
24
|
+
row: IKgTableRow | null;
|
25
|
+
};
|
26
|
+
export declare type IKgSubmitOnBeforeOpenEventListener = ((param: IKgSubmitOnBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
27
|
+
export declare type IKgSubmitOnOpenEventListenerParameter = {
|
28
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isCreating} */
|
29
|
+
isCreating: boolean | null;
|
30
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isUpdating} */
|
31
|
+
isUpdating: boolean | null;
|
32
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isCopying} */
|
33
|
+
isCopying: boolean | null;
|
34
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isDeleting} */
|
35
|
+
isDeleting: boolean | null;
|
36
|
+
/** @deprecated 请直接使用 {@link IUseKgTable.selectedRow} */
|
37
|
+
row: IKgTableRow | null;
|
38
|
+
/** @deprecated 请直接使用 {@link IUseKgSearch.formModel} */
|
39
|
+
model: Ref<Record<string, any>>;
|
40
|
+
};
|
41
|
+
export declare type IKgSubmitOnOpenEventListener = ((param: IKgSubmitOnOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
42
|
+
export declare type IKgSubmitOnBeforeOkEventListenerParameter = {
|
43
|
+
/**
|
44
|
+
* 表单数据对象.
|
45
|
+
* @deprecated 已弃用, 请使用 {@link IUseKgSubmit.formModel}
|
46
|
+
*/
|
47
|
+
model: Ref<Record<string, any>>;
|
48
|
+
};
|
49
|
+
export declare type IKgSubmitOnBeforeOkEventListener = ((param: IKgSubmitOnBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
50
|
+
export declare type IKgSubmitOnAfterValidateEventListenerParameter = {
|
51
|
+
isCopying: boolean | null;
|
52
|
+
isCreating: boolean | null;
|
53
|
+
isDeleting: boolean | null;
|
54
|
+
isUpdating: boolean | null;
|
55
|
+
model: Ref<Record<string, any>>;
|
56
|
+
row: IKgTableRow | null;
|
57
|
+
rows: Array<IKgTableRow> | null;
|
58
|
+
};
|
59
|
+
export declare type IKgSubmitOnAfterValidateEventListener = ((param: IKgSubmitOnAfterValidateEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
60
|
+
export declare type IKgSubmitOnBeforeRequestEventListenerParameter = {
|
61
|
+
/**
|
62
|
+
* <p>请求参数. 是一个对象或者列表. 是对「表单数据对象」解析之后得到的请求参数, 如果需要修改某些参数, 则直接修改该对象的属性即可.</p>
|
63
|
+
*/
|
64
|
+
data: Ref<KgAny>;
|
65
|
+
/** @deprecated */
|
66
|
+
isCopying: boolean | null;
|
67
|
+
/** @deprecated */
|
68
|
+
isCreating: boolean | null;
|
69
|
+
/** @deprecated */
|
70
|
+
isDeleting: boolean | null;
|
71
|
+
/** @deprecated */
|
72
|
+
isUpdating: boolean | null;
|
73
|
+
/** @deprecated */
|
74
|
+
model: Ref<Record<string, any>>;
|
75
|
+
/**
|
76
|
+
* 请求参数.
|
77
|
+
*/
|
78
|
+
params: Ref<Record<string, any>>;
|
79
|
+
/** @deprecated */
|
80
|
+
row: IKgTableRow | null;
|
81
|
+
/** @deprecated */
|
82
|
+
rows: Array<IKgTableRow> | null;
|
83
|
+
};
|
84
|
+
export declare type IKgSubmitOnBeforeRequestEventListener = ((param: IKgSubmitOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
85
|
+
export declare type IKgSubmitOnOkEventListenerParameter = {
|
86
|
+
isCreating: boolean | null;
|
87
|
+
isUpdating: boolean | null;
|
88
|
+
isCopying: boolean | null;
|
89
|
+
isDeleting: boolean | null;
|
90
|
+
row: IKgTableRow | null;
|
91
|
+
model: Ref<Record<string, any>>;
|
92
|
+
/** 接口返回结果. */
|
93
|
+
result: any | null;
|
94
|
+
};
|
95
|
+
export declare type IKgSubmitOnOkEventListener = ((param: IKgSubmitOnOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
96
|
+
export declare type IKgSubmitOnBeforeCancelEventListenerParameter = {};
|
97
|
+
export declare type IKgSubmitOnBeforeCancelEventListener = ((param: IKgSubmitOnBeforeCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
98
|
+
export declare type IKgSubmitOnCancelEventListenerParameter = {};
|
99
|
+
export declare type IKgSubmitOnCancelEventListener = ((param: IKgSubmitOnCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
100
|
+
export declare type IKgSubmitOnErrorEventListenerParameter = {};
|
101
|
+
export declare type IKgSubmitOnErrorEventListener = ((param: IKgSubmitOnErrorEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
102
|
+
export declare type IKgSubmitOnCloseEventListenerParameter = {} | null | undefined;
|
103
|
+
export declare type IKgSubmitOnCloseEventListener = ((param: IKgSubmitOnCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
104
|
+
export declare type IKgSubmitEventListenerParameter = IKgSubmitOnBeforeOpenEventListenerParameter | IKgSubmitOnOpenEventListenerParameter | IKgSubmitOnBeforeOkEventListenerParameter | IKgSubmitOnAfterValidateEventListenerParameter | IKgSubmitOnBeforeRequestEventListenerParameter | IKgSubmitOnOkEventListenerParameter | IKgSubmitOnBeforeCancelEventListenerParameter | IKgSubmitOnCancelEventListenerParameter | IKgSubmitOnErrorEventListenerParameter | IKgSubmitOnCloseEventListenerParameter;
|
105
|
+
export declare type IKgSubmitEventListener = IKgSubmitOnBeforeOpenEventListener | IKgSubmitOnOpenEventListener | IKgSubmitOnBeforeOkEventListener | IKgSubmitOnAfterValidateEventListener | IKgSubmitOnBeforeRequestEventListener | IKgSubmitOnOkEventListener | IKgSubmitOnBeforeCancelEventListener | IKgSubmitOnCancelEventListener | IKgSubmitOnErrorEventListener | IKgSubmitOnCloseEventListener;
|
@@ -3,7 +3,8 @@ import { FormInstance } from 'ant-design-vue';
|
|
3
3
|
import { ComputedRef, Ref } from 'vue';
|
4
4
|
import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
|
5
5
|
import { IKgVarSubmitConfigProperties, KG__VAR_BUTTON__TYPE, KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE, KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT, KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../const';
|
6
|
-
import {
|
6
|
+
import { IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './index.event';
|
7
|
+
import { IKgSubmitStore } from './index.store';
|
7
8
|
export interface IUseKgSubmit {
|
8
9
|
/**
|
9
10
|
* <p>添加一个「提交表单字段」.</p>
|
@@ -158,7 +159,7 @@ export interface IUseKgSubmit {
|
|
158
159
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
159
160
|
* @return {} 移除事件监听函数.
|
160
161
|
*/
|
161
|
-
onAfterValidate(listener:
|
162
|
+
onAfterValidate(listener: IKgSubmitOnAfterValidateEventListener, isOnce?: boolean): IRemoveEventListener;
|
162
163
|
/**
|
163
164
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗.</p>
|
164
165
|
* @param listener 事件监听函数.
|
@@ -178,14 +179,14 @@ export interface IUseKgSubmit {
|
|
178
179
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
179
180
|
* @return {} 移除事件监听函数.
|
180
181
|
*/
|
181
|
-
onBeforeOk(listener:
|
182
|
+
onBeforeOk(listener: IKgSubmitOnBeforeOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
182
183
|
/**
|
183
184
|
* <p>监听事件: 打开提交弹窗之前.</p>
|
184
185
|
* @param listener 事件监听函数.
|
185
186
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
186
187
|
* @return {} 移除事件监听函数.
|
187
188
|
*/
|
188
|
-
onBeforeOpen(listener:
|
189
|
+
onBeforeOpen(listener: IKgSubmitOnBeforeOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
189
190
|
/**
|
190
191
|
* <p>监听事件: 发起接口请求之前. 表单验证完成, 参数解析完成.</p>
|
191
192
|
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
@@ -194,7 +195,7 @@ export interface IUseKgSubmit {
|
|
194
195
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
195
196
|
* @return {} 移除事件监听函数.
|
196
197
|
*/
|
197
|
-
onBeforeRequest(listener:
|
198
|
+
onBeforeRequest(listener: IKgSubmitOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
198
199
|
/**
|
199
200
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗.</p>
|
200
201
|
* @param listener 事件监听函数.
|
@@ -213,21 +214,21 @@ export interface IUseKgSubmit {
|
|
213
214
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
214
215
|
* @return {} 移除事件监听函数.
|
215
216
|
*/
|
216
|
-
onClose(listener:
|
217
|
+
onClose(listener: IKgSubmitOnCloseEventListener, isOnce?: boolean): IRemoveEventListener;
|
217
218
|
/**
|
218
219
|
* <p>监听事件: 请求失败. 请求失败了, 或者请求返回了错误消息.</p>
|
219
220
|
* @param listener 事件监听函数.
|
220
221
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
221
222
|
* @return {} 移除事件监听函数.
|
222
223
|
*/
|
223
|
-
onError(listener:
|
224
|
+
onError(listener: IKgSubmitOnErrorEventListener, isOnce?: boolean): IRemoveEventListener;
|
224
225
|
/**
|
225
226
|
* <p>监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 关闭提交弹窗之后.</p>
|
226
227
|
* @param listener 事件监听函数.
|
227
228
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
228
229
|
* @return {} 移除事件监听函数.
|
229
230
|
*/
|
230
|
-
onOk(listener:
|
231
|
+
onOk(listener: IKgSubmitOnOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
231
232
|
/**
|
232
233
|
* <p>监听事件: 打开提交弹窗.</p>
|
233
234
|
* @param listener 事件监听函数.
|