@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.
- package/README.md +355 -190
- package/dist/components/ZlAddSub/index.css +1 -1
- package/dist/components/ZlAddSub/index.vue.mjs +2 -2
- package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +1 -1
- package/dist/components/ZlCardPage/index.vue.d.ts +94 -36
- package/dist/components/ZlCardPage/index.vue.mjs +2 -0
- package/dist/components/ZlChart/index.vue.d.ts +1 -0
- package/dist/components/ZlChart/index.vue.mjs +1 -0
- package/dist/components/ZlCheckAll/index.css +1 -1
- package/dist/components/ZlCheckAll/index.vue.mjs +1 -1
- package/dist/components/ZlDictTag/index.vue.d.ts +11 -3
- package/dist/components/ZlDictTag/index.vue.mjs +32 -23
- package/dist/components/ZlDynamicComponent/index.vue.d.ts +8 -3
- package/dist/components/ZlDynamicComponent/index.vue.mjs +24 -19
- package/dist/components/ZlEditor/ZlSqlEditor.vue.d.ts +28 -2
- package/dist/components/ZlEditor/ZlSqlEditor.vue.mjs +27 -18
- package/dist/components/ZlEditor/index.vue.d.ts +22 -1
- package/dist/components/ZlEditor/index.vue.mjs +47 -24
- package/dist/components/ZlForm/index.vue.d.ts +28 -2
- package/dist/components/ZlForm/index.vue.mjs +96 -90
- package/dist/components/ZlGrid/index.vue.d.ts +1 -1
- package/dist/components/ZlIcon/index.css +1 -1
- package/dist/components/ZlIcon/index.vue.d.ts +6 -2
- package/dist/components/ZlIcon/index.vue.mjs +2 -2
- package/dist/components/ZlIcon/index2.vue.mjs +30 -23
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlSearch/index.vue.d.ts +82 -23
- package/dist/components/ZlSearch/index.vue.mjs +8 -1
- package/dist/components/ZlSearchTable/index.vue.d.ts +180 -40
- package/dist/components/ZlSearchTable/index.vue.mjs +4 -0
- package/dist/components/ZlSorter/ZlSorterList.css +1 -1
- package/dist/components/ZlSorter/ZlSorterList.vue.d.ts +1 -1
- package/dist/components/ZlSorter/ZlSorterList.vue.mjs +2 -2
- package/dist/components/ZlSorter/index.css +1 -1
- package/dist/components/ZlSorter/index.vue.mjs +2 -2
- package/dist/components/ZlSwitch/index.vue.d.ts +6 -2
- package/dist/components/ZlSwitch/index.vue.mjs +26 -24
- package/dist/components/ZlTable/index.vue.d.ts +36 -1
- package/dist/components/ZlTable/index.vue.mjs +98 -75
- package/dist/components/ZlTabs/index.vue.d.ts +20 -3
- package/dist/components/ZlTabs/index.vue.mjs +30 -20
- package/dist/components/ZlTag/index.vue.d.ts +2 -2
- package/package.json +6 -6
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Icon as
|
|
3
|
-
const
|
|
4
|
-
key: 2,
|
|
5
|
-
class: "zl-icon--local"
|
|
6
|
-
}, I = ["xlink:href"], E = /* @__PURE__ */ a({
|
|
1
|
+
import { defineComponent as v, useAttrs as z, computed as t, openBlock as o, createElementBlock as s, normalizeStyle as k, unref as r, normalizeClass as h, renderSlot as x, createBlock as I, mergeProps as i, createElementVNode as S, createCommentVNode as $ } from "vue";
|
|
2
|
+
import { Icon as A } from "@iconify/vue/offline";
|
|
3
|
+
const B = ["xlink:href"], g = /* @__PURE__ */ v({
|
|
7
4
|
name: "ZlIcon",
|
|
5
|
+
inheritAttrs: !1,
|
|
8
6
|
__name: "index",
|
|
9
7
|
props: {
|
|
10
|
-
icon: {}
|
|
8
|
+
icon: {},
|
|
9
|
+
size: {},
|
|
10
|
+
color: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
setup(n) {
|
|
13
|
+
const e = n, l = z(), u = t(() => ({
|
|
14
|
+
fontSize: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
15
|
+
color: e.color
|
|
16
|
+
})), c = t(() => {
|
|
17
|
+
const { class: a, style: y, ...p } = l;
|
|
18
|
+
return p;
|
|
19
|
+
}), m = t(() => e.icon.startsWith("http")), d = t(() => e.icon.includes(":")), f = t(() => `#icon-${e.icon}`);
|
|
20
|
+
return (a, y) => (o(), s("div", {
|
|
21
|
+
class: h(["zl-icon", r(l).class]),
|
|
22
|
+
style: k([u.value, r(l).style])
|
|
23
|
+
}, [
|
|
24
|
+
x(a.$slots, "default", {}, () => [
|
|
25
|
+
d.value ? (o(), I(r(A), i({ key: 0 }, c.value, {
|
|
26
|
+
id: n.icon,
|
|
27
|
+
icon: n.icon
|
|
28
|
+
}), null, 16, ["id", "icon"])) : m.value ? (o(), s("div", i({ key: 1 }, c.value, {
|
|
29
|
+
style: { mask: `url(${n.icon}) no-repeat 50% 50%` },
|
|
23
30
|
class: "zl-icon--external"
|
|
24
|
-
}, null,
|
|
25
|
-
|
|
26
|
-
])) :
|
|
31
|
+
}), null, 16)) : n.icon ? (o(), s("svg", i({ key: 2 }, c.value, { class: "zl-icon--local" }), [
|
|
32
|
+
S("use", { "xlink:href": f.value }, null, 8, B)
|
|
33
|
+
], 16)) : $("", !0)
|
|
27
34
|
], !0)
|
|
28
|
-
]));
|
|
35
|
+
], 6));
|
|
29
36
|
}
|
|
30
37
|
});
|
|
31
38
|
export {
|
|
32
|
-
|
|
39
|
+
g as default
|
|
33
40
|
};
|
|
34
41
|
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.zl-pagination[data-v-
|
|
1
|
+
@charset "UTF-8";.zl-pagination[data-v-78457fcd]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-78457fcd]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-78457fcd]{--zl-pagination-justify: center}.zl-pagination--right[data-v-78457fcd]{--zl-pagination-justify: flex-end}
|
|
@@ -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 i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-78457fcd"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -78,8 +78,15 @@ declare function __VLS_template(): {
|
|
|
78
78
|
items: import('../..').FormItem[];
|
|
79
79
|
model?: Record<string, any>;
|
|
80
80
|
}> & Readonly<{}>, {
|
|
81
|
-
validate: () => Promise<
|
|
82
|
-
validateField: (
|
|
81
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
82
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
83
|
+
resetFields: (props?: string | string[]) => any;
|
|
84
|
+
clearValidate: (props?: string | string[]) => any;
|
|
85
|
+
scrollToField: (prop: string) => any;
|
|
86
|
+
getField: (prop: string) => any;
|
|
87
|
+
fields: any;
|
|
88
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
89
|
+
elForm: any;
|
|
83
90
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
84
91
|
items: import('../..').FormItem[];
|
|
85
92
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
@@ -107,9 +114,16 @@ declare function __VLS_template(): {
|
|
|
107
114
|
}> & Omit<Readonly<{
|
|
108
115
|
items: import('../..').FormItem[];
|
|
109
116
|
model?: Record<string, any>;
|
|
110
|
-
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
111
|
-
validate: () => Promise<
|
|
112
|
-
validateField: (
|
|
117
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
|
|
118
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
119
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
120
|
+
resetFields: (props?: string | string[]) => any;
|
|
121
|
+
clearValidate: (props?: string | string[]) => any;
|
|
122
|
+
scrollToField: (prop: string) => any;
|
|
123
|
+
getField: (prop: string) => any;
|
|
124
|
+
fields: any;
|
|
125
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
126
|
+
elForm: any;
|
|
113
127
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
114
128
|
$slots: Partial<Record<string, (_: {
|
|
115
129
|
model: Record<string, any>;
|
|
@@ -165,8 +179,15 @@ declare function __VLS_template(): {
|
|
|
165
179
|
items: import('../..').FormItem[];
|
|
166
180
|
model?: Record<string, any>;
|
|
167
181
|
}> & Readonly<{}>, {
|
|
168
|
-
validate: () => Promise<
|
|
169
|
-
validateField: (
|
|
182
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
183
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
184
|
+
resetFields: (props?: string | string[]) => any;
|
|
185
|
+
clearValidate: (props?: string | string[]) => any;
|
|
186
|
+
scrollToField: (prop: string) => any;
|
|
187
|
+
getField: (prop: string) => any;
|
|
188
|
+
fields: any;
|
|
189
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
190
|
+
elForm: any;
|
|
170
191
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
171
192
|
items: import('../..').FormItem[];
|
|
172
193
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
@@ -194,9 +215,16 @@ declare function __VLS_template(): {
|
|
|
194
215
|
}> & Omit<Readonly<{
|
|
195
216
|
items: import('../..').FormItem[];
|
|
196
217
|
model?: Record<string, any>;
|
|
197
|
-
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
198
|
-
validate: () => Promise<
|
|
199
|
-
validateField: (
|
|
218
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
|
|
219
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
220
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
221
|
+
resetFields: (props?: string | string[]) => any;
|
|
222
|
+
clearValidate: (props?: string | string[]) => any;
|
|
223
|
+
scrollToField: (prop: string) => any;
|
|
224
|
+
getField: (prop: string) => any;
|
|
225
|
+
fields: any;
|
|
226
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
227
|
+
elForm: any;
|
|
200
228
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
201
229
|
$slots: Partial<Record<string, (_: {
|
|
202
230
|
model: Record<string, any>;
|
|
@@ -232,18 +260,21 @@ declare function __VLS_template(): {
|
|
|
232
260
|
};
|
|
233
261
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
234
262
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
263
|
+
/** 当前查询表单值(已按各项 `toParams` 转换),可直接当请求入参 */
|
|
235
264
|
params: import('vue').ComputedRef<Record<string, any>>;
|
|
265
|
+
/** 收起展开态并触发 `search` 事件(本身不做校验,带校验的查询走组件内查询按钮) */
|
|
236
266
|
search: typeof search;
|
|
267
|
+
/** 重置表单并清除校验提示,随后触发 `reset` 事件与一次 `search` */
|
|
237
268
|
reset: typeof reset;
|
|
238
269
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
239
|
-
search: (params: Record<string, any>) => any;
|
|
240
270
|
reset: () => any;
|
|
271
|
+
search: (params: Record<string, any>) => any;
|
|
241
272
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
242
|
-
onSearch?: ((params: Record<string, any>) => any) | undefined;
|
|
243
273
|
onReset?: (() => any) | undefined;
|
|
274
|
+
onSearch?: ((params: Record<string, any>) => any) | undefined;
|
|
244
275
|
}>, {
|
|
245
|
-
immediate: boolean;
|
|
246
276
|
disabled: boolean;
|
|
277
|
+
immediate: boolean;
|
|
247
278
|
items: SearchItem[];
|
|
248
279
|
labelsVisible: boolean;
|
|
249
280
|
showLabels: boolean;
|
|
@@ -273,8 +304,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
273
304
|
items: import('../..').FormItem[];
|
|
274
305
|
model?: Record<string, any>;
|
|
275
306
|
}> & Readonly<{}>, {
|
|
276
|
-
validate: () => Promise<
|
|
277
|
-
validateField: (
|
|
307
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
308
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
309
|
+
resetFields: (props?: string | string[]) => any;
|
|
310
|
+
clearValidate: (props?: string | string[]) => any;
|
|
311
|
+
scrollToField: (prop: string) => any;
|
|
312
|
+
getField: (prop: string) => any;
|
|
313
|
+
fields: any;
|
|
314
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
315
|
+
elForm: any;
|
|
278
316
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
279
317
|
items: import('../..').FormItem[];
|
|
280
318
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
@@ -302,9 +340,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
302
340
|
}> & Omit<Readonly<{
|
|
303
341
|
items: import('../..').FormItem[];
|
|
304
342
|
model?: Record<string, any>;
|
|
305
|
-
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
306
|
-
validate: () => Promise<
|
|
307
|
-
validateField: (
|
|
343
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
|
|
344
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
345
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
346
|
+
resetFields: (props?: string | string[]) => any;
|
|
347
|
+
clearValidate: (props?: string | string[]) => any;
|
|
348
|
+
scrollToField: (prop: string) => any;
|
|
349
|
+
getField: (prop: string) => any;
|
|
350
|
+
fields: any;
|
|
351
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
352
|
+
elForm: any;
|
|
308
353
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
309
354
|
$slots: Partial<Record<string, (_: {
|
|
310
355
|
model: Record<string, any>;
|
|
@@ -360,8 +405,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
360
405
|
items: import('../..').FormItem[];
|
|
361
406
|
model?: Record<string, any>;
|
|
362
407
|
}> & Readonly<{}>, {
|
|
363
|
-
validate: () => Promise<
|
|
364
|
-
validateField: (
|
|
408
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
409
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
410
|
+
resetFields: (props?: string | string[]) => any;
|
|
411
|
+
clearValidate: (props?: string | string[]) => any;
|
|
412
|
+
scrollToField: (prop: string) => any;
|
|
413
|
+
getField: (prop: string) => any;
|
|
414
|
+
fields: any;
|
|
415
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
416
|
+
elForm: any;
|
|
365
417
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
366
418
|
items: import('../..').FormItem[];
|
|
367
419
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
@@ -389,9 +441,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
389
441
|
}> & Omit<Readonly<{
|
|
390
442
|
items: import('../..').FormItem[];
|
|
391
443
|
model?: Record<string, any>;
|
|
392
|
-
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
393
|
-
validate: () => Promise<
|
|
394
|
-
validateField: (
|
|
444
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues" | "elForm" | "fields"> & {
|
|
445
|
+
validate: (callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
446
|
+
validateField: (props?: string | string[], callback?: (isValid: boolean, invalidFields?: Record<string, any>) => void) => Promise<boolean>;
|
|
447
|
+
resetFields: (props?: string | string[]) => any;
|
|
448
|
+
clearValidate: (props?: string | string[]) => any;
|
|
449
|
+
scrollToField: (prop: string) => any;
|
|
450
|
+
getField: (prop: string) => any;
|
|
451
|
+
fields: any;
|
|
452
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
453
|
+
elForm: any;
|
|
395
454
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
396
455
|
$slots: Partial<Record<string, (_: {
|
|
397
456
|
model: Record<string, any>;
|
|
@@ -99,7 +99,14 @@ const de = { class: "zl-search" }, me = {
|
|
|
99
99
|
async () => {
|
|
100
100
|
await w(), H();
|
|
101
101
|
}
|
|
102
|
-
), u.immediate && (async () => (await w(), _()))(), D({
|
|
102
|
+
), u.immediate && (async () => (await w(), _()))(), D({
|
|
103
|
+
/** 当前查询表单值(已按各项 `toParams` 转换),可直接当请求入参 */
|
|
104
|
+
params: j,
|
|
105
|
+
/** 收起展开态并触发 `search` 事件(本身不做校验,带校验的查询走组件内查询按钮) */
|
|
106
|
+
search: V,
|
|
107
|
+
/** 重置表单并清除校验提示,随后触发 `reset` 事件与一次 `search` */
|
|
108
|
+
reset: x
|
|
109
|
+
}), (e, l) => {
|
|
103
110
|
const i = se("el-button");
|
|
104
111
|
return c(), f("div", de, [
|
|
105
112
|
v.value.length ? (c(), f("div", me, [
|