@zl-ui-kit/components 0.26.1 → 0.27.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 (112) hide show
  1. package/README.md +22 -18
  2. package/dist/components/ZlAction/List.vue.mjs +46 -49
  3. package/dist/components/ZlAction/index.vue.d.ts +1 -7
  4. package/dist/components/ZlAction/index.vue.mjs +8 -12
  5. package/dist/components/ZlAction/types.d.ts +2 -5
  6. package/dist/components/ZlAppLayout/Horizontal.css +1 -1
  7. package/dist/components/ZlAppLayout/Vertical.css +1 -1
  8. package/dist/components/ZlAppLayout/Vertical2.vue.mjs +41 -39
  9. package/dist/components/ZlAppLayout/index.vue.d.ts +6 -6
  10. package/dist/components/ZlAppLayout/index.vue.mjs +8 -8
  11. package/dist/components/ZlAppMenu/AppMenu.css +1 -0
  12. package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +27 -0
  13. package/dist/components/ZlAppMenu/AppMenu.vue.mjs +37 -0
  14. package/dist/components/ZlAppMenu/AppMenu3.vue.mjs +6 -0
  15. package/dist/components/ZlAppMenu/AppMenuItem.vue.d.ts +11 -0
  16. package/dist/components/ZlAppMenu/AppMenuItem.vue.mjs +58 -0
  17. package/dist/components/ZlAppMenu/AppMenuItem2.vue.mjs +5 -0
  18. package/dist/components/ZlAppSlogan/index.css +1 -1
  19. package/dist/components/ZlAppSlogan/index.vue.d.ts +1 -1
  20. package/dist/components/ZlAppSlogan/index.vue.mjs +12 -19
  21. package/dist/components/ZlCardPage/index.vue.d.ts +3 -41
  22. package/dist/components/ZlCardPage/index.vue.mjs +68 -68
  23. package/dist/components/ZlCheckboxTag/index.css +1 -1
  24. package/dist/components/ZlCheckboxTag/index.vue.d.ts +4 -4
  25. package/dist/components/ZlCheckboxTag/index.vue.mjs +30 -34
  26. package/dist/components/ZlCopy/copy.mjs +7 -17
  27. package/dist/components/ZlCopy/index.css +1 -1
  28. package/dist/components/ZlCopy/index.vue.mjs +2 -2
  29. package/dist/components/ZlCopy/index2.vue.mjs +36 -34
  30. package/dist/components/ZlDescription/index.css +1 -1
  31. package/dist/components/ZlDescription/index.vue.mjs +24 -28
  32. package/dist/components/ZlDialog/index.css +1 -1
  33. package/dist/components/ZlDialog/index.vue.d.ts +0 -3
  34. package/dist/components/ZlDialog/index.vue.mjs +35 -39
  35. package/dist/components/ZlDictTag/index.vue.d.ts +3 -12
  36. package/dist/components/ZlDictTag/index.vue.mjs +26 -31
  37. package/dist/components/ZlDrawer/index.css +1 -1
  38. package/dist/components/ZlDrawer/index.vue.d.ts +0 -3
  39. package/dist/components/ZlDrawer/index.vue.mjs +32 -36
  40. package/dist/components/ZlDynamicComponent/index.vue.d.ts +3 -5
  41. package/dist/components/ZlForm/index.css +1 -1
  42. package/dist/components/ZlForm/index.vue.d.ts +0 -7
  43. package/dist/components/ZlForm/index.vue.mjs +47 -50
  44. package/dist/components/ZlLayoutSwitch/index.css +1 -1
  45. package/dist/components/ZlLayoutSwitch/index.vue.d.ts +0 -10
  46. package/dist/components/ZlLayoutSwitch/index.vue.mjs +1 -1
  47. package/dist/components/ZlLayoutSwitch/index2.vue.mjs +19 -27
  48. package/dist/components/ZlLogin/components/LoginForm.css +1 -1
  49. package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
  50. package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +25 -26
  51. package/dist/components/ZlPageContainer/index.css +1 -1
  52. package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
  53. package/dist/components/ZlPagination/index.css +1 -1
  54. package/dist/components/ZlPagination/index.vue.d.ts +1 -21
  55. package/dist/components/ZlPagination/index.vue.mjs +1 -1
  56. package/dist/components/ZlPagination/index2.vue.mjs +33 -59
  57. package/dist/components/ZlPagination/usePagination.d.ts +0 -1
  58. package/dist/components/ZlPagination/usePagination.mjs +34 -51
  59. package/dist/components/ZlPopconfirm/index.vue.mjs +24 -25
  60. package/dist/components/ZlSearch/index.vue.d.ts +0 -25
  61. package/dist/components/ZlSearch/index.vue.mjs +205 -202
  62. package/dist/components/ZlSearchTable/index.vue.d.ts +2 -40
  63. package/dist/components/ZlSearchTable/index.vue.mjs +55 -59
  64. package/dist/components/ZlTable/useTablePagination.d.ts +0 -1
  65. package/dist/components/ZlTable/useTablePagination.mjs +23 -37
  66. package/dist/components/ZlTabs/index.vue.d.ts +3 -16
  67. package/dist/components/ZlTag/ZlCornerTag.css +1 -1
  68. package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +1 -14
  69. package/dist/components/ZlTag/ZlCornerTag.vue.mjs +14 -25
  70. package/dist/components/ZlTag/index.vue.mjs +4 -4
  71. package/dist/components/ZlUpload/index.css +1 -1
  72. package/dist/components/ZlUpload/index.vue.d.ts +3 -44
  73. package/dist/components/ZlUpload/index.vue.mjs +3 -3
  74. package/dist/components/ZlUpload/index2.vue.mjs +79 -119
  75. package/dist/index.d.ts +2 -8
  76. package/dist/index.mjs +169 -183
  77. package/dist/locales/en.mjs +2 -2
  78. package/dist/locales/zh-cn.mjs +3 -3
  79. package/package.json +6 -6
  80. package/dist/components/ZlAppLayout/HeaderAside.css +0 -1
  81. package/dist/components/ZlAppLayout/HeaderAside.vue.d.ts +0 -25
  82. package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +0 -6
  83. package/dist/components/ZlAppLayout/HeaderAside2.vue.mjs +0 -65
  84. package/dist/components/ZlBreadcrumb/index.css +0 -1
  85. package/dist/components/ZlBreadcrumb/index.vue.d.ts +0 -32
  86. package/dist/components/ZlBreadcrumb/index.vue.mjs +0 -58
  87. package/dist/components/ZlBreadcrumb/index3.vue.mjs +0 -6
  88. package/dist/components/ZlBreadcrumb/types.d.ts +0 -16
  89. package/dist/components/ZlButton/index.vue.d.ts +0 -81
  90. package/dist/components/ZlButton/index.vue.mjs +0 -60
  91. package/dist/components/ZlButton/index2.vue.mjs +0 -5
  92. package/dist/components/ZlCardPage/resolvePagination.d.ts +0 -20
  93. package/dist/components/ZlCardPage/resolvePagination.mjs +0 -24
  94. package/dist/components/ZlDevMenu/index.css +0 -1
  95. package/dist/components/ZlDevMenu/index.vue.d.ts +0 -33
  96. package/dist/components/ZlDevMenu/index.vue.mjs +0 -110
  97. package/dist/components/ZlDevMenu/index3.vue.mjs +0 -6
  98. package/dist/components/ZlDevMenu/types.d.ts +0 -8
  99. package/dist/components/ZlLoading/index.css +0 -1
  100. package/dist/components/ZlLoading/index.vue.d.ts +0 -27
  101. package/dist/components/ZlLoading/index.vue.mjs +0 -8
  102. package/dist/components/ZlLoading/index2.vue.mjs +0 -30
  103. package/dist/components/ZlMenu/MenuIcon.d.ts +0 -17
  104. package/dist/components/ZlMenu/MenuIcon.mjs +0 -21
  105. package/dist/components/ZlMenu/ZlMenuItem.vue.d.ts +0 -7
  106. package/dist/components/ZlMenu/ZlMenuItem.vue.mjs +0 -53
  107. package/dist/components/ZlMenu/ZlMenuItem2.vue.mjs +0 -5
  108. package/dist/components/ZlMenu/index.css +0 -1
  109. package/dist/components/ZlMenu/index.vue.d.ts +0 -40
  110. package/dist/components/ZlMenu/index.vue.mjs +0 -60
  111. package/dist/components/ZlMenu/index3.vue.mjs +0 -6
  112. package/dist/components/ZlMenu/types.d.ts +0 -20
@@ -1 +1 @@
1
- @charset "UTF-8";.zl-app-slogan{width:100%;overflow:hidden;display:flex;align-items:center;gap:6px}.zl-app-slogan__logo{width:24px;aspect-ratio:1;object-fit:cover}.zl-app-slogan__logo--default{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background-color:var(--zl-primary-6, var(--el-color-primary));color:#fff;font-size:14px}.zl-app-slogan__text{white-space:nowrap;font-family:"PingFang TC",var(--zl-slogan-font-family, "PingFang SC", "Microsoft YaHei", sans-serif);color:var(--zl-slogan-color, var(--zl-primary-6, var(--el-color-primary)));font-size:20px;font-weight:500;letter-spacing:1px;line-height:24px}
1
+ @charset "UTF-8";.zl-app-slogan{width:100%;overflow:hidden;display:flex;align-items:center;gap:6px}.zl-app-slogan__logo{width:24px;aspect-ratio:1;object-fit:cover}.zl-app-slogan__text{white-space:nowrap;font-family:var(--zl-slogan-font-family, "PingFang SC", "Microsoft YaHei", sans-serif);color:var(--zl-menu-text-color, var(--zl-text-2));font-size:16px;font-weight:400;letter-spacing:1.6px;line-height:24px}
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  /** 为 true 时只显示 Logo,隐藏标题 */
3
3
  collapsed?: boolean;
4
- /** 品牌 Logo 的图片地址;不传时渲染内置默认 Logo 图标 */
4
+ /** 品牌 Logo 的图片地址 */
5
5
  logo?: string;
6
6
  /** 应用标题文案,折叠时隐藏 */
7
7
  title?: string;
@@ -1,9 +1,5 @@
1
- import { defineComponent as a, openBlock as e, createElementBlock as l, createVNode as t, Transition as n, withCtx as s, withDirectives as c, createElementVNode as i, toDisplayString as p, vShow as r } from "vue";
2
- import d from "../ZlIcon/index.vue.mjs";
3
- const _ = { class: "zl-app-slogan" }, g = ["src"], m = {
4
- key: 1,
5
- class: "zl-app-slogan__logo zl-app-slogan__logo--default"
6
- }, x = /* @__PURE__ */ a({
1
+ import { defineComponent as o, openBlock as l, createElementBlock as a, createElementVNode as t, createVNode as s, Transition as n, withCtx as c, withDirectives as i, toDisplayString as p, vShow as r } from "vue";
2
+ const d = { class: "zl-app-slogan" }, _ = ["src"], u = /* @__PURE__ */ o({
7
3
  name: "ZlAppSlogan",
8
4
  __name: "index",
9
5
  props: {
@@ -11,19 +7,16 @@ const _ = { class: "zl-app-slogan" }, g = ["src"], m = {
11
7
  logo: {},
12
8
  title: {}
13
9
  },
14
- setup(o) {
15
- return (f, h) => (e(), l("div", _, [
16
- o.logo ? (e(), l("img", {
17
- key: 0,
10
+ setup(e) {
11
+ return (g, m) => (l(), a("div", d, [
12
+ t("img", {
18
13
  class: "zl-app-slogan__logo",
19
- src: o.logo
20
- }, null, 8, g)) : (e(), l("span", m, [
21
- t(d, { icon: "zl:component" })
22
- ])),
23
- t(n, { persisted: "" }, {
24
- default: s(() => [
25
- c(i("div", { class: "zl-app-slogan__text" }, p(o.title), 513), [
26
- [r, !o.collapsed]
14
+ src: e.logo
15
+ }, null, 8, _),
16
+ s(n, { persisted: "" }, {
17
+ default: c(() => [
18
+ i(t("div", { class: "zl-app-slogan__text" }, p(e.title), 513), [
19
+ [r, !e.collapsed]
27
20
  ])
28
21
  ]),
29
22
  _: 1
@@ -32,6 +25,6 @@ const _ = { class: "zl-app-slogan" }, g = ["src"], m = {
32
25
  }
33
26
  });
34
27
  export {
35
- x as default
28
+ u as default
36
29
  };
37
30
  //# sourceMappingURL=index.vue.mjs.map
@@ -30,8 +30,6 @@ type __VLS_Props = {
30
30
  } | UseRequestInstance;
31
31
  /** 搜索表单项配置,为空则不渲染搜索栏 */
32
32
  queryItems?: SearchItem[];
33
- /** 搜索项 label 为空时是否不渲染 label 占位,透传给 ZlSearch / ZlForm 的 hideEmptyLabel */
34
- hideEmptyLabel?: boolean;
35
33
  /** 分页配置,false 关闭分页,对象则透传 */
36
34
  pagination?: Record<string, any> | boolean;
37
35
  /** 卡片数据的唯一键字段名,默认 id */
@@ -56,7 +54,6 @@ declare function __VLS_template(): {
56
54
  slot?: boolean;
57
55
  slots?: Record<string, any>;
58
56
  props: Record<string, any>;
59
- hideLabel?: boolean;
60
57
  };
61
58
  }) => any>> & {
62
59
  'search-actions'?(_: {}): any;
@@ -75,7 +72,6 @@ declare function __VLS_template(): {
75
72
  readonly immediate?: boolean | undefined;
76
73
  readonly disabled?: boolean | undefined;
77
74
  readonly labelsVisible?: boolean | undefined;
78
- readonly hideEmptyLabel?: boolean | undefined;
79
75
  readonly showLabels?: boolean | undefined;
80
76
  readonly onReset?: (() => any) | undefined;
81
77
  readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
@@ -90,7 +86,6 @@ declare function __VLS_template(): {
90
86
  $props: {
91
87
  readonly items: import('../..').FormItem[];
92
88
  readonly model?: Record<string, any> | undefined;
93
- readonly hideEmptyLabel?: boolean | undefined;
94
89
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
95
90
  $attrs: import('vue').Attrs;
96
91
  $refs: {
@@ -109,7 +104,6 @@ declare function __VLS_template(): {
109
104
  $options: import('vue').ComponentOptionsBase<Readonly<{
110
105
  items: import('../..').FormItem[];
111
106
  model?: Record<string, any>;
112
- hideEmptyLabel?: boolean;
113
107
  }> & Readonly<{}>, {
114
108
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
115
109
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -147,7 +141,6 @@ declare function __VLS_template(): {
147
141
  }> & Omit<Readonly<{
148
142
  items: import('../..').FormItem[];
149
143
  model?: Record<string, any>;
150
- hideEmptyLabel?: boolean;
151
144
  }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
152
145
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
153
146
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -170,7 +163,6 @@ declare function __VLS_template(): {
170
163
  slot?: boolean;
171
164
  slots?: Record<string, any>;
172
165
  props: Record<string, any>;
173
- hideLabel?: boolean;
174
166
  };
175
167
  }) => any>> & {
176
168
  label?(_: {
@@ -184,7 +176,6 @@ declare function __VLS_template(): {
184
176
  slot?: boolean;
185
177
  slots?: Record<string, any>;
186
178
  props: Record<string, any>;
187
- hideLabel?: boolean;
188
179
  };
189
180
  }): any;
190
181
  default?(_: {}): any;
@@ -196,7 +187,6 @@ declare function __VLS_template(): {
196
187
  $props: {
197
188
  readonly items: import('../..').FormItem[];
198
189
  readonly model?: Record<string, any> | undefined;
199
- readonly hideEmptyLabel?: boolean | undefined;
200
190
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
201
191
  $attrs: import('vue').Attrs;
202
192
  $refs: {
@@ -215,7 +205,6 @@ declare function __VLS_template(): {
215
205
  $options: import('vue').ComponentOptionsBase<Readonly<{
216
206
  items: import('../..').FormItem[];
217
207
  model?: Record<string, any>;
218
- hideEmptyLabel?: boolean;
219
208
  }> & Readonly<{}>, {
220
209
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
221
210
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -253,7 +242,6 @@ declare function __VLS_template(): {
253
242
  }> & Omit<Readonly<{
254
243
  items: import('../..').FormItem[];
255
244
  model?: Record<string, any>;
256
- hideEmptyLabel?: boolean;
257
245
  }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
258
246
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
259
247
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -276,7 +264,6 @@ declare function __VLS_template(): {
276
264
  slot?: boolean;
277
265
  slots?: Record<string, any>;
278
266
  props: Record<string, any>;
279
- hideLabel?: boolean;
280
267
  };
281
268
  }) => any>> & {
282
269
  label?(_: {
@@ -290,7 +277,6 @@ declare function __VLS_template(): {
290
277
  slot?: boolean;
291
278
  slots?: Record<string, any>;
292
279
  props: Record<string, any>;
293
- hideLabel?: boolean;
294
280
  };
295
281
  }): any;
296
282
  default?(_: {}): any;
@@ -311,7 +297,6 @@ declare function __VLS_template(): {
311
297
  immediate?: boolean;
312
298
  disabled?: boolean;
313
299
  labelsVisible?: boolean;
314
- hideEmptyLabel?: boolean;
315
300
  showLabels?: boolean;
316
301
  }> & Readonly<{
317
302
  onReset?: (() => any) | undefined;
@@ -327,7 +312,6 @@ declare function __VLS_template(): {
327
312
  disabled: boolean;
328
313
  immediate: boolean;
329
314
  items: SearchItem[];
330
- hideEmptyLabel: boolean;
331
315
  labelsVisible: boolean;
332
316
  showLabels: boolean;
333
317
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -354,7 +338,6 @@ declare function __VLS_template(): {
354
338
  disabled: boolean;
355
339
  immediate: boolean;
356
340
  items: SearchItem[];
357
- hideEmptyLabel: boolean;
358
341
  labelsVisible: boolean;
359
342
  showLabels: boolean;
360
343
  }> & Omit<Readonly<{
@@ -363,12 +346,11 @@ declare function __VLS_template(): {
363
346
  immediate?: boolean;
364
347
  disabled?: boolean;
365
348
  labelsVisible?: boolean;
366
- hideEmptyLabel?: boolean;
367
349
  showLabels?: boolean;
368
350
  }> & Readonly<{
369
351
  onReset?: (() => any) | undefined;
370
352
  onSearch?: ((params: Record<string, any>) => any) | undefined;
371
- }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "hideEmptyLabel" | "labelsVisible" | "showLabels")> & {
353
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
372
354
  params: Record<string, any>;
373
355
  search: () => Promise<void>;
374
356
  reset: () => Promise<void>;
@@ -384,7 +366,6 @@ declare function __VLS_template(): {
384
366
  slot?: boolean;
385
367
  slots?: Record<string, any>;
386
368
  props: Record<string, any>;
387
- hideLabel?: boolean;
388
369
  };
389
370
  }) => any>> & Partial<Record<string, (_: {
390
371
  model: Record<string, any>;
@@ -397,7 +378,6 @@ declare function __VLS_template(): {
397
378
  slot?: boolean;
398
379
  slots?: Record<string, any>;
399
380
  props: Record<string, any>;
400
- hideLabel?: boolean;
401
381
  };
402
382
  }) => any>> & {
403
383
  actions?(_: {}): any;
@@ -420,9 +400,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
420
400
  "onSearch-reset"?: (() => any) | undefined;
421
401
  }>, {
422
402
  immediate: boolean;
423
- hideEmptyLabel: boolean;
424
- pagination: Record<string, any> | boolean;
425
403
  queryItems: SearchItem[];
404
+ pagination: Record<string, any> | boolean;
426
405
  itemKey: string;
427
406
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
428
407
  searchRef: ({
@@ -434,7 +413,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
434
413
  readonly immediate?: boolean | undefined;
435
414
  readonly disabled?: boolean | undefined;
436
415
  readonly labelsVisible?: boolean | undefined;
437
- readonly hideEmptyLabel?: boolean | undefined;
438
416
  readonly showLabels?: boolean | undefined;
439
417
  readonly onReset?: (() => any) | undefined;
440
418
  readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
@@ -449,7 +427,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
449
427
  $props: {
450
428
  readonly items: import('../..').FormItem[];
451
429
  readonly model?: Record<string, any> | undefined;
452
- readonly hideEmptyLabel?: boolean | undefined;
453
430
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
454
431
  $attrs: import('vue').Attrs;
455
432
  $refs: {
@@ -468,7 +445,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
468
445
  $options: import('vue').ComponentOptionsBase<Readonly<{
469
446
  items: import('../..').FormItem[];
470
447
  model?: Record<string, any>;
471
- hideEmptyLabel?: boolean;
472
448
  }> & Readonly<{}>, {
473
449
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
474
450
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -506,7 +482,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
506
482
  }> & Omit<Readonly<{
507
483
  items: import('../..').FormItem[];
508
484
  model?: Record<string, any>;
509
- hideEmptyLabel?: boolean;
510
485
  }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
511
486
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
512
487
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -529,7 +504,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
529
504
  slot?: boolean;
530
505
  slots?: Record<string, any>;
531
506
  props: Record<string, any>;
532
- hideLabel?: boolean;
533
507
  };
534
508
  }) => any>> & {
535
509
  label?(_: {
@@ -543,7 +517,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
543
517
  slot?: boolean;
544
518
  slots?: Record<string, any>;
545
519
  props: Record<string, any>;
546
- hideLabel?: boolean;
547
520
  };
548
521
  }): any;
549
522
  default?(_: {}): any;
@@ -555,7 +528,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
555
528
  $props: {
556
529
  readonly items: import('../..').FormItem[];
557
530
  readonly model?: Record<string, any> | undefined;
558
- readonly hideEmptyLabel?: boolean | undefined;
559
531
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
560
532
  $attrs: import('vue').Attrs;
561
533
  $refs: {
@@ -574,7 +546,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
574
546
  $options: import('vue').ComponentOptionsBase<Readonly<{
575
547
  items: import('../..').FormItem[];
576
548
  model?: Record<string, any>;
577
- hideEmptyLabel?: boolean;
578
549
  }> & Readonly<{}>, {
579
550
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
580
551
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -612,7 +583,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
612
583
  }> & Omit<Readonly<{
613
584
  items: import('../..').FormItem[];
614
585
  model?: Record<string, any>;
615
- hideEmptyLabel?: boolean;
616
586
  }> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
617
587
  validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
618
588
  validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
@@ -635,7 +605,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
635
605
  slot?: boolean;
636
606
  slots?: Record<string, any>;
637
607
  props: Record<string, any>;
638
- hideLabel?: boolean;
639
608
  };
640
609
  }) => any>> & {
641
610
  label?(_: {
@@ -649,7 +618,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
649
618
  slot?: boolean;
650
619
  slots?: Record<string, any>;
651
620
  props: Record<string, any>;
652
- hideLabel?: boolean;
653
621
  };
654
622
  }): any;
655
623
  default?(_: {}): any;
@@ -670,7 +638,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
670
638
  immediate?: boolean;
671
639
  disabled?: boolean;
672
640
  labelsVisible?: boolean;
673
- hideEmptyLabel?: boolean;
674
641
  showLabels?: boolean;
675
642
  }> & Readonly<{
676
643
  onReset?: (() => any) | undefined;
@@ -686,7 +653,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
686
653
  disabled: boolean;
687
654
  immediate: boolean;
688
655
  items: SearchItem[];
689
- hideEmptyLabel: boolean;
690
656
  labelsVisible: boolean;
691
657
  showLabels: boolean;
692
658
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
@@ -713,7 +679,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
713
679
  disabled: boolean;
714
680
  immediate: boolean;
715
681
  items: SearchItem[];
716
- hideEmptyLabel: boolean;
717
682
  labelsVisible: boolean;
718
683
  showLabels: boolean;
719
684
  }> & Omit<Readonly<{
@@ -722,12 +687,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
722
687
  immediate?: boolean;
723
688
  disabled?: boolean;
724
689
  labelsVisible?: boolean;
725
- hideEmptyLabel?: boolean;
726
690
  showLabels?: boolean;
727
691
  }> & Readonly<{
728
692
  onReset?: (() => any) | undefined;
729
693
  onSearch?: ((params: Record<string, any>) => any) | undefined;
730
- }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "hideEmptyLabel" | "labelsVisible" | "showLabels")> & {
694
+ }>, "reset" | "search" | "params" | ("disabled" | "immediate" | "items" | "labelsVisible" | "showLabels")> & {
731
695
  params: Record<string, any>;
732
696
  search: () => Promise<void>;
733
697
  reset: () => Promise<void>;
@@ -743,7 +707,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
743
707
  slot?: boolean;
744
708
  slots?: Record<string, any>;
745
709
  props: Record<string, any>;
746
- hideLabel?: boolean;
747
710
  };
748
711
  }) => any>> & Partial<Record<string, (_: {
749
712
  model: Record<string, any>;
@@ -756,7 +719,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
756
719
  slot?: boolean;
757
720
  slots?: Record<string, any>;
758
721
  props: Record<string, any>;
759
- hideLabel?: boolean;
760
722
  };
761
723
  }) => any>> & {
762
724
  actions?(_: {}): any;
@@ -1,28 +1,26 @@
1
- import { defineComponent as M, useSlots as V, ref as P, computed as o, watch as x, resolveDirective as F, withDirectives as G, openBlock as l, createElementBlock as b, normalizeStyle as H, createBlock as h, createSlots as J, withCtx as k, renderSlot as g, renderList as z, normalizeProps as Q, guardReactiveProps as T, createCommentVNode as q, createElementVNode as $, Fragment as U, mergeProps as D, unref as v } from "vue";
2
- import { usePageableRequest as X } from "@zl-ui-kit/composables";
3
- import { isArray as Y } from "@zl-ui-kit/utils";
4
- import _ from "../ZlEmpty/index.vue.mjs";
5
- import ee from "../ZlPagination/index.vue.mjs";
6
- import te from "../ZlSearch/index.vue.mjs";
1
+ import { defineComponent as M, useSlots as V, ref as _, computed as u, watch as x, resolveDirective as F, withDirectives as L, openBlock as m, createElementBlock as z, normalizeStyle as G, createBlock as g, createSlots as H, withCtx as P, renderSlot as v, renderList as k, normalizeProps as J, guardReactiveProps as Q, createCommentVNode as q, createElementVNode as $, Fragment as T, mergeProps as D, unref as h } from "vue";
2
+ import { usePageableRequest as U } from "@zl-ui-kit/composables";
3
+ import { isArray as b } from "@zl-ui-kit/utils";
4
+ import X from "../ZlEmpty/index.vue.mjs";
5
+ import Y from "../ZlPagination/index.vue.mjs";
6
+ import ee from "../ZlSearch/index.vue.mjs";
7
7
  import '../ZlSearch/index.css';/* empty css */
8
- import { usePagination as ae } from "../ZlPagination/usePagination.mjs";
9
- import { resolveCardPagePagination as se } from "./resolvePagination.mjs";
10
- const re = { class: "zl-card-page__content" }, ie = { class: "zl-card-page__list" }, B = "search-", he = /* @__PURE__ */ M({
8
+ import { usePagination as te } from "../ZlPagination/usePagination.mjs";
9
+ const ae = { class: "zl-card-page__content" }, se = { class: "zl-card-page__list" }, N = "search-", de = /* @__PURE__ */ M({
11
10
  name: "ZlCardPage",
12
11
  __name: "index",
13
12
  props: {
14
13
  immediate: { type: Boolean, default: !0 },
15
14
  request: {},
16
15
  queryItems: { default: () => [] },
17
- hideEmptyLabel: { type: Boolean, default: !1 },
18
16
  pagination: { type: [Object, Boolean], default: !0 },
19
17
  itemKey: { default: "id" },
20
18
  cardMinWidth: {}
21
19
  },
22
20
  emits: ["search-reset"],
23
- setup(s, { expose: C, emit: E }) {
24
- const c = s, N = E, R = V(), w = P(null), p = o(() => {
25
- const e = c.request;
21
+ setup(s, { expose: R, emit: w }) {
22
+ const n = s, B = w, C = V(), E = _(null), p = u(() => {
23
+ const e = n.request;
26
24
  if (e && typeof e == "object" && "run" in e && "data" in e && !("service" in e))
27
25
  return {
28
26
  instance: e,
@@ -32,110 +30,112 @@ const re = { class: "zl-card-page__content" }, ie = { class: "zl-card-page__list
32
30
  const t = { manual: !0, initialData: [] };
33
31
  if (typeof e == "function")
34
32
  return { instance: null, service: e, options: t };
35
- const { refreshDeps: d, refreshDepsAction: a, ...n } = e.options ?? {};
33
+ const { refreshDeps: r, refreshDepsAction: a, ...c } = e.options ?? {};
36
34
  return {
37
35
  instance: null,
38
36
  service: e.service,
39
37
  options: {
40
- ...n,
38
+ ...c,
41
39
  ...t,
42
- ...d ? { refreshDeps: d, refreshDepsAction: a ?? (() => i()) } : {}
40
+ ...r ? { refreshDeps: r, refreshDepsAction: a ?? (() => l()) } : {}
43
41
  }
44
42
  };
45
- }), r = X(p.value.service, p.value.options), I = p.value.instance ?? {
46
- loading: r.loading,
47
- data: r.data,
48
- run: r.run,
49
- params: r.params,
50
- refresh: r.refresh
51
- }, { loading: O, data: m, run: j, params: A, refresh: L } = I, W = o(() => A.value?.[0]), y = P({ pageNum: 1 }), Z = o(
52
- () => se({
53
- data: m.value,
54
- pagination: c.pagination,
55
- pageState: y.value
56
- })
57
- ), u = ae(() => Z.value ?? !1), S = o(
58
- () => Y(m.value) ? m.value : m.value?.rows ?? []
59
- ), K = o(() => {
43
+ }), o = U(p.value.service, p.value.options), I = p.value.instance ?? {
44
+ loading: o.loading,
45
+ data: o.data,
46
+ run: o.run,
47
+ params: o.params,
48
+ refresh: o.refresh
49
+ }, { loading: O, data: i, run: j, params: A, refresh: W } = I, y = u(() => A.value?.[0]), Z = u(() => {
50
+ if (b(i.value))
51
+ return n.pagination && { total: i.value.length, ...n.pagination };
52
+ {
53
+ const e = i.value ?? {}, t = y.value ?? {}, r = n.pagination;
54
+ return {
55
+ ...r,
56
+ pageNum: e.pageNum ?? t.pageNum ?? 1,
57
+ pageSize: e.pageSize ?? t.pageSize ?? r?.pageSize ?? 30,
58
+ total: e.total ?? 0
59
+ };
60
+ }
61
+ }), d = te(() => Z.value ?? !1), S = u(
62
+ () => b(i.value) ? i.value : i.value?.rows ?? []
63
+ ), K = u(() => {
60
64
  const e = [];
61
- return Object.keys(R).forEach((t) => {
62
- t.startsWith(B) && t !== "search-actions" && e.push(t.slice(B.length));
65
+ return Object.keys(C).forEach((t) => {
66
+ t.startsWith(N) && t !== "search-actions" && e.push(t.slice(N.length));
63
67
  }), e;
64
68
  });
65
69
  let f;
66
- function i(e, t = {
70
+ function l(e, t = {
67
71
  pageNum: 1,
68
- pageSize: u.value !== !1 ? u.value.pageSize : 30
72
+ pageSize: d.value !== !1 ? d.value.pageSize : 30
69
73
  }) {
70
74
  f = {
71
75
  ...f,
72
76
  ...e,
73
77
  ...t
74
- }, y.value = {
75
- pageNum: t?.pageNum ?? 1,
76
- pageSize: t?.pageSize
77
78
  }, j(f);
78
79
  }
79
80
  return x(
80
- () => c.immediate,
81
+ () => n.immediate,
81
82
  (e) => {
82
- e && !c.queryItems.length && i();
83
+ e && !n.queryItems.length && l();
83
84
  },
84
85
  { immediate: !0, once: !0 }
85
- ), C({
86
+ ), R({
86
87
  /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
87
- refresh: L,
88
+ refresh: W,
88
89
  /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`),未请求过时为 `undefined` */
89
- params: W,
90
+ params: y,
90
91
  /** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
91
- search: i
92
+ search: l
92
93
  }), (e, t) => {
93
- const d = F("loading");
94
- return G((l(), b("div", {
94
+ const r = F("loading");
95
+ return L((m(), z("div", {
95
96
  class: "zl-card-page",
96
- style: H({ "--card-min-width": s.cardMinWidth })
97
+ style: G({ "--card-min-width": s.cardMinWidth })
97
98
  }, [
98
- s.queryItems.length || e.$slots["search-actions"] ? (l(), h(te, {
99
+ s.queryItems.length || e.$slots["search-actions"] ? (m(), g(ee, {
99
100
  key: 0,
100
101
  ref_key: "searchRef",
101
- ref: w,
102
+ ref: E,
102
103
  items: s.queryItems,
103
104
  immediate: s.immediate,
104
- "hide-empty-label": s.hideEmptyLabel,
105
- onSearch: i,
106
- onReset: t[0] || (t[0] = (a) => N("search-reset"))
107
- }, J({ _: 2 }, [
105
+ onSearch: l,
106
+ onReset: t[0] || (t[0] = (a) => B("search-reset"))
107
+ }, H({ _: 2 }, [
108
108
  e.$slots["search-actions"] ? {
109
109
  name: "actions",
110
- fn: k(() => [
111
- g(e.$slots, "search-actions")
110
+ fn: P(() => [
111
+ v(e.$slots, "search-actions")
112
112
  ]),
113
113
  key: "0"
114
114
  } : void 0,
115
- z(K.value, (a) => ({
115
+ k(K.value, (a) => ({
116
116
  name: a,
117
- fn: k((n) => [
118
- g(e.$slots, `search-${a}`, Q(T(n)))
117
+ fn: P((c) => [
118
+ v(e.$slots, `search-${a}`, J(Q(c)))
119
119
  ])
120
120
  }))
121
- ]), 1032, ["items", "immediate", "hide-empty-label"])) : q("", !0),
122
- $("div", re, [
123
- $("div", ie, [
124
- S.value.length ? (l(!0), b(U, { key: 0 }, z(S.value, (a, n) => g(e.$slots, "default", D({
125
- key: a[s.itemKey] || n
126
- }, { ref_for: !0 }, { data: a }))), 128)) : (l(), h(_, { key: 1 }))
121
+ ]), 1032, ["items", "immediate"])) : q("", !0),
122
+ $("div", ae, [
123
+ $("div", se, [
124
+ S.value.length ? (m(!0), z(T, { key: 0 }, k(S.value, (a, c) => v(e.$slots, "default", D({
125
+ key: a[s.itemKey] || c
126
+ }, { ref_for: !0 }, { data: a }))), 128)) : (m(), g(X, { key: 1 }))
127
127
  ])
128
128
  ]),
129
- s.pagination && v(u) !== !1 ? (l(), h(ee, D({ key: 1 }, v(u), {
130
- onChange: t[1] || (t[1] = (a) => i(void 0, a))
129
+ s.pagination && h(d) !== !1 ? (m(), g(Y, D({ key: 1 }, h(d), {
130
+ onChange: t[1] || (t[1] = (a) => l(void 0, a))
131
131
  }), null, 16)) : q("", !0)
132
132
  ], 4)), [
133
- [d, v(O)]
133
+ [r, h(O)]
134
134
  ]);
135
135
  };
136
136
  }
137
137
  });
138
138
  export {
139
- he as default
139
+ de as default
140
140
  };
141
141
  //# sourceMappingURL=index.vue.mjs.map
@@ -1 +1 @@
1
- .zl-checkbox-tag{display:inline-flex;flex-wrap:wrap;gap:8px}.zl-checkbox-tag .zl-checkbox-tag__plain:not(.zl-tag-selected){background-color:var(--zl-fill-2)}.zl-checkbox-tag .zl-checkbox-tag__plain:not(.zl-tag-selected):hover:not(.zl-tag-disabled){background-color:var(--zl-fill-3)}.zl-checkbox-tag .zl-tag.zl-tag-selected:not(.zl-tag-disabled):hover{background-color:var(--tag-color-fill)}.zl-checkbox-tag .zl-tag-disabled{color:var(--zl-text-4)}.zl-checkbox-tag .zl-tag-disabled.zl-tag-selected{background-color:var(--zl-primary-1);color:var(--zl-primary-3);border-color:var(--zl-primary-3)}
1
+ .zl-checkbox-tag{display:inline-flex;flex-wrap:wrap;gap:8px}.zl-checkbox-tag .zl-tag-fill:not(.zl-tag-selected){border-color:transparent;background-color:var(--zl-fill-2)}.zl-checkbox-tag .zl-tag-fill:not(.zl-tag-selected):hover:not(.zl-tag-disabled){background-color:var(--zl-fill-3)}.zl-checkbox-tag .zl-tag.zl-tag-selected:not(.zl-tag-disabled):hover{background-color:var(--tag-color-fill)}.zl-checkbox-tag .zl-tag-disabled{color:var(--zl-text-4)}.zl-checkbox-tag .zl-tag-disabled.zl-tag-selected{background-color:var(--zl-primary-1);color:var(--zl-primary-3);border-color:var(--zl-primary-3)}
@@ -12,9 +12,9 @@ type __VLS_Props = {
12
12
  options?: CheckboxTagOption[];
13
13
  /** 单选模式(值为单值) */
14
14
  single?: boolean;
15
- /** 是否圆角显示,默认开启;也可为具体圆角值(数字 px 或 CSS 长度),false 关闭(直角/small) */
16
- rounded?: boolean | number | string;
17
- /** 是否显示边框,默认开启 */
15
+ /** 是否圆角显示,默认开启 */
16
+ rounded?: boolean;
17
+ /** 选中时是否显示边框,默认开启 */
18
18
  bordered?: boolean;
19
19
  /** 是否填充背景色,默认开启 */
20
20
  fill?: boolean;
@@ -44,7 +44,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
44
44
  fill: boolean;
45
45
  size: "mini" | "small" | "medium";
46
46
  bordered: boolean;
47
- rounded: boolean | number | string;
47
+ rounded: boolean;
48
48
  options: CheckboxTagOption[];
49
49
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
50
50
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;