@kengic/vue 0.22.1-beta.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -22
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +4192 -3968
- package/dist/project/build/script/postBuild.ts +1 -1
- package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
- package/dist/src/apis/WMS/models.d.ts +8 -0
- package/dist/src/components/KgButton/index.hooks.d.ts +66 -67
- package/dist/src/components/KgButton/index.store.d.ts +43 -182
- package/dist/src/components/KgForm/index.hooks.d.ts +22 -28
- package/dist/src/components/KgForm/index.store.d.ts +22 -15
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -2
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +2 -4
- package/dist/src/components/KgSearch/index.hooks.d.ts +31 -136
- package/dist/src/components/KgSearch/index.store.d.ts +59 -175
- package/dist/src/components/KgSubmit/index.hooks.d.ts +80 -279
- package/dist/src/components/KgSubmit/index.store.d.ts +40 -225
- package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
- package/dist/src/components/KgTable/index.hooks.d.ts +65 -428
- package/dist/src/components/KgTable/index.store.d.ts +87 -621
- package/dist/src/components/KgVar/index.hooks.d.ts +105 -3468
- package/dist/src/components/KgVar/index.store.d.ts +129 -3213
- package/dist/src/config/index.hooks.d.ts +31 -38
- package/dist/src/config/index.store.d.ts +74 -52
- package/dist/src/consts/i18n/en.d.ts +1 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
- package/dist/src/consts/index.d.ts +20 -13
- package/dist/src/consts/index.vm.d.ts +78 -51
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +1 -1
- package/dist/src/utils/kg.util.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +0 -0
- /package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +0 -0
- /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
- /package/dist/src/components/KgSearch/{KgSearch.hooks.d.ts → KgSearch.service.d.ts} +0 -0
- /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
- /package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
1
2
|
import { ComputedRef, Ref } from 'vue';
|
2
3
|
import { IKgEventCb } from '../../consts';
|
3
4
|
import { IKgTableRow } from '../KgTable';
|
@@ -113,14 +114,17 @@ export declare type IKgFormLookupOkCbParam = {
|
|
113
114
|
export declare type IKgFormLookupOkCb = ((param: IKgFormLookupOkCbParam) => Promise<boolean>) & IKgEventCb;
|
114
115
|
export declare type IKgFormCbParam = IKgFormChangeCbParam | IKgFormSelectBeforeSetDatasCbParam | IKgFormSelectChangeCbParam | IKgFormLookupBeforeOpenCbParam | IKgFormLookupBeforeOkCbParam | IKgFormLookupOkCbParam;
|
115
116
|
export declare type IKgFormCb = IKgFormChangeCb | IKgFormSelectBeforeSetDatasCb | IKgFormSelectChangeCb | IKgFormLookupBeforeOpenCb | IKgFormLookupBeforeOkCb | IKgFormLookupOkCb;
|
116
|
-
export
|
117
|
-
changeListenersMap: Map<string, IKgFormChangeCb
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
}
|
117
|
+
export interface IUseKgFormStoreState {
|
118
|
+
changeListenersMap: Map<string, Array<IKgFormChangeCb>>;
|
119
|
+
lookupBeforeOkListenersMap: Map<string, Array<IKgFormLookupBeforeOkCb>>;
|
120
|
+
lookupBeforeOpenListenersMap: Map<string, Array<IKgFormLookupBeforeOpenCb>>;
|
121
|
+
lookupOkListenersMap: Map<string, Array<IKgFormLookupOkCb>>;
|
122
|
+
selectBeforeSetDatasListenersMap: Map<string, Array<IKgFormSelectBeforeSetDatasCb>>;
|
123
|
+
selectChangeListenersMap: Map<string, Array<IKgFormSelectChangeCb>>;
|
124
|
+
}
|
125
|
+
export interface IUseKgFormStoreGetters {
|
126
|
+
}
|
127
|
+
export interface IUseKgFormStoreActions {
|
124
128
|
/**
|
125
129
|
* 注册事件监听.
|
126
130
|
* @param formID 界面标识.
|
@@ -129,17 +133,20 @@ export declare const useKgFormStore: import("pinia").StoreDefinition<"KgForm", {
|
|
129
133
|
*/
|
130
134
|
addEventListener(formID: string, event: IKgFormEvent, cb: IKgFormCb): void;
|
131
135
|
/**
|
132
|
-
*
|
136
|
+
* 触发事件.
|
133
137
|
* @param formID 界面标识.
|
134
138
|
* @param event 事件名称.
|
135
|
-
* @param
|
139
|
+
* @param param 数据.
|
136
140
|
*/
|
137
|
-
|
141
|
+
emit<T = IKgFormCbParam>(formID: string, event: IKgFormEvent, param: T): Promise<boolean>;
|
138
142
|
/**
|
139
|
-
*
|
143
|
+
* 退订事件监听.
|
140
144
|
* @param formID 界面标识.
|
141
145
|
* @param event 事件名称.
|
142
|
-
* @param
|
146
|
+
* @param cb 回调函数.
|
143
147
|
*/
|
144
|
-
|
145
|
-
}
|
148
|
+
removeEventListener(formID: string, event: IKgFormEvent, cb?: IKgFormCb): void;
|
149
|
+
}
|
150
|
+
export declare type IUseKgFormStore = StoreDefinition<'KgForm', IUseKgFormStoreState, IUseKgFormStoreGetters, IUseKgFormStoreActions>;
|
151
|
+
export declare type IKgFormStore = ReturnType<IUseKgFormStore>;
|
152
|
+
export declare const useKgFormStore: IUseKgFormStore;
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
kgSpan: import("vue").PropType<number>;
|
15
15
|
kgPlaceholder: import("vue").PropType<string>;
|
16
16
|
kgMode: import("vue").PropType<"multiple" | "tags">;
|
17
|
+
/** 是否全选. */
|
17
18
|
kgShowLabel: {
|
18
19
|
type: import("vue").PropType<boolean>;
|
19
20
|
default: boolean;
|
@@ -56,6 +57,7 @@ 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
63
|
default: boolean;
|
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
};
|
14
14
|
kgSpan: import("vue").PropType<number>;
|
15
15
|
kgPlaceholder: import("vue").PropType<string>;
|
16
|
-
/** 初始. */
|
17
16
|
kgMode: import("vue").PropType<"multiple" | "tags">;
|
18
17
|
kgShowLabel: {
|
19
18
|
type: import("vue").PropType<boolean>;
|
@@ -56,7 +55,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
56
55
|
};
|
57
56
|
kgSpan: import("vue").PropType<number>;
|
58
57
|
kgPlaceholder: import("vue").PropType<string>;
|
59
|
-
/** 初始. */
|
60
58
|
kgMode: import("vue").PropType<"multiple" | "tags">;
|
61
59
|
kgShowLabel: {
|
62
60
|
type: import("vue").PropType<boolean>;
|
@@ -36,9 +36,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
36
36
|
type: import("vue").PropType<import("../index.vm").IKgFormItemValue>;
|
37
37
|
default: undefined;
|
38
38
|
};
|
39
|
-
/** 初始. */
|
40
39
|
'onUpdate:value': import("vue").PropType<(value: import("../index.vm").IKgFormItemValue | null) => void>;
|
41
|
-
onKgSubmit: import("vue").PropType<() => void>;
|
40
|
+
onKgSubmit: import("vue").PropType<() => void>;
|
42
41
|
onKgChange: import("vue").PropType<(value: any) => void>;
|
43
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
44
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
@@ -79,9 +78,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
78
|
type: import("vue").PropType<import("../index.vm").IKgFormItemValue>;
|
80
79
|
default: undefined;
|
81
80
|
};
|
82
|
-
/** 初始. */
|
83
81
|
'onUpdate:value': import("vue").PropType<(value: import("../index.vm").IKgFormItemValue | null) => void>;
|
84
|
-
onKgSubmit: import("vue").PropType<() => void>;
|
82
|
+
onKgSubmit: import("vue").PropType<() => void>;
|
85
83
|
onKgChange: import("vue").PropType<(value: any) => void>;
|
86
84
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
87
85
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
@@ -1,153 +1,48 @@
|
|
1
|
+
import { ComputedRef } from 'vue';
|
2
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
1
3
|
import { IKgTableRequestParams } from '../KgTable';
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
|
5
|
+
export declare type IUseKgSearch = {
|
6
|
+
/**
|
7
|
+
* 界面标识.
|
8
|
+
*/
|
7
9
|
formID: string;
|
8
|
-
/**
|
9
|
-
|
10
|
-
isReadyMap: Map<string, boolean>;
|
11
|
-
modelMap: Map<string, Record<string, any>>;
|
12
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
13
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
14
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
15
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
16
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
17
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
18
|
-
}, {
|
19
|
-
/** 表单数据对象. */
|
20
|
-
getIsReady(state: {
|
21
|
-
isReadyMap: Map<string, boolean>;
|
22
|
-
modelMap: Map<string, Record<string, any>>;
|
23
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
24
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
25
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
26
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
27
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
28
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
29
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
30
|
-
isReadyMap: Map<string, boolean>;
|
31
|
-
modelMap: Map<string, Record<string, any>>;
|
32
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
33
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
34
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
35
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
36
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
37
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
38
|
-
}>): (formID: string | null | undefined) => boolean;
|
39
|
-
getModel(state: {
|
40
|
-
isReadyMap: Map<string, boolean>;
|
41
|
-
modelMap: Map<string, Record<string, any>>;
|
42
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
43
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
44
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
45
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
46
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
47
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
48
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
49
|
-
isReadyMap: Map<string, boolean>;
|
50
|
-
modelMap: Map<string, Record<string, any>>;
|
51
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
52
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
53
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
54
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
55
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
56
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
57
|
-
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
58
|
-
getOperatorModel(state: {
|
59
|
-
isReadyMap: Map<string, boolean>;
|
60
|
-
modelMap: Map<string, Record<string, any>>;
|
61
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
62
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
63
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
64
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
65
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
66
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
67
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
68
|
-
isReadyMap: Map<string, boolean>;
|
69
|
-
modelMap: Map<string, Record<string, any>>;
|
70
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
71
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
72
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
73
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
74
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
75
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
76
|
-
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
77
|
-
getSearchFn(state: {
|
78
|
-
isReadyMap: Map<string, boolean>;
|
79
|
-
modelMap: Map<string, Record<string, any>>;
|
80
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
81
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
82
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
83
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
84
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
85
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
86
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
87
|
-
isReadyMap: Map<string, boolean>;
|
88
|
-
modelMap: Map<string, Record<string, any>>;
|
89
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
90
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
91
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
92
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
93
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
94
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
95
|
-
}>): (formID: string | null | undefined) => import("./index.store").IKgSearchSearchFn | null;
|
96
|
-
getResetFn(state: {
|
97
|
-
isReadyMap: Map<string, boolean>;
|
98
|
-
modelMap: Map<string, Record<string, any>>;
|
99
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
100
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
101
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
102
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
103
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
104
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
105
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
106
|
-
isReadyMap: Map<string, boolean>;
|
107
|
-
modelMap: Map<string, Record<string, any>>;
|
108
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
109
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
110
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
111
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
112
|
-
resetFnMap: Map<string, import("./index.store").IKgSearchResetFn>;
|
113
|
-
searchFnMap: Map<string, import("./index.store").IKgSearchSearchFn>;
|
114
|
-
}>): (formID: string | null | undefined) => import("./index.store").IKgSearchResetFn | null;
|
115
|
-
}, {
|
116
|
-
dispose(formID: string | null | undefined): void;
|
117
|
-
addEventListener(formID: string, event: IKgSearchEvent, cb: import("./index.store").IKgSearchCb): void;
|
118
|
-
removeEventListener(formID: string, event: IKgSearchEvent, cb?: import("./index.store").IKgSearchCb | undefined): void;
|
119
|
-
emit(formID: string, event: IKgSearchEvent, param: IKgTableRequestParams): Promise<boolean>;
|
120
|
-
setIsReady(formID: string | null | undefined, ready?: boolean | undefined): void;
|
121
|
-
setModel(formID: string | null | undefined, model?: Record<string, any> | null | undefined): void;
|
122
|
-
setOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null | undefined): void;
|
123
|
-
patchModel(formID: string | null | undefined, properties?: Record<string, any> | null | undefined): Promise<void>;
|
124
|
-
patchOperatorModel(formID: string | null | undefined, properties?: Record<string, any> | null | undefined): Promise<void>;
|
125
|
-
setSearchFn(formID: string | null | undefined, fn?: import("./index.store").IKgSearchSearchFn | null | undefined): void;
|
126
|
-
setResetFn(formID: string | null | undefined, fn?: import("./index.store").IKgSearchResetFn | null | undefined): void;
|
127
|
-
}>;
|
128
|
-
isReady: import("vue").ComputedRef<boolean>;
|
10
|
+
/** 是否就绪: 查询字段初始完成, 组件渲染完成. */
|
11
|
+
isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
|
129
12
|
/** 表单数据对象. */
|
130
|
-
model:
|
131
|
-
/** 高级查询的操作符表单数据对象. */
|
132
|
-
operatorModel: import("vue").ComputedRef<Record<string, any> | null>;
|
133
|
-
search: (args?: boolean | IKgTableRequestParams) => void;
|
134
|
-
reset: () => void | undefined;
|
13
|
+
model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
|
135
14
|
/**
|
136
15
|
* 事件: ready, 查询字段初始完成, 组件渲染完成.
|
137
16
|
* @param cb 回调函数.
|
138
17
|
* @param once 是否只会触发一次. 默认为 undefined.
|
139
18
|
*/
|
140
|
-
onReady
|
19
|
+
onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
141
20
|
/**
|
142
|
-
* 事件:
|
21
|
+
* 事件: reset, 点击重置按钮.
|
143
22
|
* @param cb 回调函数.
|
144
23
|
* @param once 是否只会触发一次. 默认为 undefined.
|
145
24
|
*/
|
146
|
-
|
25
|
+
onReset(cb: IKgSearchResetCb, once?: boolean): IRemoveEventListenerHandler;
|
147
26
|
/**
|
148
|
-
* 事件:
|
27
|
+
* 事件: search, 点击查询按钮, 并且表单验证通过.
|
149
28
|
* @param cb 回调函数.
|
150
29
|
* @param once 是否只会触发一次. 默认为 undefined.
|
151
30
|
*/
|
152
|
-
|
31
|
+
onSearch(cb: IKgSearchSearchCb, once?: boolean): IRemoveEventListenerHandler;
|
32
|
+
/**
|
33
|
+
* 高级查询的操作符表单数据对象.
|
34
|
+
*/
|
35
|
+
operatorModel: ComputedRef<ReturnType<IKgSearchStore['getOperatorModel']>>;
|
36
|
+
/** 重置. */
|
37
|
+
reset(): void;
|
38
|
+
/** 查询. */
|
39
|
+
search(param?: boolean | IKgTableRequestParams): void;
|
40
|
+
/**
|
41
|
+
* 状态数据.
|
42
|
+
*/
|
43
|
+
store: IKgSearchStore;
|
153
44
|
};
|
45
|
+
/**
|
46
|
+
* @param formID 界面标识.
|
47
|
+
*/
|
48
|
+
export declare function useKgSearch(formID?: string | null): IUseKgSearch;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
1
2
|
import { IKgEventCb } from '../../consts';
|
2
3
|
import { IKgTableRequestParams } from '../KgTable';
|
3
4
|
/**
|
@@ -19,7 +20,7 @@ export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSear
|
|
19
20
|
export declare type IKgSearchSearchFn = (param?: IKgTableRequestParams) => void;
|
20
21
|
/** 重置方法. */
|
21
22
|
export declare type IKgSearchResetFn = () => void;
|
22
|
-
export
|
23
|
+
export interface IUseKgSearchStoreState {
|
23
24
|
/**
|
24
25
|
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
25
26
|
*/
|
@@ -27,177 +28,47 @@ export declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch
|
|
27
28
|
/** 表单数据对象. */
|
28
29
|
modelMap: Map<string, Record<string, any>>;
|
29
30
|
/** 事件监听函数列表: ready. */
|
30
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb
|
31
|
+
onReadyListenersMap: Map<string, Array<IKgSearchReadyCb>>;
|
31
32
|
/** 事件监听函数列表: reset. */
|
32
|
-
onResetListenersMap: Map<string, IKgSearchResetCb
|
33
|
+
onResetListenersMap: Map<string, Array<IKgSearchResetCb>>;
|
33
34
|
/** 事件监听函数列表: search. */
|
34
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb
|
35
|
+
onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
|
35
36
|
/** 高级查询的操作符表单数据对象. */
|
36
37
|
operatorModelMap: Map<string, Record<string, string>>;
|
37
38
|
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
38
39
|
resetFnMap: Map<string, IKgSearchResetFn>;
|
39
40
|
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
40
41
|
searchFnMap: Map<string, IKgSearchSearchFn>;
|
41
|
-
}
|
42
|
-
|
43
|
-
isReadyMap: Map<string, boolean>;
|
44
|
-
modelMap: Map<string, Record<string, any>>;
|
45
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
46
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
47
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
48
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
49
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
50
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
51
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
52
|
-
/**
|
53
|
-
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
54
|
-
*/
|
55
|
-
isReadyMap: Map<string, boolean>;
|
56
|
-
/** 表单数据对象. */
|
57
|
-
modelMap: Map<string, Record<string, any>>;
|
58
|
-
/** 事件监听函数列表: ready. */
|
59
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
60
|
-
/** 事件监听函数列表: reset. */
|
61
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
62
|
-
/** 事件监听函数列表: search. */
|
63
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
64
|
-
/** 高级查询的操作符表单数据对象. */
|
65
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
66
|
-
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
67
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
68
|
-
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
69
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
70
|
-
}>): (formID: string | null | undefined) => boolean;
|
71
|
-
getModel(state: {
|
72
|
-
isReadyMap: Map<string, boolean>;
|
73
|
-
modelMap: Map<string, Record<string, any>>;
|
74
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
75
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
76
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
77
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
78
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
79
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
80
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
81
|
-
/**
|
82
|
-
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
83
|
-
*/
|
84
|
-
isReadyMap: Map<string, boolean>;
|
85
|
-
/** 表单数据对象. */
|
86
|
-
modelMap: Map<string, Record<string, any>>;
|
87
|
-
/** 事件监听函数列表: ready. */
|
88
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
89
|
-
/** 事件监听函数列表: reset. */
|
90
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
91
|
-
/** 事件监听函数列表: search. */
|
92
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
93
|
-
/** 高级查询的操作符表单数据对象. */
|
94
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
95
|
-
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
96
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
97
|
-
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
98
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
99
|
-
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
100
|
-
getOperatorModel(state: {
|
101
|
-
isReadyMap: Map<string, boolean>;
|
102
|
-
modelMap: Map<string, Record<string, any>>;
|
103
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
104
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
105
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
106
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
107
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
108
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
109
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
110
|
-
/**
|
111
|
-
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
112
|
-
*/
|
113
|
-
isReadyMap: Map<string, boolean>;
|
114
|
-
/** 表单数据对象. */
|
115
|
-
modelMap: Map<string, Record<string, any>>;
|
116
|
-
/** 事件监听函数列表: ready. */
|
117
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
118
|
-
/** 事件监听函数列表: reset. */
|
119
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
120
|
-
/** 事件监听函数列表: search. */
|
121
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
122
|
-
/** 高级查询的操作符表单数据对象. */
|
123
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
124
|
-
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
125
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
126
|
-
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
127
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
128
|
-
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
42
|
+
}
|
43
|
+
export interface IUseKgSearchStoreGetters {
|
129
44
|
/**
|
130
|
-
*
|
131
|
-
*
|
45
|
+
* 是否就绪.
|
46
|
+
*
|
47
|
+
* @param formID 界面标识.
|
132
48
|
*/
|
133
|
-
|
134
|
-
isReadyMap: Map<string, boolean>;
|
135
|
-
modelMap: Map<string, Record<string, any>>;
|
136
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
137
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
138
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
139
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
140
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
141
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
142
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
143
|
-
/**
|
144
|
-
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
145
|
-
*/
|
146
|
-
isReadyMap: Map<string, boolean>;
|
147
|
-
/** 表单数据对象. */
|
148
|
-
modelMap: Map<string, Record<string, any>>;
|
149
|
-
/** 事件监听函数列表: ready. */
|
150
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
151
|
-
/** 事件监听函数列表: reset. */
|
152
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
153
|
-
/** 事件监听函数列表: search. */
|
154
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
155
|
-
/** 高级查询的操作符表单数据对象. */
|
156
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
157
|
-
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
158
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
159
|
-
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
160
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
161
|
-
}>): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
49
|
+
getIsReady(): (formID: string | null | undefined) => boolean;
|
162
50
|
/**
|
163
|
-
*
|
164
|
-
* @param state
|
51
|
+
* @param formID 界面标识.
|
165
52
|
*/
|
166
|
-
|
167
|
-
isReadyMap: Map<string, boolean>;
|
168
|
-
modelMap: Map<string, Record<string, any>>;
|
169
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
170
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
171
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
172
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
173
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
174
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
175
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
176
|
-
/**
|
177
|
-
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
178
|
-
*/
|
179
|
-
isReadyMap: Map<string, boolean>;
|
180
|
-
/** 表单数据对象. */
|
181
|
-
modelMap: Map<string, Record<string, any>>;
|
182
|
-
/** 事件监听函数列表: ready. */
|
183
|
-
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
184
|
-
/** 事件监听函数列表: reset. */
|
185
|
-
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
186
|
-
/** 事件监听函数列表: search. */
|
187
|
-
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
188
|
-
/** 高级查询的操作符表单数据对象. */
|
189
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
190
|
-
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
191
|
-
resetFnMap: Map<string, IKgSearchResetFn>;
|
192
|
-
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
193
|
-
searchFnMap: Map<string, IKgSearchSearchFn>;
|
194
|
-
}>): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
195
|
-
}, {
|
53
|
+
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
196
54
|
/**
|
197
|
-
*
|
198
|
-
* @param formID 页面标识.
|
55
|
+
* @param formID 界面标识.
|
199
56
|
*/
|
200
|
-
|
57
|
+
getOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
|
58
|
+
/**
|
59
|
+
* 获取重置方法.
|
60
|
+
*
|
61
|
+
* @param formID 界面标识.
|
62
|
+
*/
|
63
|
+
getResetFn(): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
64
|
+
/**
|
65
|
+
* 获取查询方法.
|
66
|
+
*
|
67
|
+
* @param formID 界面标识.
|
68
|
+
*/
|
69
|
+
getSearchFn(): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
70
|
+
}
|
71
|
+
export interface IUseKgSearchStoreActions {
|
201
72
|
/**
|
202
73
|
* 注册事件监听.
|
203
74
|
* @param formID 界面标识.
|
@@ -206,12 +77,10 @@ export declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch
|
|
206
77
|
*/
|
207
78
|
addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchCb): void;
|
208
79
|
/**
|
209
|
-
*
|
210
|
-
* @param formID
|
211
|
-
* @param event 事件名称.
|
212
|
-
* @param cb 回调函数.
|
80
|
+
* 清理数据.
|
81
|
+
* @param formID 页面标识.
|
213
82
|
*/
|
214
|
-
|
83
|
+
dispose(formID: string | null | undefined): void;
|
215
84
|
/**
|
216
85
|
* 触发事件.
|
217
86
|
* @param formID 界面标识.
|
@@ -219,14 +88,6 @@ export declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch
|
|
219
88
|
* @param param 事件参数.
|
220
89
|
*/
|
221
90
|
emit(formID: string, event: IKgSearchEvent, param: IKgSearchCbParam): Promise<boolean>;
|
222
|
-
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
223
|
-
/**
|
224
|
-
* 设置表单数据.
|
225
|
-
* @param formID 界面标识.
|
226
|
-
* @param model 表单数据.
|
227
|
-
*/
|
228
|
-
setModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
229
|
-
setOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
230
91
|
/**
|
231
92
|
* 修改查询字段的表单数据的部分属性.
|
232
93
|
*
|
@@ -242,15 +103,38 @@ export declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch
|
|
242
103
|
*/
|
243
104
|
patchOperatorModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
|
244
105
|
/**
|
245
|
-
*
|
106
|
+
* 退订事件监听.
|
246
107
|
* @param formID 界面标识.
|
247
|
-
* @param
|
108
|
+
* @param event 事件名称.
|
109
|
+
* @param cb 回调函数.
|
248
110
|
*/
|
249
|
-
|
111
|
+
removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
|
112
|
+
/**
|
113
|
+
* 设置是否就绪.
|
114
|
+
* @param formID 界面标识.
|
115
|
+
* @param ready 是否就绪.
|
116
|
+
*/
|
117
|
+
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
118
|
+
/**
|
119
|
+
* 设置表单数据.
|
120
|
+
* @param formID 界面标识.
|
121
|
+
* @param model 表单数据.
|
122
|
+
*/
|
123
|
+
setModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
124
|
+
setOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
250
125
|
/**
|
251
126
|
* 设置重置方法.
|
252
127
|
* @param formID 界面标识.
|
253
128
|
* @param fn 重置方法.
|
254
129
|
*/
|
255
130
|
setResetFn(formID: string | null | undefined, fn?: IKgSearchResetFn | null): void;
|
256
|
-
|
131
|
+
/**
|
132
|
+
* 设置查询方法.
|
133
|
+
* @param formID 界面标识.
|
134
|
+
* @param fn 查询方法.
|
135
|
+
*/
|
136
|
+
setSearchFn(formID: string | null | undefined, fn?: IKgSearchSearchFn | null): void;
|
137
|
+
}
|
138
|
+
export declare type IUseKgSearchStore = StoreDefinition<'KgSearch', IUseKgSearchStoreState, IUseKgSearchStoreGetters, IUseKgSearchStoreActions>;
|
139
|
+
export declare type IKgSearchStore = ReturnType<IUseKgSearchStore>;
|
140
|
+
export declare const useKgSearchStore: IUseKgSearchStore;
|