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