@zl-ui-kit/components 0.9.0 → 0.10.1

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 (44) hide show
  1. package/README.md +355 -190
  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/ZlDictTag/index.vue.d.ts +11 -3
  12. package/dist/components/ZlDictTag/index.vue.mjs +32 -23
  13. package/dist/components/ZlDynamicComponent/index.vue.d.ts +8 -3
  14. package/dist/components/ZlDynamicComponent/index.vue.mjs +24 -19
  15. package/dist/components/ZlEditor/ZlSqlEditor.vue.d.ts +28 -2
  16. package/dist/components/ZlEditor/ZlSqlEditor.vue.mjs +27 -18
  17. package/dist/components/ZlEditor/index.vue.d.ts +22 -1
  18. package/dist/components/ZlEditor/index.vue.mjs +47 -24
  19. package/dist/components/ZlForm/index.vue.d.ts +28 -2
  20. package/dist/components/ZlForm/index.vue.mjs +96 -90
  21. package/dist/components/ZlGrid/index.vue.d.ts +1 -1
  22. package/dist/components/ZlIcon/index.css +1 -1
  23. package/dist/components/ZlIcon/index.vue.d.ts +6 -2
  24. package/dist/components/ZlIcon/index.vue.mjs +2 -2
  25. package/dist/components/ZlIcon/index2.vue.mjs +30 -23
  26. package/dist/components/ZlPagination/index.css +1 -1
  27. package/dist/components/ZlPagination/index.vue.mjs +1 -1
  28. package/dist/components/ZlSearch/index.vue.d.ts +82 -23
  29. package/dist/components/ZlSearch/index.vue.mjs +8 -1
  30. package/dist/components/ZlSearchTable/index.vue.d.ts +180 -40
  31. package/dist/components/ZlSearchTable/index.vue.mjs +4 -0
  32. package/dist/components/ZlSorter/ZlSorterList.css +1 -1
  33. package/dist/components/ZlSorter/ZlSorterList.vue.d.ts +1 -1
  34. package/dist/components/ZlSorter/ZlSorterList.vue.mjs +2 -2
  35. package/dist/components/ZlSorter/index.css +1 -1
  36. package/dist/components/ZlSorter/index.vue.mjs +2 -2
  37. package/dist/components/ZlSwitch/index.vue.d.ts +6 -2
  38. package/dist/components/ZlSwitch/index.vue.mjs +26 -24
  39. package/dist/components/ZlTable/index.vue.d.ts +36 -1
  40. package/dist/components/ZlTable/index.vue.mjs +98 -75
  41. package/dist/components/ZlTabs/index.vue.d.ts +20 -3
  42. package/dist/components/ZlTabs/index.vue.mjs +30 -20
  43. package/dist/components/ZlTag/index.vue.d.ts +2 -2
  44. package/package.json +6 -6
@@ -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
@@ -1,8 +1,8 @@
1
1
  import o from "./ZlSorterList2.vue.mjs";
2
2
  import './ZlSorterList.css';/* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-189806da"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32694666"]]);
5
5
  export {
6
- p as default
6
+ s as default
7
7
  };
8
8
  //# sourceMappingURL=ZlSorterList.vue.mjs.map
@@ -1 +1 @@
1
- .zl-sorter[data-v-b80cc7d3]{display:inline-flex;align-items:center;cursor:pointer;gap:4px;font-size:12px;padding:1px 4px}.zl-sorter__label[data-v-b80cc7d3]{color:var(--zl-text-2, #4d5e7d)}.zl-sorter__label.active[data-v-b80cc7d3]{color:var(--zl-link-6, var(--el-color-primary, #3261ce))}.zl-sorter__icon[data-v-b80cc7d3]{display:inline-flex;flex-direction:column;font-size:8px;color:var(--zl-text-4, #b3c0cc)}.zl-sorter__icon .active[data-v-b80cc7d3]{color:var(--zl-link-6, var(--el-color-primary, #3261ce))}
1
+ .zl-sorter[data-v-af336d25]{display:inline-flex;align-items:center;cursor:pointer;gap:4px;font-size:12px;padding:1px 4px}.zl-sorter__label[data-v-af336d25]{color:var(--zl-text-2, #4d5e7d)}.zl-sorter__label.active[data-v-af336d25]{color:var(--zl-link-6, var(--el-color-primary, #3261ce))}.zl-sorter__icon[data-v-af336d25]{display:inline-flex;flex-direction:column;font-size:8px;color:var(--zl-text-4, #b3c0cc)}.zl-sorter__icon .active[data-v-af336d25]{color:var(--zl-link-6, var(--el-color-primary, #3261ce))}
@@ -1,8 +1,8 @@
1
1
  import o from "./index2.vue.mjs";
2
2
  import './index.css';/* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b80cc7d3"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-af336d25"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
8
8
  //# sourceMappingURL=index.vue.mjs.map
@@ -7,6 +7,10 @@ type __VLS_Props = {
7
7
  checkedValue?: boolean | string | number;
8
8
  /** 未选中状态对应的提交值 */
9
9
  uncheckedValue?: boolean | string | number;
10
+ /** `checked-value` 的别名(对齐 `el-switch` 的 `active-value`),两者同传时 `checked-value` 优先 */
11
+ activeValue?: boolean | string | number;
12
+ /** `unchecked-value` 的别名(对齐 `el-switch` 的 `inactive-value`),两者同传时 `unchecked-value` 优先 */
13
+ inactiveValue?: boolean | string | number;
10
14
  /** 选中时显示的文案 */
11
15
  checkedText?: string;
12
16
  /** 未选中时显示的文案 */
@@ -23,13 +27,13 @@ declare function __VLS_template(): {
23
27
  };
24
28
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
29
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
30
+ change: (value: string | number | boolean) => any;
26
31
  "update:modelValue": (value: string | number | boolean) => any;
27
32
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
33
+ onChange?: ((value: string | number | boolean) => any) | undefined;
28
34
  "onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
29
35
  }>, {
30
36
  defaultChecked: boolean;
31
- checkedValue: boolean | string | number;
32
- uncheckedValue: boolean | string | number;
33
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
39
  export default _default;
@@ -1,47 +1,49 @@
1
- import { defineComponent as V, ref as f, computed as d, resolveComponent as x, openBlock as n, createElementBlock as u, createVNode as C, mergeProps as T, normalizeClass as g, renderSlot as s, createTextVNode as h, toDisplayString as m, createCommentVNode as w } from "vue";
2
- const y = { class: "zl-switch" }, N = /* @__PURE__ */ V({
1
+ import { defineComponent as g, computed as c, ref as y, resolveComponent as B, openBlock as i, createElementBlock as r, createVNode as N, mergeProps as S, normalizeClass as x, renderSlot as m, createTextVNode as h, toDisplayString as v, createCommentVNode as C } from "vue";
2
+ const T = { class: "zl-switch" }, b = /* @__PURE__ */ g({
3
3
  name: "ZlSwitch",
4
4
  inheritAttrs: !1,
5
5
  __name: "index",
6
6
  props: {
7
7
  modelValue: { type: [Boolean, String, Number] },
8
8
  defaultChecked: { type: Boolean, default: !1 },
9
- checkedValue: { type: [Boolean, String, Number], default: !0 },
10
- uncheckedValue: { type: [Boolean, String, Number], default: !1 },
9
+ checkedValue: { type: [Boolean, String, Number] },
10
+ uncheckedValue: { type: [Boolean, String, Number] },
11
+ activeValue: { type: [Boolean, String, Number] },
12
+ inactiveValue: { type: [Boolean, String, Number] },
11
13
  checkedText: {},
12
14
  uncheckedText: {}
13
15
  },
14
- emits: ["update:modelValue"],
15
- setup(l, { emit: r }) {
16
- const e = l, i = r, o = f(e.defaultChecked ? e.checkedValue : e.uncheckedValue), k = d(() => e.modelValue ?? o.value), c = d(() => k.value === e.checkedValue);
17
- function p(t) {
18
- const a = t ? e.checkedValue : e.uncheckedValue;
19
- o.value = a, i("update:modelValue", a);
16
+ emits: ["update:modelValue", "change"],
17
+ setup(l, { emit: k }) {
18
+ const t = l, u = k, o = c(() => t.checkedValue ?? t.activeValue ?? !0), d = c(() => t.uncheckedValue ?? t.inactiveValue ?? !1), s = y(t.defaultChecked ? o.value : d.value), p = c(() => t.modelValue ?? s.value), n = c(() => p.value === o.value);
19
+ function V(e) {
20
+ const a = e ? o.value : d.value;
21
+ s.value = a, u("update:modelValue", a), u("change", a);
20
22
  }
21
- return (t, a) => {
22
- const v = x("el-switch");
23
- return n(), u("span", y, [
24
- C(v, T(t.$attrs, {
25
- "model-value": c.value,
23
+ return (e, a) => {
24
+ const f = B("el-switch");
25
+ return i(), r("span", T, [
26
+ N(f, S(e.$attrs, {
27
+ "model-value": n.value,
26
28
  "active-value": !0,
27
29
  "inactive-value": !1,
28
- "onUpdate:modelValue": p
30
+ "onUpdate:modelValue": V
29
31
  }), null, 16, ["model-value"]),
30
- t.$slots.checked || l.checkedText || t.$slots.unchecked || l.uncheckedText ? (n(), u("span", {
32
+ e.$slots.checked || l.checkedText || e.$slots.unchecked || l.uncheckedText ? (i(), r("span", {
31
33
  key: 0,
32
- class: g(["zl-switch__text", { "zl-switch__text--checked": c.value }])
34
+ class: x(["zl-switch__text", { "zl-switch__text--checked": n.value }])
33
35
  }, [
34
- c.value ? s(t.$slots, "checked", {}, () => [
35
- h(m(l.checkedText), 1)
36
- ], void 0, 0) : s(t.$slots, "unchecked", {}, () => [
37
- h(m(l.uncheckedText), 1)
36
+ n.value ? m(e.$slots, "checked", {}, () => [
37
+ h(v(l.checkedText), 1)
38
+ ], void 0, 0) : m(e.$slots, "unchecked", {}, () => [
39
+ h(v(l.uncheckedText), 1)
38
40
  ], void 0, 1)
39
- ], 2)) : w("", !0)
41
+ ], 2)) : C("", !0)
40
42
  ]);
41
43
  };
42
44
  }
43
45
  });
44
46
  export {
45
- N as default
47
+ b as default
46
48
  };
47
49
  //# sourceMappingURL=index.vue.mjs.map
@@ -12,7 +12,42 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
12
12
  pagination?: Record<string, any> | boolean;
13
13
  /** 表格 loading(作用于表格区) */
14
14
  loading?: boolean;
15
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ }, {
16
+ /** 单选表格下将指定行设为选中;不传参则清除当前行选中 */
17
+ setCurrentRow: (row?: any) => any;
18
+ /** 多选表格下切换某行选中状态;第二个参数可直接指定是否选中 */
19
+ toggleRowSelection: (row: any, selected?: boolean) => any;
20
+ /** 清空用户的多选状态 */
21
+ clearSelection: () => any;
22
+ /** 多选表格全选 / 取消全选 */
23
+ toggleAllSelection: () => any;
24
+ /** 取当前被选中的行 */
25
+ getSelectionRows: () => any;
26
+ /** 取当前半选(父子联动)的行 */
27
+ getHalfSelectionRows: () => any;
28
+ /** 展开/收起某行的展开内容或子节点;第二个参数可直接指定是否展开 */
29
+ toggleRowExpansion: (row: any, expanded?: boolean) => any;
30
+ /** 清除排序,恢复原始顺序 */
31
+ clearSort: () => any;
32
+ /** 清除列筛选;不传 columnKey 则清除全部 */
33
+ clearFilter: (columnKeys?: string | string[]) => any;
34
+ /** 手动排序:`prop` 指定列字段,`order` 指定升/降序 */
35
+ sort: (prop: string, order: "ascending" | "descending" | null) => any;
36
+ /** 重新计算表格布局(容器由隐藏变可见时常用) */
37
+ doLayout: () => any;
38
+ /** 懒加载树形表格下更新某行的子节点(需配合 `row-key`) */
39
+ updateKeyChildren: (key: string | number, children: any[]) => any;
40
+ /** 滚动到指定坐标 */
41
+ scrollTo: (options?: {
42
+ left?: number;
43
+ top?: number;
44
+ } | number, top?: number) => any;
45
+ /** 设置横向滚动位置 */
46
+ setScrollLeft: (left: number) => any;
47
+ /** 设置纵向滚动位置 */
48
+ setScrollTop: (top: number) => any;
49
+ elTable: any;
50
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
51
  "page-change": (pageNum: number) => any;
17
52
  "page-size-change": (pageSize: number) => any;
18
53
  "pagination-change": (payload: {