@kengic/vue 0.21.1-beta.1 → 0.21.1-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +41 -86
- package/dist/src/components/KgSearch/index.hooks.d.ts +132 -20
- package/dist/src/components/KgSearch/index.store.d.ts +206 -31
- package/dist/src/components/KgSubmit/index.hooks.d.ts +15 -6
- package/dist/src/components/KgSubmit/index.store.d.ts +10 -0
- package/dist/src/components/KgTable/index.vm.d.ts +3 -1
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -2931,7 +2931,7 @@ const emptyIcon = {
|
|
2931
2931
|
...t.data
|
2932
2932
|
}, r);
|
2933
2933
|
}
|
2934
|
-
}), version = "0.21.1-beta.
|
2934
|
+
}), version = "0.21.1-beta.2";
|
2935
2935
|
var isVue2 = !1;
|
2936
2936
|
function set(e, t, r) {
|
2937
2937
|
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, r), r) : (e[t] = r, r);
|
@@ -3318,8 +3318,8 @@ This will fail in production.`);
|
|
3318
3318
|
}
|
3319
3319
|
return i.$id = a, i;
|
3320
3320
|
}
|
3321
|
-
let store$
|
3322
|
-
const useKgStore = (e) => (store$
|
3321
|
+
let store$6 = null;
|
3322
|
+
const useKgStore = (e) => (store$6 || (store$6 = defineStore("Kg", {
|
3323
3323
|
state: () => ({
|
3324
3324
|
locale: null,
|
3325
3325
|
tFunction: null,
|
@@ -3386,7 +3386,7 @@ const useKgStore = (e) => (store$7 || (store$7 = defineStore("Kg", {
|
|
3386
3386
|
return this.pFunction ? this.pFunction(t) : (KgLogger.error("\u68C0\u67E5\u6743\u9650\u7684\u65B9\u6CD5\u4E3A\u7A7A.", { permissionCode: t }), !0);
|
3387
3387
|
}
|
3388
3388
|
}
|
3389
|
-
}).bind(null, e != null ? e : getPinia())), store$
|
3389
|
+
}).bind(null, e != null ? e : getPinia())), store$6);
|
3390
3390
|
function useKg(e) {
|
3391
3391
|
const t = useKgStore(e)(), r = computed(() => unref(t.getLocale || "zh_CN")), a = computed(() => t.getRouter), n = computed(() => t.getOption), s = t.t, i = t.p;
|
3392
3392
|
return {
|
@@ -5881,8 +5881,8 @@ function onEventFactory(e, t, r) {
|
|
5881
5881
|
return getCurrentInstance() && onUnmounted(s), s;
|
5882
5882
|
};
|
5883
5883
|
}
|
5884
|
-
let store$
|
5885
|
-
const useKgAppSelectStore = () => (store$
|
5884
|
+
let store$5 = null;
|
5885
|
+
const useKgAppSelectStore = () => (store$5 || (store$5 = defineStore("KgAppSelect", {
|
5886
5886
|
state: () => ({
|
5887
5887
|
currentApp: null,
|
5888
5888
|
gotoAppListenersMap: /* @__PURE__ */ new Map(),
|
@@ -5991,7 +5991,7 @@ const useKgAppSelectStore = () => (store$6 || (store$6 = defineStore("KgAppSelec
|
|
5991
5991
|
r !== this.currentApp && (this.currentApp = r);
|
5992
5992
|
}
|
5993
5993
|
}
|
5994
|
-
}).bind(null, getPinia())), store$
|
5994
|
+
}).bind(null, getPinia())), store$5);
|
5995
5995
|
function useKgAppSelect() {
|
5996
5996
|
const e = useKgAppSelectStore()();
|
5997
5997
|
return {
|
@@ -12041,8 +12041,8 @@ function useKgForm(e) {
|
|
12041
12041
|
};
|
12042
12042
|
}
|
12043
12043
|
KgForm.Item = KgFormItem;
|
12044
|
-
let store$
|
12045
|
-
const useKgSubmitStore = () => (store$
|
12044
|
+
let store$4 = null;
|
12045
|
+
const useKgSubmitStore = () => (store$4 || (store$4 = defineStore("KgSubmit", {
|
12046
12046
|
state: () => ({
|
12047
12047
|
beforeOpenListenersMap: /* @__PURE__ */ new Map(),
|
12048
12048
|
openListenersMap: /* @__PURE__ */ new Map(),
|
@@ -12098,10 +12098,7 @@ const useKgSubmitStore = () => (store$5 || (store$5 = defineStore("KgSubmit", {
|
|
12098
12098
|
case "beforeOpen":
|
12099
12099
|
{
|
12100
12100
|
const a = this.beforeOpenListenersMap.get(e);
|
12101
|
-
this.beforeOpenListenersMap.set(e, [
|
12102
|
-
...a != null ? a : [],
|
12103
|
-
r
|
12104
|
-
]);
|
12101
|
+
this.beforeOpenListenersMap.set(e, [...a != null ? a : [], r]);
|
12105
12102
|
}
|
12106
12103
|
break;
|
12107
12104
|
case "open":
|
@@ -12113,28 +12110,19 @@ const useKgSubmitStore = () => (store$5 || (store$5 = defineStore("KgSubmit", {
|
|
12113
12110
|
case "beforeOk":
|
12114
12111
|
{
|
12115
12112
|
const a = this.beforeOkListenersMap.get(e);
|
12116
|
-
this.beforeOkListenersMap.set(e, [
|
12117
|
-
...a != null ? a : [],
|
12118
|
-
r
|
12119
|
-
]);
|
12113
|
+
this.beforeOkListenersMap.set(e, [...a != null ? a : [], r]);
|
12120
12114
|
}
|
12121
12115
|
break;
|
12122
12116
|
case "afterValidate":
|
12123
12117
|
{
|
12124
12118
|
const a = this.afterValidateListenersMap.get(e);
|
12125
|
-
this.afterValidateListenersMap.set(e, [
|
12126
|
-
...a != null ? a : [],
|
12127
|
-
r
|
12128
|
-
]);
|
12119
|
+
this.afterValidateListenersMap.set(e, [...a != null ? a : [], r]);
|
12129
12120
|
}
|
12130
12121
|
break;
|
12131
12122
|
case "beforeRequest":
|
12132
12123
|
{
|
12133
12124
|
const a = this.beforeRequestListenersMap.get(e);
|
12134
|
-
this.beforeRequestListenersMap.set(e, [
|
12135
|
-
...a != null ? a : [],
|
12136
|
-
r
|
12137
|
-
]);
|
12125
|
+
this.beforeRequestListenersMap.set(e, [...a != null ? a : [], r]);
|
12138
12126
|
}
|
12139
12127
|
break;
|
12140
12128
|
case "ok":
|
@@ -12162,10 +12150,7 @@ const useKgSubmitStore = () => (store$5 || (store$5 = defineStore("KgSubmit", {
|
|
12162
12150
|
case "beforeOpen":
|
12163
12151
|
if (r) {
|
12164
12152
|
const a = this.beforeOpenListenersMap.get(e);
|
12165
|
-
this.beforeOpenListenersMap.set(
|
12166
|
-
e,
|
12167
|
-
without$1(a, r)
|
12168
|
-
);
|
12153
|
+
this.beforeOpenListenersMap.set(e, without$1(a, r));
|
12169
12154
|
} else
|
12170
12155
|
this.beforeOpenListenersMap.set(e, []);
|
12171
12156
|
break;
|
@@ -12186,20 +12171,14 @@ const useKgSubmitStore = () => (store$5 || (store$5 = defineStore("KgSubmit", {
|
|
12186
12171
|
case "afterValidate":
|
12187
12172
|
if (r) {
|
12188
12173
|
const a = this.afterValidateListenersMap.get(e);
|
12189
|
-
this.afterValidateListenersMap.set(
|
12190
|
-
e,
|
12191
|
-
without$1(a, r)
|
12192
|
-
);
|
12174
|
+
this.afterValidateListenersMap.set(e, without$1(a, r));
|
12193
12175
|
} else
|
12194
12176
|
this.afterValidateListenersMap.set(e, []);
|
12195
12177
|
break;
|
12196
12178
|
case "beforeRequest":
|
12197
12179
|
if (r) {
|
12198
12180
|
const a = this.beforeRequestListenersMap.get(e);
|
12199
|
-
this.beforeRequestListenersMap.set(
|
12200
|
-
e,
|
12201
|
-
without$1(a, r)
|
12202
|
-
);
|
12181
|
+
this.beforeRequestListenersMap.set(e, without$1(a, r));
|
12203
12182
|
} else
|
12204
12183
|
this.beforeRequestListenersMap.set(e, []);
|
12205
12184
|
break;
|
@@ -12278,7 +12257,7 @@ const useKgSubmitStore = () => (store$5 || (store$5 = defineStore("KgSubmit", {
|
|
12278
12257
|
isReactive(t) || (r = reactive(t)), this.modelMap.set(e, { ...r });
|
12279
12258
|
}
|
12280
12259
|
}
|
12281
|
-
}).bind(null, getPinia())), store$
|
12260
|
+
}).bind(null, getPinia())), store$4);
|
12282
12261
|
function useKgSubmit(e) {
|
12283
12262
|
const t = useKgVar(e), r = useKgSubmitStore()(), a = computed(() => t.store.getVarSubmitConfig(t.formID)), n = computed(() => {
|
12284
12263
|
var p, y, m, T, k;
|
@@ -12321,27 +12300,11 @@ function useKgSubmit(e) {
|
|
12321
12300
|
formRef: i,
|
12322
12301
|
rules: o,
|
12323
12302
|
displayType: n,
|
12324
|
-
onBeforeOpen: onEventFactory(
|
12325
|
-
t.formID,
|
12326
|
-
r,
|
12327
|
-
"beforeOpen"
|
12328
|
-
),
|
12303
|
+
onBeforeOpen: onEventFactory(t.formID, r, "beforeOpen"),
|
12329
12304
|
onOpen: onEventFactory(t.formID, r, "open"),
|
12330
|
-
onBeforeOk: onEventFactory(
|
12331
|
-
|
12332
|
-
|
12333
|
-
"beforeOk"
|
12334
|
-
),
|
12335
|
-
onAfterValidate: onEventFactory(
|
12336
|
-
t.formID,
|
12337
|
-
r,
|
12338
|
-
"afterValidate"
|
12339
|
-
),
|
12340
|
-
onBeforeRequest: onEventFactory(
|
12341
|
-
t.formID,
|
12342
|
-
r,
|
12343
|
-
"beforeRequest"
|
12344
|
-
),
|
12305
|
+
onBeforeOk: onEventFactory(t.formID, r, "beforeOk"),
|
12306
|
+
onAfterValidate: onEventFactory(t.formID, r, "afterValidate"),
|
12307
|
+
onBeforeRequest: onEventFactory(t.formID, r, "beforeRequest"),
|
12345
12308
|
onOk: onEventFactory(t.formID, r, "ok"),
|
12346
12309
|
onError: onEventFactory(t.formID, r, "error"),
|
12347
12310
|
onClose: onEventFactory(t.formID, r, "close")
|
@@ -14227,8 +14190,8 @@ function transformVarProfileDetails(e) {
|
|
14227
14190
|
return r.frm_id === FORM_ID__KG_SEARCH__VAR_PROFILE_MASTER && r.var_nam === "dyn_flg" && ((n = (a = t.option.value.KgSearch) == null ? void 0 : a.dynamicQuery) == null ? void 0 : n.on) !== !0 && (r.vis_flg = 0), r;
|
14228
14191
|
});
|
14229
14192
|
}
|
14230
|
-
let store$
|
14231
|
-
const useKgVarStore = () => (store$
|
14193
|
+
let store$3 = null;
|
14194
|
+
const useKgVarStore = () => (store$3 || (store$3 = defineStore("KgVar", {
|
14232
14195
|
state: () => ({
|
14233
14196
|
formIDs: [],
|
14234
14197
|
isRetrievingMap: /* @__PURE__ */ new Map(),
|
@@ -15093,7 +15056,7 @@ const useKgVarStore = () => (store$4 || (store$4 = defineStore("KgVar", {
|
|
15093
15056
|
);
|
15094
15057
|
}
|
15095
15058
|
}
|
15096
|
-
}).bind(null, getPinia())), store$
|
15059
|
+
}).bind(null, getPinia())), store$3);
|
15097
15060
|
function useKgVar(e, t, r = 0) {
|
15098
15061
|
var a, n;
|
15099
15062
|
try {
|
@@ -15249,8 +15212,8 @@ const DI_KG_VAR__KG_SLOTS = Symbol("DI_KG_VAR__KG_SLOTS"), DI_KG_VAR__KG_PROPS =
|
|
15249
15212
|
}, [y()]);
|
15250
15213
|
}
|
15251
15214
|
});
|
15252
|
-
let store$
|
15253
|
-
const useKgButtonStore = () => (store$
|
15215
|
+
let store$2 = null;
|
15216
|
+
const useKgButtonStore = () => (store$2 || (store$2 = defineStore("KgButton", {
|
15254
15217
|
state: () => ({
|
15255
15218
|
clickListenersMap: /* @__PURE__ */ new Map(),
|
15256
15219
|
updateBeforeClickListenersMap: /* @__PURE__ */ new Map(),
|
@@ -15429,7 +15392,7 @@ const useKgButtonStore = () => (store$3 || (store$3 = defineStore("KgButton", {
|
|
15429
15392
|
click(e, t, r, a) {
|
15430
15393
|
}
|
15431
15394
|
}
|
15432
|
-
}).bind(null, getPinia())), store$
|
15395
|
+
}).bind(null, getPinia())), store$2);
|
15433
15396
|
function useKgButton(e) {
|
15434
15397
|
const t = useKgVar(e), r = useKgButtonStore()();
|
15435
15398
|
return {
|
@@ -16260,18 +16223,16 @@ const FORM_ID__VAR_PROFILE_CONFIG = "kg-search.VarProfileConfig", getProps$n = (
|
|
16260
16223
|
const r = inject(KG_DI_FORM_ID, null), a = r ? useKgVar(r) : null;
|
16261
16224
|
return useKgVar(FORM_ID__VAR_PROFILE_CONFIG, !0, a ? a.store.getFormLevel(a.formID) + 2 : 2), useKgSubmit(FORM_ID__VAR_PROFILE_CONFIG), () => createVNode(KgVar, null, null);
|
16262
16225
|
}
|
16263
|
-
})
|
16264
|
-
let store$2 = null;
|
16265
|
-
const useKgSearchStore = () => (store$2 || (store$2 = defineStore("KgSearch", {
|
16226
|
+
}), useKgSearchStore = defineStore("KgSearch", {
|
16266
16227
|
state: () => ({
|
16267
|
-
onReadyListenersMap: /* @__PURE__ */ new Map(),
|
16268
|
-
onSearchListenersMap: /* @__PURE__ */ new Map(),
|
16269
|
-
onResetListenersMap: /* @__PURE__ */ new Map(),
|
16270
16228
|
isReadyMap: /* @__PURE__ */ new Map(),
|
16271
16229
|
modelMap: /* @__PURE__ */ new Map(),
|
16230
|
+
onReadyListenersMap: /* @__PURE__ */ new Map(),
|
16231
|
+
onResetListenersMap: /* @__PURE__ */ new Map(),
|
16232
|
+
onSearchListenersMap: /* @__PURE__ */ new Map(),
|
16272
16233
|
operatorModelMap: /* @__PURE__ */ new Map(),
|
16273
|
-
|
16274
|
-
|
16234
|
+
resetFnMap: /* @__PURE__ */ new Map(),
|
16235
|
+
searchFnMap: /* @__PURE__ */ new Map()
|
16275
16236
|
}),
|
16276
16237
|
getters: {
|
16277
16238
|
getIsReady(e) {
|
@@ -16446,13 +16407,7 @@ const useKgSearchStore = () => (store$2 || (store$2 = defineStore("KgSearch", {
|
|
16446
16407
|
(n) => {
|
16447
16408
|
n && setTimeout(() => {
|
16448
16409
|
a(), Object.entries(t).forEach(([s, i]) => {
|
16449
|
-
KgLogger.debugDDA(
|
16450
|
-
e,
|
16451
|
-
"KgSearchStore",
|
16452
|
-
"patchModel()",
|
16453
|
-
`\u8BBE\u7F6E\u5B57\u6BB5\u7684\u503C: ${s}`,
|
16454
|
-
{ model: n, key: s, value: i }
|
16455
|
-
), s in n && (n[s] = i);
|
16410
|
+
KgLogger.debugDDA(e, "KgSearchStore", "patchModel()", `\u8BBE\u7F6E\u5B57\u6BB5\u7684\u503C: ${s}`, { model: n, key: s, value: i }), s in n && (n[s] = i);
|
16456
16411
|
}), KgLogger.debugDDA(e, "KgSearchStore", "patchModel()", "\u6267\u884C\u6210\u529F", {
|
16457
16412
|
model: n
|
16458
16413
|
}), r();
|
@@ -16496,9 +16451,10 @@ const useKgSearchStore = () => (store$2 || (store$2 = defineStore("KgSearch", {
|
|
16496
16451
|
}
|
16497
16452
|
}
|
16498
16453
|
}
|
16499
|
-
})
|
16454
|
+
});
|
16500
16455
|
function useKgSearch(e) {
|
16501
|
-
const t = useKgVar(e), r = useKgSearchStore(
|
16456
|
+
const t = useKgVar(e), r = useKgSearchStore(getPinia()), a = computed(() => r.getIsReady(t.formID)), n = computed(() => r.getModel(t.formID)), s = computed(() => r.getOperatorModel(t.formID));
|
16457
|
+
function i(l) {
|
16502
16458
|
const c = watch(
|
16503
16459
|
a,
|
16504
16460
|
async (u) => {
|
@@ -16509,17 +16465,16 @@ function useKgSearch(e) {
|
|
16509
16465
|
KgLogger.error(`${t.formID} | useKgSearch | search() | \u67E5\u8BE2\u51FD\u6570\u4E3A\u7A7A.`);
|
16510
16466
|
return;
|
16511
16467
|
}
|
16512
|
-
typeof l == "boolean" ? (KgLogger.deprecated(
|
16513
|
-
`${t.formID} | useKgSearch | search() | \u65E7\u7684\u53C2\u6570\u683C\u5F0F\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u65B0\u7684\u53C2\u6570\u683C\u5F0F.`
|
16514
|
-
), d({ isSearchFirstPage: l })) : d(l);
|
16468
|
+
typeof l == "boolean" ? (KgLogger.deprecated(`${t.formID} | useKgSearch | search() | \u65E7\u7684\u53C2\u6570\u683C\u5F0F\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u65B0\u7684\u53C2\u6570\u683C\u5F0F.`), d({ isSearchFirstPage: l })) : d(l);
|
16515
16469
|
}
|
16516
16470
|
},
|
16517
16471
|
{ immediate: !0 }
|
16518
16472
|
);
|
16519
|
-
}
|
16473
|
+
}
|
16474
|
+
function o() {
|
16520
16475
|
var l;
|
16521
16476
|
return (l = r.getResetFn(t.formID)) == null ? void 0 : l();
|
16522
|
-
}
|
16477
|
+
}
|
16523
16478
|
return {
|
16524
16479
|
formID: t.formID,
|
16525
16480
|
store: r,
|
@@ -1,41 +1,153 @@
|
|
1
|
-
import { ComputedRef, Ref } from 'vue';
|
2
|
-
import { IRemoveEventListenerHandler } from '../../consts';
|
3
1
|
import { IKgTableRequestParams } from '../KgTable';
|
4
|
-
import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb
|
5
|
-
|
2
|
+
import { IKgSearchEvent, IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb } from './index.store';
|
3
|
+
/**
|
4
|
+
* @param formID 界面标识.
|
5
|
+
*/
|
6
|
+
export declare function useKgSearch(formID?: string | null): {
|
6
7
|
formID: string;
|
7
8
|
/** 状态数据. */
|
8
|
-
store:
|
9
|
-
|
10
|
-
|
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>;
|
11
129
|
/** 表单数据对象. */
|
12
|
-
model:
|
130
|
+
model: import("vue").ComputedRef<Record<string, any> | null>;
|
13
131
|
/** 高级查询的操作符表单数据对象. */
|
14
|
-
operatorModel: ComputedRef<
|
15
|
-
|
16
|
-
|
17
|
-
/** 重置. */
|
18
|
-
reset(): void;
|
132
|
+
operatorModel: import("vue").ComputedRef<Record<string, any> | null>;
|
133
|
+
search: (args?: boolean | IKgTableRequestParams) => void;
|
134
|
+
reset: () => void | undefined;
|
19
135
|
/**
|
20
136
|
* 事件: ready, 查询字段初始完成, 组件渲染完成.
|
21
137
|
* @param cb 回调函数.
|
22
138
|
* @param once 是否只会触发一次. 默认为 undefined.
|
23
139
|
*/
|
24
|
-
onReady(cb: IKgSearchReadyCb, once?: boolean)
|
140
|
+
onReady: (cb: IKgSearchReadyCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
25
141
|
/**
|
26
142
|
* 事件: search, 点击查询按钮, 并且表单验证通过.
|
27
143
|
* @param cb 回调函数.
|
28
144
|
* @param once 是否只会触发一次. 默认为 undefined.
|
29
145
|
*/
|
30
|
-
onSearch(cb: IKgSearchSearchCb, once?: boolean)
|
146
|
+
onSearch: (cb: IKgSearchSearchCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
31
147
|
/**
|
32
148
|
* 事件: reset, 点击重置按钮.
|
33
149
|
* @param cb 回调函数.
|
34
150
|
* @param once 是否只会触发一次. 默认为 undefined.
|
35
151
|
*/
|
36
|
-
onReset(cb: IKgSearchResetCb, once?: boolean)
|
152
|
+
onReset: (cb: IKgSearchResetCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
|
37
153
|
};
|
38
|
-
/**
|
39
|
-
* @param formID 界面标识.
|
40
|
-
*/
|
41
|
-
export declare function useKgSearch(formID?: string | null): IUseKgSearch;
|