@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
@@ -1 +1 @@
1
- .zl-add[data-v-305c0700]{display:flex;flex-direction:column;gap:8px}.zl-add__box[data-v-305c0700]{display:flex;flex-direction:row;align-items:center}.zl-add__box .zl-icon[data-v-305c0700]{cursor:pointer;margin-left:8px}.zl-add__content[data-v-305c0700]{flex:1}.zl-add__dot[data-v-305c0700]{display:inline-flex;width:14px;height:14px;margin-left:8px}
1
+ .zl-add[data-v-14a39cf3]{display:flex;flex-direction:column;gap:8px}.zl-add__box[data-v-14a39cf3]{display:flex;flex-direction:row;align-items:center}.zl-add__box .zl-icon[data-v-14a39cf3]{cursor:pointer;margin-left:8px}.zl-add__content[data-v-14a39cf3]{flex:1}.zl-add__dot[data-v-14a39cf3]{display:inline-flex;width:14px;height:14px;margin-left:8px}
@@ -1,8 +1,8 @@
1
1
  import o from "./index2.vue.mjs";
2
2
  import './index.css';/* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-305c0700"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-14a39cf3"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
8
8
  //# sourceMappingURL=index.vue.mjs.map
@@ -19,8 +19,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
19
19
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
20
  "onMenu-item-click"?: ((menu: MenuItem) => any) | undefined;
21
21
  }>, {
22
- collapsed: boolean;
23
22
  layout: "vertical" | "horizontal";
23
+ collapsed: boolean;
24
24
  menus: MenuItem[];
25
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
26
  export default _default;
@@ -73,8 +73,8 @@ declare function __VLS_template(): {
73
73
  readonly disabled?: boolean | undefined;
74
74
  readonly labelsVisible?: boolean | undefined;
75
75
  readonly showLabels?: boolean | undefined;
76
- readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
77
76
  readonly onReset?: (() => any) | undefined;
77
+ readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
78
78
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
79
79
  $attrs: import('vue').Attrs;
80
80
  $refs: {
@@ -105,8 +105,15 @@ declare function __VLS_template(): {
105
105
  items: import('../..').FormItem[];
106
106
  model?: Record<string, any>;
107
107
  }> & Readonly<{}>, {
108
- validate: () => Promise<void>;
109
- validateField: (name: string) => Promise<void>;
108
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
109
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
110
+ resetFields: (props?: string | string[]) => any;
111
+ clearValidate: (props?: string | string[]) => any;
112
+ scrollToField: (prop: string) => any;
113
+ getField: (prop: string) => any;
114
+ fields: any;
115
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
116
+ elForm: any;
110
117
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
111
118
  items: import('../..').FormItem[];
112
119
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -134,9 +141,16 @@ declare function __VLS_template(): {
134
141
  }> & Omit<Readonly<{
135
142
  items: import('../..').FormItem[];
136
143
  model?: Record<string, any>;
137
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
138
- validate: () => Promise<void>;
139
- validateField: (name: string) => Promise<void>;
144
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
145
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
146
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
147
+ resetFields: (props?: string | string[]) => any;
148
+ clearValidate: (props?: string | string[]) => any;
149
+ scrollToField: (prop: string) => any;
150
+ getField: (prop: string) => any;
151
+ fields: any;
152
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
153
+ elForm: any;
140
154
  } & {} & import('vue').ComponentCustomProperties & {} & {
141
155
  $slots: Partial<Record<string, (_: {
142
156
  model: Record<string, any>;
@@ -192,8 +206,15 @@ declare function __VLS_template(): {
192
206
  items: import('../..').FormItem[];
193
207
  model?: Record<string, any>;
194
208
  }> & Readonly<{}>, {
195
- validate: () => Promise<void>;
196
- validateField: (name: string) => Promise<void>;
209
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
210
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
211
+ resetFields: (props?: string | string[]) => any;
212
+ clearValidate: (props?: string | string[]) => any;
213
+ scrollToField: (prop: string) => any;
214
+ getField: (prop: string) => any;
215
+ fields: any;
216
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
217
+ elForm: any;
197
218
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
198
219
  items: import('../..').FormItem[];
199
220
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -221,9 +242,16 @@ declare function __VLS_template(): {
221
242
  }> & Omit<Readonly<{
222
243
  items: import('../..').FormItem[];
223
244
  model?: Record<string, any>;
224
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
225
- validate: () => Promise<void>;
226
- validateField: (name: string) => Promise<void>;
245
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
246
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
247
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
248
+ resetFields: (props?: string | string[]) => any;
249
+ clearValidate: (props?: string | string[]) => any;
250
+ scrollToField: (prop: string) => any;
251
+ getField: (prop: string) => any;
252
+ fields: any;
253
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
254
+ elForm: any;
227
255
  } & {} & import('vue').ComponentCustomProperties & {} & {
228
256
  $slots: Partial<Record<string, (_: {
229
257
  model: Record<string, any>;
@@ -261,7 +289,7 @@ declare function __VLS_template(): {
261
289
  $root: import('vue').ComponentPublicInstance | null;
262
290
  $parent: import('vue').ComponentPublicInstance | null;
263
291
  $host: Element | null;
264
- $emit: ((event: "search", params: Record<string, any>) => void) & ((event: "reset") => void);
292
+ $emit: ((event: "reset") => void) & ((event: "search", params: Record<string, any>) => void);
265
293
  $el: HTMLDivElement;
266
294
  $options: import('vue').ComponentOptionsBase<Readonly<{
267
295
  items?: SearchItem[];
@@ -271,18 +299,18 @@ declare function __VLS_template(): {
271
299
  labelsVisible?: boolean;
272
300
  showLabels?: boolean;
273
301
  }> & Readonly<{
274
- onSearch?: ((params: Record<string, any>) => any) | undefined;
275
302
  onReset?: (() => any) | undefined;
303
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
276
304
  }>, {
277
305
  params: import('vue').ComputedRef<Record<string, any>>;
278
306
  search: () => Promise<void>;
279
307
  reset: () => Promise<void>;
280
308
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
281
- search: (params: Record<string, any>) => any;
282
309
  reset: () => any;
310
+ search: (params: Record<string, any>) => any;
283
311
  }, string, {
284
- immediate: boolean;
285
312
  disabled: boolean;
313
+ immediate: boolean;
286
314
  items: SearchItem[];
287
315
  labelsVisible: boolean;
288
316
  showLabels: boolean;
@@ -307,8 +335,8 @@ declare function __VLS_template(): {
307
335
  $nextTick: typeof import('vue').nextTick;
308
336
  $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;
309
337
  } & Readonly<{
310
- immediate: boolean;
311
338
  disabled: boolean;
339
+ immediate: boolean;
312
340
  items: SearchItem[];
313
341
  labelsVisible: boolean;
314
342
  showLabels: boolean;
@@ -320,9 +348,9 @@ declare function __VLS_template(): {
320
348
  labelsVisible?: boolean;
321
349
  showLabels?: boolean;
322
350
  }> & Readonly<{
323
- onSearch?: ((params: Record<string, any>) => any) | undefined;
324
351
  onReset?: (() => any) | undefined;
325
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
352
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
353
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
326
354
  params: Record<string, any>;
327
355
  search: () => Promise<void>;
328
356
  reset: () => Promise<void>;
@@ -360,7 +388,9 @@ declare function __VLS_template(): {
360
388
  };
361
389
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
362
390
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
391
+ /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
363
392
  refresh: () => void;
393
+ /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`),未请求过时为 `undefined` */
364
394
  params: import('vue').ComputedRef<unknown>;
365
395
  /** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
366
396
  search: typeof search;
@@ -384,8 +414,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
384
414
  readonly disabled?: boolean | undefined;
385
415
  readonly labelsVisible?: boolean | undefined;
386
416
  readonly showLabels?: boolean | undefined;
387
- readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
388
417
  readonly onReset?: (() => any) | undefined;
418
+ readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
389
419
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
390
420
  $attrs: import('vue').Attrs;
391
421
  $refs: {
@@ -416,8 +446,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
416
446
  items: import('../..').FormItem[];
417
447
  model?: Record<string, any>;
418
448
  }> & Readonly<{}>, {
419
- validate: () => Promise<void>;
420
- validateField: (name: string) => Promise<void>;
449
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
450
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
451
+ resetFields: (props?: string | string[]) => any;
452
+ clearValidate: (props?: string | string[]) => any;
453
+ scrollToField: (prop: string) => any;
454
+ getField: (prop: string) => any;
455
+ fields: any;
456
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
457
+ elForm: any;
421
458
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
422
459
  items: import('../..').FormItem[];
423
460
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -445,9 +482,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
445
482
  }> & Omit<Readonly<{
446
483
  items: import('../..').FormItem[];
447
484
  model?: Record<string, any>;
448
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
449
- validate: () => Promise<void>;
450
- validateField: (name: string) => Promise<void>;
485
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
486
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
487
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
488
+ resetFields: (props?: string | string[]) => any;
489
+ clearValidate: (props?: string | string[]) => any;
490
+ scrollToField: (prop: string) => any;
491
+ getField: (prop: string) => any;
492
+ fields: any;
493
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
494
+ elForm: any;
451
495
  } & {} & import('vue').ComponentCustomProperties & {} & {
452
496
  $slots: Partial<Record<string, (_: {
453
497
  model: Record<string, any>;
@@ -503,8 +547,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
503
547
  items: import('../..').FormItem[];
504
548
  model?: Record<string, any>;
505
549
  }> & Readonly<{}>, {
506
- validate: () => Promise<void>;
507
- validateField: (name: string) => Promise<void>;
550
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
551
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
552
+ resetFields: (props?: string | string[]) => any;
553
+ clearValidate: (props?: string | string[]) => any;
554
+ scrollToField: (prop: string) => any;
555
+ getField: (prop: string) => any;
556
+ fields: any;
557
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
558
+ elForm: any;
508
559
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
509
560
  items: import('../..').FormItem[];
510
561
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -532,9 +583,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
532
583
  }> & Omit<Readonly<{
533
584
  items: import('../..').FormItem[];
534
585
  model?: Record<string, any>;
535
- }> & Readonly<{}>, "items" | "validate" | "validateField"> & {
536
- validate: () => Promise<void>;
537
- validateField: (name: string) => Promise<void>;
586
+ }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
587
+ validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
588
+ validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
589
+ resetFields: (props?: string | string[]) => any;
590
+ clearValidate: (props?: string | string[]) => any;
591
+ scrollToField: (prop: string) => any;
592
+ getField: (prop: string) => any;
593
+ fields: any;
594
+ setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
595
+ elForm: any;
538
596
  } & {} & import('vue').ComponentCustomProperties & {} & {
539
597
  $slots: Partial<Record<string, (_: {
540
598
  model: Record<string, any>;
@@ -572,7 +630,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
572
630
  $root: import('vue').ComponentPublicInstance | null;
573
631
  $parent: import('vue').ComponentPublicInstance | null;
574
632
  $host: Element | null;
575
- $emit: ((event: "search", params: Record<string, any>) => void) & ((event: "reset") => void);
633
+ $emit: ((event: "reset") => void) & ((event: "search", params: Record<string, any>) => void);
576
634
  $el: HTMLDivElement;
577
635
  $options: import('vue').ComponentOptionsBase<Readonly<{
578
636
  items?: SearchItem[];
@@ -582,18 +640,18 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
582
640
  labelsVisible?: boolean;
583
641
  showLabels?: boolean;
584
642
  }> & Readonly<{
585
- onSearch?: ((params: Record<string, any>) => any) | undefined;
586
643
  onReset?: (() => any) | undefined;
644
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
587
645
  }>, {
588
646
  params: import('vue').ComputedRef<Record<string, any>>;
589
647
  search: () => Promise<void>;
590
648
  reset: () => Promise<void>;
591
649
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
592
- search: (params: Record<string, any>) => any;
593
650
  reset: () => any;
651
+ search: (params: Record<string, any>) => any;
594
652
  }, string, {
595
- immediate: boolean;
596
653
  disabled: boolean;
654
+ immediate: boolean;
597
655
  items: SearchItem[];
598
656
  labelsVisible: boolean;
599
657
  showLabels: boolean;
@@ -618,8 +676,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
618
676
  $nextTick: typeof import('vue').nextTick;
619
677
  $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;
620
678
  } & Readonly<{
621
- immediate: boolean;
622
679
  disabled: boolean;
680
+ immediate: boolean;
623
681
  items: SearchItem[];
624
682
  labelsVisible: boolean;
625
683
  showLabels: boolean;
@@ -631,9 +689,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
631
689
  labelsVisible?: boolean;
632
690
  showLabels?: boolean;
633
691
  }> & Readonly<{
634
- onSearch?: ((params: Record<string, any>) => any) | undefined;
635
692
  onReset?: (() => any) | undefined;
636
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
693
+ onSearch?: ((params: Record<string, any>) => any) | undefined;
694
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
637
695
  params: Record<string, any>;
638
696
  search: () => Promise<void>;
639
697
  reset: () => Promise<void>;
@@ -79,7 +79,9 @@ const ae = { class: "zl-card-page__content" }, re = { class: "zl-card-page__list
79
79
  },
80
80
  { immediate: !0, once: !0 }
81
81
  ), R({
82
+ /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
82
83
  refresh: A,
84
+ /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`),未请求过时为 `undefined` */
83
85
  params: W,
84
86
  /** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
85
87
  search: l
@@ -6,6 +6,7 @@ type __VLS_Props = {
6
6
  };
7
7
  declare function clear(): void;
8
8
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
9
+ /** 清空图表内容(保留 echarts 实例,后续 `option` 变化仍可继续渲染) */
9
10
  clear: typeof clear;
10
11
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
11
12
  chartRef: HTMLDivElement;
@@ -43,6 +43,7 @@ const C = /* @__PURE__ */ v({
43
43
  }), w(() => {
44
44
  e.value?.dispose();
45
45
  }), u({
46
+ /** 清空图表内容(保留 echarts 实例,后续 `option` 变化仍可继续渲染) */
46
47
  clear: f
47
48
  }), (m, a) => (R(), y("div", {
48
49
  ref_key: "chartRef",
@@ -1 +1 @@
1
- .zl-check[data-v-9682d1a0]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.zl-check__all[data-v-9682d1a0]{margin-bottom:4px}.zl-check[data-v-9682d1a0] .el-checkbox:not(.zl-check__all){padding:5px;background:var(--zl-primary-1, var(--el-color-primary-light-9, #e8f3ff))}.zl-check[data-v-9682d1a0] .el-checkbox:not(.zl-check__all):hover{background:var(--zl-fill-3, #e3e9ef)}
1
+ .zl-check[data-v-3505c631]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.zl-check__all[data-v-3505c631]{margin-bottom:4px}.zl-check[data-v-3505c631] .el-checkbox:not(.zl-check__all){padding:5px;background:var(--zl-primary-1, var(--el-color-primary-light-9, #e8f3ff))}.zl-check[data-v-3505c631] .el-checkbox:not(.zl-check__all):hover{background:var(--zl-fill-3, #e3e9ef)}
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.vue.mjs";
2
2
  import './index.css';/* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9682d1a0"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3505c631"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,12 +1,20 @@
1
1
  import { DictItem } from '@zl-ui-kit/composables';
2
2
  type __VLS_Props = {
3
- /** 字典键(对应全局字典缓存的键;外部直传数据也以该键写入共享缓存) */
3
+ /**
4
+ * 字典键(对应全局字典缓存的键;外部直传数据也以该键写入共享缓存)。
5
+ * ⚠️ 直传 `dict` 会**覆盖全局同名 key**,不要在列表里逐行传不同的 `dict`(最后一行会污染全站),
6
+ * 行级字典请用独立 key(如 `` `resourceType.${row.id}` ``)。
7
+ */
4
8
  dictKey: string;
5
- /** 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 DictItem[]({ label, value, icon?, type? }) */
9
+ /** 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 `DictItem[]`(`{ label, value, icon?, color?, type? }`) */
6
10
  dict?: DictItem[];
7
11
  /** 是否渲染成角标并指定方位,true 时为右上角 */
8
12
  corner?: boolean | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
9
- /** 待翻译的字典值,匹配不到时原样展示 */
13
+ /**
14
+ * 待翻译的字典值,匹配不到时原样展示。
15
+ * 与字典项的 `value` 做**严格相等**比较,后端返回数字状态码时要先转成字符串
16
+ * (`:value="String(row.status)"`,或在字典数据源里归一)。
17
+ */
10
18
  value?: string;
11
19
  /** 忽略字典项自带的颜色,改用标签默认配色 */
12
20
  simple?: boolean;
@@ -1,10 +1,10 @@
1
- import { defineComponent as f, watch as y, computed as l, openBlock as n, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as p, toDisplayString as m } from "vue";
2
- import { useDict as g, useDictStore as h } from "@zl-ui-kit/composables";
3
- import B from "../ZlTag/ZlCornerTag.vue.mjs";
1
+ import { defineComponent as g, watch as _, computed as n, openBlock as l, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as p, toDisplayString as f } from "vue";
2
+ import { useDict as h, useDictStore as B } from "@zl-ui-kit/composables";
3
+ import S from "../ZlTag/ZlCornerTag.vue.mjs";
4
4
  import '../ZlTag/index.css';import '../ZlTag/ZlCornerTag.css';/* empty css */
5
- import _ from "../ZlTag/index.vue.mjs";
5
+ import b from "../ZlTag/index.vue.mjs";
6
6
  /* empty css */
7
- const K = /* @__PURE__ */ f({
7
+ const I = /* @__PURE__ */ g({
8
8
  name: "ZlDictTag",
9
9
  __name: "index",
10
10
  props: {
@@ -17,41 +17,50 @@ const K = /* @__PURE__ */ f({
17
17
  hideIcon: { type: Boolean, default: void 0 }
18
18
  },
19
19
  setup(i) {
20
- const e = i, v = g(e.dictKey, { data: e.dict });
21
- y(
22
- () => e.dict,
23
- (t) => {
24
- if (t?.length) {
25
- const { dictStore: a } = h();
26
- a.value = { ...a.value, [e.dictKey]: t };
20
+ const t = i, m = h(t.dictKey, { data: t.dict });
21
+ _(
22
+ () => t.dict,
23
+ (e) => {
24
+ if (e?.length) {
25
+ const { dictStore: o } = B();
26
+ o.value = { ...o.value, [t.dictKey]: e };
27
27
  }
28
28
  },
29
29
  { deep: !1 }
30
30
  );
31
- const o = l(() => v.value.find((t) => t.value === e.value)), r = l(() => o.value ? {
32
- color: e.simple ? void 0 : o.value.color,
33
- icon: e.iconVisible ?? !e.hideIcon ? o.value.icon : void 0
34
- } : {}), c = l(() => e.corner === !0 ? "top-right" : e.corner);
35
- return (t, a) => c.value ? (n(), s(B, u({
31
+ const r = n(() => m.value.find((e) => e.value === t.value)), v = { info: "gray" };
32
+ function y(e) {
33
+ const o = e.color ?? e.type;
34
+ if (o)
35
+ return v[o] ?? o;
36
+ }
37
+ const a = n(() => {
38
+ const e = r.value;
39
+ return e ? {
40
+ color: t.simple ? void 0 : y(e),
41
+ icon: t.iconVisible ?? !t.hideIcon ? e.icon : void 0
42
+ } : {};
43
+ }), c = n(() => t.corner === !0 ? "top-right" : t.corner);
44
+ return (e, o) => c.value ? (l(), s(S, u({
36
45
  key: 0,
37
46
  class: "zl-dict-corner-tag"
38
- }, { ...r.value, ...t.$attrs }, { position: c.value }), {
47
+ }, { ...a.value, ...e.$attrs }, { position: c.value }), {
39
48
  default: d(() => [
40
- p(m(o.value?.label || i.value), 1)
49
+ p(f(r.value?.label || i.value), 1)
41
50
  ]),
42
51
  _: 1
43
- }, 16, ["position"])) : (n(), s(_, u({
52
+ }, 16, ["position"])) : (l(), s(b, u({
44
53
  key: 1,
45
54
  class: "zl-dict-tag"
46
- }, { ...r.value, ...t.$attrs }), {
55
+ }, { ...a.value, ...e.$attrs }), {
47
56
  default: d(() => [
48
- p(m(o.value?.label || i.value), 1)
57
+ p(f(r.value?.label || i.value), 1)
49
58
  ]),
50
59
  _: 1
51
60
  }, 16));
52
61
  }
53
62
  });
54
63
  export {
55
- K as default
64
+ I as default
56
65
  };
57
66
  //# sourceMappingURL=index.vue.mjs.map
@@ -22,7 +22,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
22
22
  };
23
23
  }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
24
24
  [key: string]: any;
25
- }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("input" | "update:modelValue")[], "input" | "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
+ }> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ /** 子组件值变化时触发,参数为新值与其后透传的其余参数(在业务侧自行接管写入时用) */
27
+ input: (_value: any, ..._values: any[]) => true;
28
+ /** `v-model:modelValue` 更新;若 schema 里写了 `model`,会同步写回 `model[model]` */
29
+ 'update:modelValue': (_value: any) => true;
30
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
26
31
  /** 共享的数据对象,子组件按 model 字段读写值 */
27
32
  model: {
28
33
  type: ObjectConstructor;
@@ -41,8 +46,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
41
46
  };
42
47
  };
43
48
  }>> & Readonly<{
44
- onInput?: ((...args: any[]) => any) | undefined;
45
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
49
+ onInput?: ((_value: any, ..._values: any[]) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((_value: any) => any) | undefined;
46
51
  }>, {
47
52
  component: Record<string, any>;
48
53
  model: Record<string, any>;
@@ -1,5 +1,5 @@
1
- import { defineComponent as O, h as c, resolveComponent as a } from "vue";
2
- const j = O({
1
+ import { defineComponent as b, h as c, resolveComponent as u } from "vue";
2
+ const h = b({
3
3
  name: "ZlDynamicComponent",
4
4
  props: {
5
5
  /** 共享的数据对象,子组件按 model 字段读写值 */
@@ -18,18 +18,23 @@ const j = O({
18
18
  default: () => ({ component: "el-input" })
19
19
  }
20
20
  },
21
- emits: ["update:modelValue", "input"],
22
- setup(o, { emit: p }) {
23
- const u = (e) => {
21
+ emits: {
22
+ /** 子组件值变化时触发,参数为新值与其后透传的其余参数(在业务侧自行接管写入时用) */
23
+ input: (o, ...a) => !0,
24
+ /** `v-model:modelValue` 更新;若 schema 里写了 `model`,会同步写回 `model[model]` */
25
+ "update:modelValue": (o) => !0
26
+ },
27
+ setup(o, { emit: a }) {
28
+ const s = (e) => {
24
29
  let n = !!e.model;
25
30
  return !n && e.slots && (n = e.slots.some((t) => t.model)), n && !o.model ? (console.warn("[ZlDynamicComponent] 在模型组件中,'model' 是必须的"), !0) : !1;
26
31
  }, i = (e, ...n) => {
27
32
  const { model: t, on: l = {} } = o.component;
28
- p("input", e, ...n), p("update:modelValue", e), l["update:modelValue"]?.(e, ...n), t && o.model && (o.model[t] = e);
33
+ a("input", e, ...n), a("update:modelValue", e), l["update:modelValue"]?.(e, ...n), t && o.model && (o.model[t] = e);
29
34
  }, f = (e) => {
30
35
  const { data: n, component: t, name: l } = e;
31
36
  return Array.isArray(n) ? n.map(
32
- (m) => c(a("ZlDynamicComponent"), {
37
+ (m) => c(u("ZlDynamicComponent"), {
33
38
  model: o.model,
34
39
  component: {
35
40
  component: t,
@@ -40,13 +45,13 @@ const j = O({
40
45
  ) : (console.warn(`[ZlDynamicComponent] 在 VFor 组件中,'data' 必须是数组,当前类型为 '${typeof n}'`), null);
41
46
  }, y = (e = []) => e.flatMap((n) => {
42
47
  const { type: t, component: l, name: m, ...r } = n;
43
- return t === "vFor" ? f(n) : c(a("ZlDynamicComponent"), {
48
+ return t === "vFor" ? f(n) : c(u("ZlDynamicComponent"), {
44
49
  model: o.model,
45
50
  component: { component: l, ...r },
46
51
  slot: m
47
52
  });
48
- }), C = (e) => typeof e == "string" ? a(e) : e, V = () => {
49
- if (u(o.component)) return null;
53
+ }), C = (e) => typeof e == "string" ? u(e) : e, V = () => {
54
+ if (s(o.component)) return null;
50
55
  const {
51
56
  type: e,
52
57
  model: n,
@@ -54,21 +59,21 @@ const j = O({
54
59
  slots: l,
55
60
  props: m = {},
56
61
  on: r = {},
57
- ...D
58
- } = o.component, Z = C(t), b = {
62
+ ...v
63
+ } = o.component, D = C(t), Z = {
59
64
  ...m,
60
65
  ...n ? { modelValue: o.model[n] } : {},
61
66
  ...e === "vModel" ? { modelValue: o.value } : {}
62
- }, v = {
63
- ...Object.keys(r).reduce((s, d) => (s[`on${d[0].toUpperCase()}${d.slice(1)}`] = r[d], s), {}),
67
+ }, _ = {
68
+ ...Object.keys(r).reduce((p, d) => (p[`on${d[0].toUpperCase()}${d.slice(1)}`] = r[d], p), {}),
64
69
  "onUpdate:modelValue": i
65
70
  };
66
71
  return c(
67
- Z,
72
+ D,
68
73
  {
69
- ...D,
70
- ...b,
71
- ...v
74
+ ...v,
75
+ ...Z,
76
+ ..._
72
77
  },
73
78
  () => y(l)
74
79
  );
@@ -77,6 +82,6 @@ const j = O({
77
82
  }
78
83
  });
79
84
  export {
80
- j as default
85
+ h as default
81
86
  };
82
87
  //# sourceMappingURL=index.vue.mjs.map