@kengic/vue 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/CHANGELOG.md +178 -139
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +4201 -3969
  4. package/dist/project/build/script/postBuild.ts +1 -1
  5. package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
  6. package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
  7. package/dist/src/apis/WMS/models.d.ts +8 -0
  8. package/dist/src/components/KgButton/index.hooks.d.ts +74 -199
  9. package/dist/src/components/KgButton/index.store.d.ts +48 -184
  10. package/dist/src/components/KgForm/index.hooks.d.ts +22 -28
  11. package/dist/src/components/KgForm/index.store.d.ts +22 -15
  12. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -0
  13. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -2
  14. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +2 -4
  15. package/dist/src/components/KgSearch/index.hooks.d.ts +31 -136
  16. package/dist/src/components/KgSearch/index.store.d.ts +59 -175
  17. package/dist/src/components/KgSubmit/index.hooks.d.ts +80 -279
  18. package/dist/src/components/KgSubmit/index.store.d.ts +40 -225
  19. package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
  20. package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
  21. package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
  22. package/dist/src/components/KgTable/index.hooks.d.ts +65 -428
  23. package/dist/src/components/KgTable/index.store.d.ts +87 -621
  24. package/dist/src/components/KgVar/index.hooks.d.ts +105 -3622
  25. package/dist/src/components/KgVar/index.store.d.ts +129 -3213
  26. package/dist/src/config/index.hooks.d.ts +31 -38
  27. package/dist/src/config/index.store.d.ts +74 -52
  28. package/dist/src/consts/i18n/en.d.ts +1 -0
  29. package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
  30. package/dist/src/consts/index.d.ts +20 -13
  31. package/dist/src/consts/index.vm.d.ts +78 -51
  32. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +1 -1
  33. package/dist/src/utils/kg-route.util.d.ts +3 -2
  34. package/dist/src/utils/kg.util.d.ts +2 -2
  35. package/package.json +1 -1
  36. /package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +0 -0
  37. /package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +0 -0
  38. /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
  39. /package/dist/src/components/KgSearch/{KgSearch.hooks.d.ts → KgSearch.service.d.ts} +0 -0
  40. /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
  41. /package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +0 -0
@@ -1,153 +1,48 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { IRemoveEventListenerHandler } from '../../consts';
1
3
  import { IKgTableRequestParams } from '../KgTable';
2
- import { IKgSearchEvent, IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb } from './index.store';
3
- /**
4
- * @param formID 界面标识.
5
- */
6
- export declare function useKgSearch(formID?: string | null): {
4
+ import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
5
+ export declare type IUseKgSearch = {
6
+ /**
7
+ * 界面标识.
8
+ */
7
9
  formID: string;
8
- /** 状态数据. */
9
- store: import("pinia").Store<"KgSearch", {
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: import("vue").ComputedRef<Record<string, any> | null>;
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: (cb: IKgSearchReadyCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
19
+ onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
141
20
  /**
142
- * 事件: search, 点击查询按钮, 并且表单验证通过.
21
+ * 事件: reset, 点击重置按钮.
143
22
  * @param cb 回调函数.
144
23
  * @param once 是否只会触发一次. 默认为 undefined.
145
24
  */
146
- onSearch: (cb: IKgSearchSearchCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
25
+ onReset(cb: IKgSearchResetCb, once?: boolean): IRemoveEventListenerHandler;
147
26
  /**
148
- * 事件: reset, 点击重置按钮.
27
+ * 事件: search, 点击查询按钮, 并且表单验证通过.
149
28
  * @param cb 回调函数.
150
29
  * @param once 是否只会触发一次. 默认为 undefined.
151
30
  */
152
- onReset: (cb: IKgSearchResetCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
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 declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch", {
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
- getIsReady(state: {
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
- * 根据 formID 获取查询方法.
131
- * @param state
45
+ * 是否就绪.
46
+ *
47
+ * @param formID 界面标识.
132
48
  */
133
- getSearchFn(state: {
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
- * 根据 formID 获取重置方法.
164
- * @param state
51
+ * @param formID 界面标识.
165
52
  */
166
- getResetFn(state: {
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
- dispose(formID: string | null | undefined): void;
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
- removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
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 fn 查询方法.
108
+ * @param event 事件名称.
109
+ * @param cb 回调函数.
248
110
  */
249
- setSearchFn(formID: string | null | undefined, fn?: IKgSearchSearchFn | null): void;
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;