@zl-ui-kit/components 0.9.0 → 0.10.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.
Files changed (42) hide show
  1. package/README.md +309 -162
  2. package/dist/components/ZlAddSub/index.css +1 -1
  3. package/dist/components/ZlAddSub/index.vue.mjs +2 -2
  4. package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +1 -1
  5. package/dist/components/ZlCardPage/index.vue.d.ts +94 -36
  6. package/dist/components/ZlCardPage/index.vue.mjs +2 -0
  7. package/dist/components/ZlChart/index.vue.d.ts +1 -0
  8. package/dist/components/ZlChart/index.vue.mjs +1 -0
  9. package/dist/components/ZlCheckAll/index.css +1 -1
  10. package/dist/components/ZlCheckAll/index.vue.mjs +1 -1
  11. package/dist/components/ZlDynamicComponent/index.vue.d.ts +8 -3
  12. package/dist/components/ZlDynamicComponent/index.vue.mjs +24 -19
  13. package/dist/components/ZlEditor/ZlSqlEditor.vue.d.ts +28 -2
  14. package/dist/components/ZlEditor/ZlSqlEditor.vue.mjs +27 -18
  15. package/dist/components/ZlEditor/index.vue.d.ts +22 -1
  16. package/dist/components/ZlEditor/index.vue.mjs +47 -24
  17. package/dist/components/ZlForm/index.vue.d.ts +26 -2
  18. package/dist/components/ZlForm/index.vue.mjs +96 -90
  19. package/dist/components/ZlGrid/index.vue.d.ts +1 -1
  20. package/dist/components/ZlIcon/index.css +1 -1
  21. package/dist/components/ZlIcon/index.vue.d.ts +6 -2
  22. package/dist/components/ZlIcon/index.vue.mjs +2 -2
  23. package/dist/components/ZlIcon/index2.vue.mjs +30 -23
  24. package/dist/components/ZlPagination/index.css +1 -1
  25. package/dist/components/ZlPagination/index.vue.mjs +1 -1
  26. package/dist/components/ZlSearch/index.vue.d.ts +82 -23
  27. package/dist/components/ZlSearch/index.vue.mjs +8 -1
  28. package/dist/components/ZlSearchTable/index.vue.d.ts +180 -40
  29. package/dist/components/ZlSearchTable/index.vue.mjs +4 -0
  30. package/dist/components/ZlSorter/ZlSorterList.css +1 -1
  31. package/dist/components/ZlSorter/ZlSorterList.vue.d.ts +1 -1
  32. package/dist/components/ZlSorter/ZlSorterList.vue.mjs +2 -2
  33. package/dist/components/ZlSorter/index.css +1 -1
  34. package/dist/components/ZlSorter/index.vue.mjs +2 -2
  35. package/dist/components/ZlSwitch/index.vue.d.ts +6 -2
  36. package/dist/components/ZlSwitch/index.vue.mjs +26 -24
  37. package/dist/components/ZlTable/index.vue.d.ts +36 -1
  38. package/dist/components/ZlTable/index.vue.mjs +98 -75
  39. package/dist/components/ZlTabs/index.vue.d.ts +20 -3
  40. package/dist/components/ZlTabs/index.vue.mjs +30 -20
  41. package/dist/components/ZlTag/index.vue.d.ts +2 -2
  42. package/package.json +6 -6
@@ -78,8 +78,15 @@ declare function __VLS_template(): {
78
78
  items: import('../..').FormItem[];
79
79
  model?: Record<string, any>;
80
80
  }> & Readonly<{}>, {
81
- validate: () => Promise<void>;
82
- validateField: (name: string) => Promise<void>;
81
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
82
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
83
+ resetFields: (props?: string | string[]) => any;
84
+ clearValidate: (props?: string | string[]) => any;
85
+ scrollToField: (prop: string) => any;
86
+ getField: (prop: string) => any;
87
+ fields: any;
88
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
89
+ elForm: any;
83
90
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
84
91
  items: import('../..').FormItem[];
85
92
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -107,9 +114,16 @@ declare function __VLS_template(): {
107
114
  }> & Omit<Readonly<{
108
115
  items: import('../..').FormItem[];
109
116
  model?: Record<string, any>;
110
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
111
- validate: () => Promise<void>;
112
- validateField: (name: string) => Promise<void>;
117
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
118
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
119
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
120
+ resetFields: (props?: string | string[]) => any;
121
+ clearValidate: (props?: string | string[]) => any;
122
+ scrollToField: (prop: string) => any;
123
+ getField: (prop: string) => any;
124
+ fields: any;
125
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
126
+ elForm: any;
113
127
  } & {} & import('vue').ComponentCustomProperties & {} & {
114
128
  $slots: Partial<Record<string, (_: {
115
129
  model: Record<string, any>;
@@ -165,8 +179,15 @@ declare function __VLS_template(): {
165
179
  items: import('../..').FormItem[];
166
180
  model?: Record<string, any>;
167
181
  }> & Readonly<{}>, {
168
- validate: () => Promise<void>;
169
- validateField: (name: string) => Promise<void>;
182
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
183
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
184
+ resetFields: (props?: string | string[]) => any;
185
+ clearValidate: (props?: string | string[]) => any;
186
+ scrollToField: (prop: string) => any;
187
+ getField: (prop: string) => any;
188
+ fields: any;
189
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
190
+ elForm: any;
170
191
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
171
192
  items: import('../..').FormItem[];
172
193
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -194,9 +215,16 @@ declare function __VLS_template(): {
194
215
  }> & Omit<Readonly<{
195
216
  items: import('../..').FormItem[];
196
217
  model?: Record<string, any>;
197
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
198
- validate: () => Promise<void>;
199
- validateField: (name: string) => Promise<void>;
218
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
219
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
220
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
221
+ resetFields: (props?: string | string[]) => any;
222
+ clearValidate: (props?: string | string[]) => any;
223
+ scrollToField: (prop: string) => any;
224
+ getField: (prop: string) => any;
225
+ fields: any;
226
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
227
+ elForm: any;
200
228
  } & {} & import('vue').ComponentCustomProperties & {} & {
201
229
  $slots: Partial<Record<string, (_: {
202
230
  model: Record<string, any>;
@@ -232,18 +260,21 @@ declare function __VLS_template(): {
232
260
  };
233
261
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
234
262
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
263
+ /** 当前查询表单值(已按各项 `toParams` 转换),可直接当请求入参 */
235
264
  params: import('vue').ComputedRef<Record<string, any>>;
265
+ /** 收起展开态并触发 `search` 事件(本身不做校验,带校验的查询走组件内查询按钮) */
236
266
  search: typeof search;
267
+ /** 重置表单并清除校验提示,随后触发 `reset` 事件与一次 `search` */
237
268
  reset: typeof reset;
238
269
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
239
- search: (params: Record<string, any>) => any;
240
270
  reset: () => any;
271
+ search: (params: Record<string, any>) => any;
241
272
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
242
- onSearch?: ((params: Record<string, any>) => any) | undefined;
243
273
  onReset?: (() => any) | undefined;
274
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
244
275
  }>, {
245
- immediate: boolean;
246
276
  disabled: boolean;
277
+ immediate: boolean;
247
278
  items: SearchItem[];
248
279
  labelsVisible: boolean;
249
280
  showLabels: boolean;
@@ -273,8 +304,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
273
304
  items: import('../..').FormItem[];
274
305
  model?: Record<string, any>;
275
306
  }> & Readonly<{}>, {
276
- validate: () => Promise<void>;
277
- validateField: (name: string) => Promise<void>;
307
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
308
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
309
+ resetFields: (props?: string | string[]) => any;
310
+ clearValidate: (props?: string | string[]) => any;
311
+ scrollToField: (prop: string) => any;
312
+ getField: (prop: string) => any;
313
+ fields: any;
314
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
315
+ elForm: any;
278
316
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
279
317
  items: import('../..').FormItem[];
280
318
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -302,9 +340,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
302
340
  }> & Omit<Readonly<{
303
341
  items: import('../..').FormItem[];
304
342
  model?: Record<string, any>;
305
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
306
- validate: () => Promise<void>;
307
- validateField: (name: string) => Promise<void>;
343
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
344
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
345
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
346
+ resetFields: (props?: string | string[]) => any;
347
+ clearValidate: (props?: string | string[]) => any;
348
+ scrollToField: (prop: string) => any;
349
+ getField: (prop: string) => any;
350
+ fields: any;
351
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
352
+ elForm: any;
308
353
  } & {} & import('vue').ComponentCustomProperties & {} & {
309
354
  $slots: Partial<Record<string, (_: {
310
355
  model: Record<string, any>;
@@ -360,8 +405,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
360
405
  items: import('../..').FormItem[];
361
406
  model?: Record<string, any>;
362
407
  }> & Readonly<{}>, {
363
- validate: () => Promise<void>;
364
- validateField: (name: string) => Promise<void>;
408
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
409
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
410
+ resetFields: (props?: string | string[]) => any;
411
+ clearValidate: (props?: string | string[]) => any;
412
+ scrollToField: (prop: string) => any;
413
+ getField: (prop: string) => any;
414
+ fields: any;
415
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
416
+ elForm: any;
365
417
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
366
418
  items: import('../..').FormItem[];
367
419
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -389,9 +441,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
389
441
  }> & Omit<Readonly<{
390
442
  items: import('../..').FormItem[];
391
443
  model?: Record<string, any>;
392
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
393
- validate: () => Promise<void>;
394
- validateField: (name: string) => Promise<void>;
444
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
445
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
446
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
447
+ resetFields: (props?: string | string[]) => any;
448
+ clearValidate: (props?: string | string[]) => any;
449
+ scrollToField: (prop: string) => any;
450
+ getField: (prop: string) => any;
451
+ fields: any;
452
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
453
+ elForm: any;
395
454
  } & {} & import('vue').ComponentCustomProperties & {} & {
396
455
  $slots: Partial<Record<string, (_: {
397
456
  model: Record<string, any>;
@@ -99,7 +99,14 @@ const de = { class: "zl-search" }, me = {
99
99
  async () => {
100
100
  await w(), H();
101
101
  }
102
- ), u.immediate && (async () => (await w(), _()))(), D({ params: j, search: V, reset: x }), (e, l) => {
102
+ ), u.immediate && (async () => (await w(), _()))(), D({
103
+ /** 当前查询表单值(已按各项 `toParams` 转换),可直接当请求入参 */
104
+ params: j,
105
+ /** 收起展开态并触发 `search` 事件(本身不做校验,带校验的查询走组件内查询按钮) */
106
+ search: V,
107
+ /** 重置表单并清除校验提示,随后触发 `reset` 事件与一次 `search` */
108
+ reset: x
109
+ }), (e, l) => {
103
110
  const i = se("el-button");
104
111
  return c(), f("div", de, [
105
112
  v.value.length ? (c(), f("div", me, [
@@ -42,8 +42,8 @@ declare function __VLS_template(): {
42
42
  readonly disabled?: boolean | undefined;
43
43
  readonly labelsVisible?: boolean | undefined;
44
44
  readonly showLabels?: boolean | undefined;
45
- readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
46
45
  readonly onReset?: (() => any) | undefined;
46
+ readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
47
47
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
48
48
  $attrs: import('vue').Attrs;
49
49
  $refs: {
@@ -74,8 +74,15 @@ declare function __VLS_template(): {
74
74
  items: import('../..').FormItem[];
75
75
  model?: Record<string, any>;
76
76
  }> & Readonly<{}>, {
77
- validate: () => Promise<void>;
78
- validateField: (name: string) => Promise<void>;
77
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
78
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
79
+ resetFields: (props?: string | string[]) => any;
80
+ clearValidate: (props?: string | string[]) => any;
81
+ scrollToField: (prop: string) => any;
82
+ getField: (prop: string) => any;
83
+ fields: any;
84
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
85
+ elForm: any;
79
86
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
80
87
  items: import('../..').FormItem[];
81
88
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -103,9 +110,16 @@ declare function __VLS_template(): {
103
110
  }> & Omit<Readonly<{
104
111
  items: import('../..').FormItem[];
105
112
  model?: Record<string, any>;
106
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
107
- validate: () => Promise<void>;
108
- validateField: (name: string) => Promise<void>;
113
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
114
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
115
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
116
+ resetFields: (props?: string | string[]) => any;
117
+ clearValidate: (props?: string | string[]) => any;
118
+ scrollToField: (prop: string) => any;
119
+ getField: (prop: string) => any;
120
+ fields: any;
121
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
122
+ elForm: any;
109
123
  } & {} & import('vue').ComponentCustomProperties & {} & {
110
124
  $slots: Partial<Record<string, (_: {
111
125
  model: Record<string, any>;
@@ -161,8 +175,15 @@ declare function __VLS_template(): {
161
175
  items: import('../..').FormItem[];
162
176
  model?: Record<string, any>;
163
177
  }> & Readonly<{}>, {
164
- validate: () => Promise<void>;
165
- validateField: (name: string) => Promise<void>;
178
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
179
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
180
+ resetFields: (props?: string | string[]) => any;
181
+ clearValidate: (props?: string | string[]) => any;
182
+ scrollToField: (prop: string) => any;
183
+ getField: (prop: string) => any;
184
+ fields: any;
185
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
186
+ elForm: any;
166
187
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
167
188
  items: import('../..').FormItem[];
168
189
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -190,9 +211,16 @@ declare function __VLS_template(): {
190
211
  }> & Omit<Readonly<{
191
212
  items: import('../..').FormItem[];
192
213
  model?: Record<string, any>;
193
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
194
- validate: () => Promise<void>;
195
- validateField: (name: string) => Promise<void>;
214
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
215
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
216
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
217
+ resetFields: (props?: string | string[]) => any;
218
+ clearValidate: (props?: string | string[]) => any;
219
+ scrollToField: (prop: string) => any;
220
+ getField: (prop: string) => any;
221
+ fields: any;
222
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
223
+ elForm: any;
196
224
  } & {} & import('vue').ComponentCustomProperties & {} & {
197
225
  $slots: Partial<Record<string, (_: {
198
226
  model: Record<string, any>;
@@ -230,7 +258,7 @@ declare function __VLS_template(): {
230
258
  $root: import('vue').ComponentPublicInstance | null;
231
259
  $parent: import('vue').ComponentPublicInstance | null;
232
260
  $host: Element | null;
233
- $emit: ((event: "search", params: Record<string, any>) => void) & ((event: "reset") => void);
261
+ $emit: ((event: "reset") => void) & ((event: "search", params: Record<string, any>) => void);
234
262
  $el: HTMLDivElement;
235
263
  $options: import('vue').ComponentOptionsBase<Readonly<{
236
264
  items?: SearchItem[];
@@ -240,18 +268,18 @@ declare function __VLS_template(): {
240
268
  labelsVisible?: boolean;
241
269
  showLabels?: boolean;
242
270
  }> & Readonly<{
243
- onSearch?: ((params: Record<string, any>) => any) | undefined;
244
271
  onReset?: (() => any) | undefined;
272
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
245
273
  }>, {
246
274
  params: import('vue').ComputedRef<Record<string, any>>;
247
275
  search: () => Promise<void>;
248
276
  reset: () => Promise<void>;
249
277
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
250
- search: (params: Record<string, any>) => any;
251
278
  reset: () => any;
279
+ search: (params: Record<string, any>) => any;
252
280
  }, string, {
253
- immediate: boolean;
254
281
  disabled: boolean;
282
+ immediate: boolean;
255
283
  items: SearchItem[];
256
284
  labelsVisible: boolean;
257
285
  showLabels: boolean;
@@ -276,8 +304,8 @@ declare function __VLS_template(): {
276
304
  $nextTick: typeof import('vue').nextTick;
277
305
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
278
306
  } & Readonly<{
279
- immediate: boolean;
280
307
  disabled: boolean;
308
+ immediate: boolean;
281
309
  items: SearchItem[];
282
310
  labelsVisible: boolean;
283
311
  showLabels: boolean;
@@ -289,9 +317,9 @@ declare function __VLS_template(): {
289
317
  labelsVisible?: boolean;
290
318
  showLabels?: boolean;
291
319
  }> & Readonly<{
292
- onSearch?: ((params: Record<string, any>) => any) | undefined;
293
320
  onReset?: (() => any) | undefined;
294
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
321
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
322
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
295
323
  params: Record<string, any>;
296
324
  search: () => Promise<void>;
297
325
  reset: () => Promise<void>;
@@ -372,7 +400,27 @@ declare function __VLS_template(): {
372
400
  pageNum: number;
373
401
  pageSize: number;
374
402
  }) => any) | undefined;
375
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
403
+ }>, {
404
+ setCurrentRow: (row?: any) => any;
405
+ toggleRowSelection: (row: any, selected?: boolean) => any;
406
+ clearSelection: () => any;
407
+ toggleAllSelection: () => any;
408
+ getSelectionRows: () => any;
409
+ getHalfSelectionRows: () => any;
410
+ toggleRowExpansion: (row: any, expanded?: boolean) => any;
411
+ clearSort: () => any;
412
+ clearFilter: (columnKeys?: string | string[]) => any;
413
+ sort: (prop: string, order: "ascending" | "descending" | null) => any;
414
+ doLayout: () => any;
415
+ updateKeyChildren: (key: string | number, children: any[]) => any;
416
+ scrollTo: (options?: {
417
+ left?: number;
418
+ top?: number;
419
+ } | number, top?: number) => any;
420
+ setScrollLeft: (left: number) => any;
421
+ setScrollTop: (top: number) => any;
422
+ elTable: any;
423
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
376
424
  "page-change": (pageNum: number) => any;
377
425
  "page-size-change": (pageSize: number) => any;
378
426
  "pagination-change": (payload: {
@@ -421,7 +469,27 @@ declare function __VLS_template(): {
421
469
  pageNum: number;
422
470
  pageSize: number;
423
471
  }) => any) | undefined;
424
- }>, "loading" | "dataKey" | "expandAction"> & {} & import('vue').ComponentCustomProperties & {} & {
472
+ }>, "sort" | ("loading" | "dataKey" | "expandAction") | "elTable" | "setCurrentRow" | "toggleRowSelection" | "clearSelection" | "toggleAllSelection" | "getSelectionRows" | "getHalfSelectionRows" | "toggleRowExpansion" | "clearSort" | "clearFilter" | "doLayout" | "updateKeyChildren" | "scrollTo" | "setScrollLeft" | "setScrollTop"> & {
473
+ setCurrentRow: (row?: any) => any;
474
+ toggleRowSelection: (row: any, selected?: boolean) => any;
475
+ clearSelection: () => any;
476
+ toggleAllSelection: () => any;
477
+ getSelectionRows: () => any;
478
+ getHalfSelectionRows: () => any;
479
+ toggleRowExpansion: (row: any, expanded?: boolean) => any;
480
+ clearSort: () => any;
481
+ clearFilter: (columnKeys?: string | string[]) => any;
482
+ sort: (prop: string, order: "ascending" | "descending" | null) => any;
483
+ doLayout: () => any;
484
+ updateKeyChildren: (key: string | number, children: any[]) => any;
485
+ scrollTo: (options?: {
486
+ left?: number;
487
+ top?: number;
488
+ } | number, top?: number) => any;
489
+ setScrollLeft: (left: number) => any;
490
+ setScrollTop: (top: number) => any;
491
+ elTable: any;
492
+ } & {} & import('vue').ComponentCustomProperties & {} & {
425
493
  $slots: Partial<Record<any, (_: any) => any>> & Partial<Record<any, (_: any) => any>> & {
426
494
  expand?(_: any): any;
427
495
  };
@@ -431,9 +499,13 @@ declare function __VLS_template(): {
431
499
  };
432
500
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
433
501
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
502
+ /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
434
503
  refresh: () => void;
504
+ /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`) */
435
505
  params: import('vue').ComputedRef<unknown>;
506
+ /** 内部 ZlSearch 实例,`params` / `search()` / `reset()` 等可直接调用 */
436
507
  search: {};
508
+ /** 内部 ZlTable 实例,`toggleRowSelection()` / `doLayout()` 等可直接调用 */
437
509
  table: {};
438
510
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
439
511
  "search-reset": () => any;
@@ -454,8 +526,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
454
526
  readonly disabled?: boolean | undefined;
455
527
  readonly labelsVisible?: boolean | undefined;
456
528
  readonly showLabels?: boolean | undefined;
457
- readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
458
529
  readonly onReset?: (() => any) | undefined;
530
+ readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
459
531
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
460
532
  $attrs: import('vue').Attrs;
461
533
  $refs: {
@@ -486,8 +558,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
486
558
  items: import('../..').FormItem[];
487
559
  model?: Record<string, any>;
488
560
  }> & Readonly<{}>, {
489
- validate: () => Promise<void>;
490
- validateField: (name: string) => Promise<void>;
561
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
562
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
563
+ resetFields: (props?: string | string[]) => any;
564
+ clearValidate: (props?: string | string[]) => any;
565
+ scrollToField: (prop: string) => any;
566
+ getField: (prop: string) => any;
567
+ fields: any;
568
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
569
+ elForm: any;
491
570
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
492
571
  items: import('../..').FormItem[];
493
572
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -515,9 +594,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
515
594
  }> & Omit<Readonly<{
516
595
  items: import('../..').FormItem[];
517
596
  model?: Record<string, any>;
518
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
519
- validate: () => Promise<void>;
520
- validateField: (name: string) => Promise<void>;
597
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
598
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
599
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
600
+ resetFields: (props?: string | string[]) => any;
601
+ clearValidate: (props?: string | string[]) => any;
602
+ scrollToField: (prop: string) => any;
603
+ getField: (prop: string) => any;
604
+ fields: any;
605
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
606
+ elForm: any;
521
607
  } & {} & import('vue').ComponentCustomProperties & {} & {
522
608
  $slots: Partial<Record<string, (_: {
523
609
  model: Record<string, any>;
@@ -573,8 +659,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
573
659
  items: import('../..').FormItem[];
574
660
  model?: Record<string, any>;
575
661
  }> & Readonly<{}>, {
576
- validate: () => Promise<void>;
577
- validateField: (name: string) => Promise<void>;
662
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
663
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
664
+ resetFields: (props?: string | string[]) => any;
665
+ clearValidate: (props?: string | string[]) => any;
666
+ scrollToField: (prop: string) => any;
667
+ getField: (prop: string) => any;
668
+ fields: any;
669
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
670
+ elForm: any;
578
671
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
579
672
  items: import('../..').FormItem[];
580
673
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -602,9 +695,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
602
695
  }> & Omit<Readonly<{
603
696
  items: import('../..').FormItem[];
604
697
  model?: Record<string, any>;
605
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
606
- validate: () => Promise<void>;
607
- validateField: (name: string) => Promise<void>;
698
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
699
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
700
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
701
+ resetFields: (props?: string | string[]) => any;
702
+ clearValidate: (props?: string | string[]) => any;
703
+ scrollToField: (prop: string) => any;
704
+ getField: (prop: string) => any;
705
+ fields: any;
706
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
707
+ elForm: any;
608
708
  } & {} & import('vue').ComponentCustomProperties & {} & {
609
709
  $slots: Partial<Record<string, (_: {
610
710
  model: Record<string, any>;
@@ -642,7 +742,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
642
742
  $root: import('vue').ComponentPublicInstance | null;
643
743
  $parent: import('vue').ComponentPublicInstance | null;
644
744
  $host: Element | null;
645
- $emit: ((event: "search", params: Record<string, any>) => void) & ((event: "reset") => void);
745
+ $emit: ((event: "reset") => void) & ((event: "search", params: Record<string, any>) => void);
646
746
  $el: HTMLDivElement;
647
747
  $options: import('vue').ComponentOptionsBase<Readonly<{
648
748
  items?: SearchItem[];
@@ -652,18 +752,18 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
652
752
  labelsVisible?: boolean;
653
753
  showLabels?: boolean;
654
754
  }> & Readonly<{
655
- onSearch?: ((params: Record<string, any>) => any) | undefined;
656
755
  onReset?: (() => any) | undefined;
756
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
657
757
  }>, {
658
758
  params: import('vue').ComputedRef<Record<string, any>>;
659
759
  search: () => Promise<void>;
660
760
  reset: () => Promise<void>;
661
761
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
662
- search: (params: Record<string, any>) => any;
663
762
  reset: () => any;
763
+ search: (params: Record<string, any>) => any;
664
764
  }, string, {
665
- immediate: boolean;
666
765
  disabled: boolean;
766
+ immediate: boolean;
667
767
  items: SearchItem[];
668
768
  labelsVisible: boolean;
669
769
  showLabels: boolean;
@@ -688,8 +788,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
688
788
  $nextTick: typeof import('vue').nextTick;
689
789
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
690
790
  } & Readonly<{
691
- immediate: boolean;
692
791
  disabled: boolean;
792
+ immediate: boolean;
693
793
  items: SearchItem[];
694
794
  labelsVisible: boolean;
695
795
  showLabels: boolean;
@@ -701,9 +801,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
701
801
  labelsVisible?: boolean;
702
802
  showLabels?: boolean;
703
803
  }> & Readonly<{
704
- onSearch?: ((params: Record<string, any>) => any) | undefined;
705
804
  onReset?: (() => any) | undefined;
706
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
805
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
806
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
707
807
  params: Record<string, any>;
708
808
  search: () => Promise<void>;
709
809
  reset: () => Promise<void>;
@@ -784,7 +884,27 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
784
884
  pageNum: number;
785
885
  pageSize: number;
786
886
  }) => any) | undefined;
787
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
887
+ }>, {
888
+ setCurrentRow: (row?: any) => any;
889
+ toggleRowSelection: (row: any, selected?: boolean) => any;
890
+ clearSelection: () => any;
891
+ toggleAllSelection: () => any;
892
+ getSelectionRows: () => any;
893
+ getHalfSelectionRows: () => any;
894
+ toggleRowExpansion: (row: any, expanded?: boolean) => any;
895
+ clearSort: () => any;
896
+ clearFilter: (columnKeys?: string | string[]) => any;
897
+ sort: (prop: string, order: "ascending" | "descending" | null) => any;
898
+ doLayout: () => any;
899
+ updateKeyChildren: (key: string | number, children: any[]) => any;
900
+ scrollTo: (options?: {
901
+ left?: number;
902
+ top?: number;
903
+ } | number, top?: number) => any;
904
+ setScrollLeft: (left: number) => any;
905
+ setScrollTop: (top: number) => any;
906
+ elTable: any;
907
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
788
908
  "page-change": (pageNum: number) => any;
789
909
  "page-size-change": (pageSize: number) => any;
790
910
  "pagination-change": (payload: {
@@ -833,7 +953,27 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
833
953
  pageNum: number;
834
954
  pageSize: number;
835
955
  }) => any) | undefined;
836
- }>, "loading" | "dataKey" | "expandAction"> & {} & import('vue').ComponentCustomProperties & {} & {
956
+ }>, "sort" | ("loading" | "dataKey" | "expandAction") | "elTable" | "setCurrentRow" | "toggleRowSelection" | "clearSelection" | "toggleAllSelection" | "getSelectionRows" | "getHalfSelectionRows" | "toggleRowExpansion" | "clearSort" | "clearFilter" | "doLayout" | "updateKeyChildren" | "scrollTo" | "setScrollLeft" | "setScrollTop"> & {
957
+ setCurrentRow: (row?: any) => any;
958
+ toggleRowSelection: (row: any, selected?: boolean) => any;
959
+ clearSelection: () => any;
960
+ toggleAllSelection: () => any;
961
+ getSelectionRows: () => any;
962
+ getHalfSelectionRows: () => any;
963
+ toggleRowExpansion: (row: any, expanded?: boolean) => any;
964
+ clearSort: () => any;
965
+ clearFilter: (columnKeys?: string | string[]) => any;
966
+ sort: (prop: string, order: "ascending" | "descending" | null) => any;
967
+ doLayout: () => any;
968
+ updateKeyChildren: (key: string | number, children: any[]) => any;
969
+ scrollTo: (options?: {
970
+ left?: number;
971
+ top?: number;
972
+ } | number, top?: number) => any;
973
+ setScrollLeft: (left: number) => any;
974
+ setScrollTop: (top: number) => any;
975
+ elTable: any;
976
+ } & {} & import('vue').ComponentCustomProperties & {} & {
837
977
  $slots: Partial<Record<any, (_: any) => any>> & Partial<Record<any, (_: any) => any>> & {
838
978
  expand?(_: any): any;
839
979
  };
@@ -61,8 +61,11 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
61
61
  },
62
62
  { immediate: !0, once: !0 }
63
63
  ), w({
64
+ /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
64
65
  refresh: j,
66
+ /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`) */
65
67
  params: N,
68
+ /** 内部 ZlSearch 实例,`params` / `search()` / `reset()` 等可直接调用 */
66
69
  search: new Proxy(
67
70
  {},
68
71
  {
@@ -74,6 +77,7 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
74
77
  }
75
78
  }
76
79
  ),
80
+ /** 内部 ZlTable 实例,`toggleRowSelection()` / `doLayout()` 等可直接调用 */
77
81
  table: new Proxy(
78
82
  {},
79
83
  {
@@ -1 +1 @@
1
- .zl-sorter-list[data-v-189806da]{display:flex}.zl-sorter-list__separator[data-v-189806da]{margin:4px 2px;width:1px;background-color:var(--zl-border-2, #e3e9ef)}.zl-sorter-list__separator[data-v-189806da]:last-child{display:none}
1
+ .zl-sorter-list[data-v-32694666]{display:flex}.zl-sorter-list__separator[data-v-32694666]{margin:4px 2px;width:1px;background-color:var(--zl-border-2, #e3e9ef)}.zl-sorter-list__separator[data-v-32694666]:last-child{display:none}
@@ -19,8 +19,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
19
19
  onChange?: ((model: Record<string, any>, key: string, value: string) => any) | undefined;
20
20
  "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
21
21
  }>, {
22
- sorters: SorterItem[];
23
22
  multiple: boolean;
23
+ sorters: SorterItem[];
24
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
25
25
  export default _default;
26
26
  //# sourceMappingURL=ZlSorterList.vue.d.ts.map