@zl-ui-kit/components 0.8.3 → 0.10.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.
- package/README.md +444 -179
- 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/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 +26 -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/dist/components/ZlTree/index.vue.d.ts +83 -2
- package/dist/components/ZlTree/index.vue.mjs +218 -71
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-add[data-v-
|
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-14a39cf3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
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<
|
|
109
|
-
validateField: (
|
|
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<
|
|
139
|
-
validateField: (
|
|
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<
|
|
196
|
-
validateField: (
|
|
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<
|
|
226
|
-
validateField: (
|
|
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: "
|
|
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
|
-
|
|
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<
|
|
420
|
-
validateField: (
|
|
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<
|
|
450
|
-
validateField: (
|
|
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<
|
|
507
|
-
validateField: (
|
|
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<
|
|
537
|
-
validateField: (
|
|
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: "
|
|
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
|
-
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-check[data-v-
|
|
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-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3505c631"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -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,
|
|
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?: ((...
|
|
45
|
-
"onUpdate:modelValue"?: ((
|
|
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
|
|
2
|
-
const
|
|
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:
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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" ?
|
|
49
|
-
if (
|
|
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
|
-
...
|
|
58
|
-
} = o.component,
|
|
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
|
-
},
|
|
63
|
-
...Object.keys(r).reduce((
|
|
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
|
-
|
|
72
|
+
D,
|
|
68
73
|
{
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
...
|
|
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
|
-
|
|
85
|
+
h as default
|
|
81
86
|
};
|
|
82
87
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SqlTableSchema } from './useSqlCompletion';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
/** 表结构(补全提示) */
|
|
4
5
|
tableSchemas?: SqlTableSchema[];
|
|
@@ -13,8 +14,11 @@ type __VLS_PublicProps = {
|
|
|
13
14
|
modelValue?: string;
|
|
14
15
|
} & __VLS_Props;
|
|
15
16
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
17
|
+
/** 用 dt-sql-parser 校验当前 SQL:无错时清空 marker;有错时打红色 marker + `ElMessage` 提示,并 **`throw diagnostics`**(调用方需 catch) */
|
|
16
18
|
validate: typeof validate;
|
|
19
|
+
/** 先跑 `validate()`(不通过会抛),通过则用 sql-formatter 格式化并写回 `v-model` */
|
|
17
20
|
format: typeof format;
|
|
21
|
+
zlEditor: monaco.editor.IStandaloneCodeEditor | undefined;
|
|
18
22
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
23
|
"update:modelValue": (value: string) => any;
|
|
20
24
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -31,7 +35,18 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
31
35
|
options?: Record<string, any>;
|
|
32
36
|
}> & Readonly<{
|
|
33
37
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
34
|
-
}>, {
|
|
38
|
+
}>, {
|
|
39
|
+
monacoEditor: monaco.editor.IStandaloneCodeEditor | undefined;
|
|
40
|
+
getValue: () => string;
|
|
41
|
+
setValue: (value: string) => void | undefined;
|
|
42
|
+
getModel: () => monaco.editor.ITextModel | null | undefined;
|
|
43
|
+
getSelection: () => monaco.Selection | null | undefined;
|
|
44
|
+
revealLine: (lineNumber: number) => void | undefined;
|
|
45
|
+
focus: () => void | undefined;
|
|
46
|
+
layout: () => void | undefined;
|
|
47
|
+
updateOptions: (options: Record<string, any>) => void | undefined;
|
|
48
|
+
dispose: () => void | undefined;
|
|
49
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
50
|
"update:modelValue": (value: string) => any;
|
|
36
51
|
}, import('vue').PublicProps, {
|
|
37
52
|
options: Record<string, any>;
|
|
@@ -52,7 +67,18 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
52
67
|
options?: Record<string, any>;
|
|
53
68
|
}> & Readonly<{
|
|
54
69
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
55
|
-
}>, {
|
|
70
|
+
}>, {
|
|
71
|
+
monacoEditor: monaco.editor.IStandaloneCodeEditor | undefined;
|
|
72
|
+
getValue: () => string;
|
|
73
|
+
setValue: (value: string) => void | undefined;
|
|
74
|
+
getModel: () => monaco.editor.ITextModel | null | undefined;
|
|
75
|
+
getSelection: () => monaco.Selection | null | undefined;
|
|
76
|
+
revealLine: (lineNumber: number) => void | undefined;
|
|
77
|
+
focus: () => void | undefined;
|
|
78
|
+
layout: () => void | undefined;
|
|
79
|
+
updateOptions: (options: Record<string, any>) => void | undefined;
|
|
80
|
+
dispose: () => void | undefined;
|
|
81
|
+
}, {}, {}, {}, {
|
|
56
82
|
options: Record<string, any>;
|
|
57
83
|
language: string;
|
|
58
84
|
}> | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as p, useModel as v, shallowRef as
|
|
1
|
+
import { defineComponent as p, useModel as v, shallowRef as g, toRefs as M, openBlock as q, createBlock as h, mergeProps as C, mergeModels as L } from "vue";
|
|
2
2
|
import { useZlT as R } from "@zl-ui-kit/composables";
|
|
3
3
|
import { ElMessage as S } from "element-plus";
|
|
4
4
|
import { MySQL as V } from "dt-sql-parser/dist/parser/mysql";
|
|
5
5
|
import * as n from "monaco-editor";
|
|
6
6
|
import { format as w } from "sql-formatter";
|
|
7
|
-
import
|
|
7
|
+
import E from "./index.vue.mjs";
|
|
8
8
|
import './index.css';/* empty css */
|
|
9
|
-
import { useSqlCompletion as
|
|
10
|
-
const
|
|
9
|
+
import { useSqlCompletion as k } from "./useSqlCompletion.mjs";
|
|
10
|
+
const B = /* @__PURE__ */ p({
|
|
11
11
|
name: "ZlSqlEditor",
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "ZlSqlEditor",
|
|
@@ -21,8 +21,8 @@ const N = /* @__PURE__ */ p({
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
23
|
setup(s, { expose: m }) {
|
|
24
|
-
const { t: u } = R(), i = s,
|
|
25
|
-
|
|
24
|
+
const { t: u } = R(), i = s, r = v(s, "modelValue"), d = new V(), t = g();
|
|
25
|
+
k(M(i));
|
|
26
26
|
function f(e) {
|
|
27
27
|
return {
|
|
28
28
|
severity: 8,
|
|
@@ -36,37 +36,46 @@ const N = /* @__PURE__ */ p({
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function a() {
|
|
39
|
-
n.editor.setModelMarkers(
|
|
40
|
-
const e = d.validate(
|
|
39
|
+
n.editor.setModelMarkers(t.value.getModel(), "sql", []);
|
|
40
|
+
const e = d.validate(r.value ?? "");
|
|
41
41
|
if (e.length) {
|
|
42
42
|
const o = e.map((l) => f(l));
|
|
43
|
-
throw n.editor.setModelMarkers(
|
|
43
|
+
throw n.editor.setModelMarkers(t.value.getModel(), "sql", o), S.error(u("zl.sqlEditor.invalid", "请检查SQL语法")), e;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
async function c() {
|
|
47
|
-
a(),
|
|
47
|
+
a(), r.value = w(r.value ?? "");
|
|
48
48
|
}
|
|
49
49
|
return m(
|
|
50
50
|
new Proxy(
|
|
51
|
-
{
|
|
51
|
+
{
|
|
52
|
+
/** 用 dt-sql-parser 校验当前 SQL:无错时清空 marker;有错时打红色 marker + `ElMessage` 提示,并 **`throw diagnostics`**(调用方需 catch) */
|
|
53
|
+
validate: a,
|
|
54
|
+
/** 先跑 `validate()`(不通过会抛),通过则用 sql-formatter 格式化并写回 `v-model` */
|
|
55
|
+
format: c,
|
|
56
|
+
/** 内部 `ZlEditor` 实例(其暴露对象代理 monaco),需要原生编辑器 API 时从这里取 */
|
|
57
|
+
get zlEditor() {
|
|
58
|
+
return t.value;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
52
61
|
{
|
|
53
62
|
get(e, o, l) {
|
|
54
|
-
return Reflect.get(e, o, l) ??
|
|
63
|
+
return Reflect.get(e, o, l) ?? t.value?.[o];
|
|
55
64
|
},
|
|
56
65
|
has(e, o) {
|
|
57
|
-
return Reflect.has(e, o) || o in (
|
|
66
|
+
return Reflect.has(e, o) || o in (t.value ?? {});
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
)
|
|
61
|
-
), (e, o) => (q(), h(
|
|
70
|
+
), (e, o) => (q(), h(E, C({
|
|
62
71
|
ref_key: "editorRef",
|
|
63
|
-
ref:
|
|
64
|
-
modelValue:
|
|
65
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) =>
|
|
72
|
+
ref: t,
|
|
73
|
+
modelValue: r.value,
|
|
74
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => r.value = l)
|
|
66
75
|
}, { ...e.$attrs, language: "sql" }), null, 16, ["modelValue"]));
|
|
67
76
|
}
|
|
68
77
|
});
|
|
69
78
|
export {
|
|
70
|
-
|
|
79
|
+
B as default
|
|
71
80
|
};
|
|
72
81
|
//# sourceMappingURL=ZlSqlEditor.vue.mjs.map
|