@zl-ui-kit/components 0.0.0-stage → 0.2.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 +24 -2
- package/dist/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/components/ZlAction/List.css +1 -0
- package/dist/components/ZlAction/List.vue.d.ts +37 -0
- package/dist/components/ZlAction/List.vue.mjs +138 -0
- package/dist/components/ZlAction/List3.vue.mjs +6 -0
- package/dist/components/ZlAction/index.vue.d.ts +3 -0
- package/dist/components/ZlAction/index.vue.mjs +22 -0
- package/dist/components/ZlAction/index2.vue.mjs +5 -0
- package/dist/components/ZlAction/types.d.ts +20 -0
- package/dist/components/ZlAddSub/index.css +1 -0
- package/dist/components/ZlAddSub/index.vue.d.ts +32 -0
- package/dist/components/ZlAddSub/index.vue.mjs +8 -0
- package/dist/components/ZlAddSub/index2.vue.mjs +47 -0
- package/dist/components/ZlAppLayout/Horizontal.css +1 -0
- package/dist/components/ZlAppLayout/Horizontal.vue.d.ts +22 -0
- package/dist/components/ZlAppLayout/Horizontal.vue.mjs +6 -0
- package/dist/components/ZlAppLayout/Horizontal2.vue.mjs +42 -0
- package/dist/components/ZlAppLayout/Vertical.css +1 -0
- package/dist/components/ZlAppLayout/Vertical.vue.d.ts +27 -0
- package/dist/components/ZlAppLayout/Vertical.vue.mjs +6 -0
- package/dist/components/ZlAppLayout/Vertical2.vue.mjs +56 -0
- package/dist/components/ZlAppLayout/index.vue.d.ts +21 -0
- package/dist/components/ZlAppLayout/index.vue.mjs +17 -0
- package/dist/components/ZlAppLayout/index2.vue.mjs +5 -0
- package/dist/components/ZlAppMenu/AppMenu.css +1 -0
- package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +25 -0
- package/dist/components/ZlAppMenu/AppMenu.vue.mjs +37 -0
- package/dist/components/ZlAppMenu/AppMenu3.vue.mjs +6 -0
- package/dist/components/ZlAppMenu/AppMenuItem.vue.d.ts +11 -0
- package/dist/components/ZlAppMenu/AppMenuItem.vue.mjs +58 -0
- package/dist/components/ZlAppMenu/AppMenuItem2.vue.mjs +5 -0
- package/dist/components/ZlAppSlogan/index.css +1 -0
- package/dist/components/ZlAppSlogan/index.vue.d.ts +8 -0
- package/dist/components/ZlAppSlogan/index.vue.mjs +30 -0
- package/dist/components/ZlAppSlogan/index3.vue.mjs +6 -0
- package/dist/components/ZlAutoTooltip/index.css +1 -0
- package/dist/components/ZlAutoTooltip/index.vue.d.ts +19 -0
- package/dist/components/ZlAutoTooltip/index.vue.mjs +8 -0
- package/dist/components/ZlAutoTooltip/index2.vue.mjs +49 -0
- package/dist/components/ZlAvatar/Group.css +1 -0
- package/dist/components/ZlAvatar/Group.vue.d.ts +17 -0
- package/dist/components/ZlAvatar/Group.vue.mjs +8 -0
- package/dist/components/ZlAvatar/Group2.vue.mjs +37 -0
- package/dist/components/ZlAvatar/index.css +1 -0
- package/dist/components/ZlAvatar/index.vue.d.ts +11 -0
- package/dist/components/ZlAvatar/index.vue.mjs +8 -0
- package/dist/components/ZlAvatar/index2.vue.mjs +39 -0
- package/dist/components/ZlCard/index.css +1 -0
- package/dist/components/ZlCard/index.vue.d.ts +30 -0
- package/dist/components/ZlCard/index.vue.mjs +48 -0
- package/dist/components/ZlCard/index3.vue.mjs +6 -0
- package/dist/components/ZlCardPage/index.css +1 -0
- package/dist/components/ZlCardPage/index.vue.d.ts +642 -0
- package/dist/components/ZlCardPage/index.vue.mjs +114 -0
- package/dist/components/ZlCardPage/index3.vue.mjs +6 -0
- package/dist/components/ZlChart/index.css +1 -0
- package/dist/components/ZlChart/index.vue.d.ts +12 -0
- package/dist/components/ZlChart/index.vue.mjs +48 -0
- package/dist/components/ZlChart/index3.vue.mjs +6 -0
- package/dist/components/ZlCheckAll/index.css +1 -0
- package/dist/components/ZlCheckAll/index.vue.d.ts +20 -0
- package/dist/components/ZlCheckAll/index.vue.mjs +8 -0
- package/dist/components/ZlCheckAll/index2.vue.mjs +55 -0
- package/dist/components/ZlCheckboxTag/index.css +1 -0
- package/dist/components/ZlCheckboxTag/index.vue.d.ts +52 -0
- package/dist/components/ZlCheckboxTag/index.vue.mjs +68 -0
- package/dist/components/ZlCheckboxTag/index3.vue.mjs +6 -0
- package/dist/components/ZlCopy/copy.d.ts +5 -0
- package/dist/components/ZlCopy/copy.mjs +12 -0
- package/dist/components/ZlCopy/index.css +1 -0
- package/dist/components/ZlCopy/index.vue.d.ts +30 -0
- package/dist/components/ZlCopy/index.vue.mjs +8 -0
- package/dist/components/ZlCopy/index2.vue.mjs +54 -0
- package/dist/components/ZlDescription/index.css +1 -0
- package/dist/components/ZlDescription/index.vue.d.ts +41 -0
- package/dist/components/ZlDescription/index.vue.mjs +59 -0
- package/dist/components/ZlDescription/index3.vue.mjs +6 -0
- package/dist/components/ZlDictTag/index.vue.d.ts +16 -0
- package/dist/components/ZlDictTag/index.vue.mjs +52 -0
- package/dist/components/ZlDictTag/index2.vue.mjs +5 -0
- package/dist/components/ZlDrawer/index.css +1 -0
- package/dist/components/ZlDrawer/index.vue.d.ts +35 -0
- package/dist/components/ZlDrawer/index.vue.mjs +83 -0
- package/dist/components/ZlDrawer/index3.vue.mjs +6 -0
- package/dist/components/ZlDynamicComponent/index.vue.d.ts +46 -0
- package/dist/components/ZlDynamicComponent/index.vue.mjs +80 -0
- package/dist/components/ZlDynamicComponent/index2.vue.mjs +5 -0
- package/dist/components/ZlDynamicComponent/types.d.ts +28 -0
- package/dist/components/ZlEditor/ZlSqlEditor.vue.d.ts +59 -0
- package/dist/components/ZlEditor/ZlSqlEditor.vue.mjs +67 -0
- package/dist/components/ZlEditor/ZlSqlEditor2.vue.mjs +5 -0
- package/dist/components/ZlEditor/index.css +1 -0
- package/dist/components/ZlEditor/index.vue.d.ts +19 -0
- package/dist/components/ZlEditor/index.vue.mjs +55 -0
- package/dist/components/ZlEditor/index3.vue.mjs +6 -0
- package/dist/components/ZlEditor/setupMonacoEnvironment.d.ts +16 -0
- package/dist/components/ZlEditor/setupMonacoEnvironment.mjs +9 -0
- package/dist/components/ZlEditor/useSqlCompletion.d.ts +16 -0
- package/dist/components/ZlEditor/useSqlCompletion.mjs +91 -0
- package/dist/components/ZlEditor/zl-editor-theme.d.ts +2 -0
- package/dist/components/ZlEmpty/index.css +1 -0
- package/dist/components/ZlEmpty/index.vue.d.ts +11 -0
- package/dist/components/ZlEmpty/index.vue.mjs +8 -0
- package/dist/components/ZlEmpty/index2.vue.mjs +74 -0
- package/dist/components/ZlFilePreview/FileFetchError.css +1 -0
- package/dist/components/ZlFilePreview/FileFetchError.vue.d.ts +3 -0
- package/dist/components/ZlFilePreview/FileFetchError.vue.mjs +8 -0
- package/dist/components/ZlFilePreview/FileFetchError2.vue.mjs +14 -0
- package/dist/components/ZlFilePreview/components.d.ts +13 -0
- package/dist/components/ZlFilePreview/components.mjs +101 -0
- package/dist/components/ZlFilePreview/index.css +1 -0
- package/dist/components/ZlFilePreview/index.vue.d.ts +6 -0
- package/dist/components/ZlFilePreview/index.vue.mjs +63 -0
- package/dist/components/ZlFilePreview/index3.vue.mjs +6 -0
- package/dist/components/ZlFileViewer/index.css +1 -0
- package/dist/components/ZlFileViewer/index.vue.d.ts +8 -0
- package/dist/components/ZlFileViewer/index.vue.mjs +8 -0
- package/dist/components/ZlFileViewer/index2.vue.mjs +26 -0
- package/dist/components/ZlForm/ZlFormChild.vue.d.ts +16 -0
- package/dist/components/ZlForm/ZlFormChild.vue.mjs +12 -0
- package/dist/components/ZlForm/ZlFormChild2.vue.mjs +5 -0
- package/dist/components/ZlForm/index.css +1 -0
- package/dist/components/ZlForm/index.vue.d.ts +59 -0
- package/dist/components/ZlForm/index.vue.mjs +133 -0
- package/dist/components/ZlForm/index3.vue.mjs +6 -0
- package/dist/components/ZlGrid/ZlGridItem.vue.d.ts +26 -0
- package/dist/components/ZlGrid/ZlGridItem.vue.mjs +49 -0
- package/dist/components/ZlGrid/ZlGridItem2.vue.mjs +5 -0
- package/dist/components/ZlGrid/context.d.ts +8 -0
- package/dist/components/ZlGrid/context.mjs +5 -0
- package/dist/components/ZlGrid/index.css +1 -0
- package/dist/components/ZlGrid/index.vue.d.ts +41 -0
- package/dist/components/ZlGrid/index.vue.mjs +72 -0
- package/dist/components/ZlGrid/index3.vue.mjs +6 -0
- package/dist/components/ZlGrid/types.d.ts +20 -0
- package/dist/components/ZlHorizontalTable/index.css +1 -0
- package/dist/components/ZlHorizontalTable/index.vue.d.ts +52 -0
- package/dist/components/ZlHorizontalTable/index.vue.mjs +8 -0
- package/dist/components/ZlHorizontalTable/index2.vue.mjs +54 -0
- package/dist/components/ZlI18nProvider/index.vue.d.ts +18 -0
- package/dist/components/ZlI18nProvider/index.vue.mjs +21 -0
- package/dist/components/ZlI18nProvider/index2.vue.mjs +5 -0
- package/dist/components/ZlIcon/index.css +1 -0
- package/dist/components/ZlIcon/index.vue.d.ts +22 -0
- package/dist/components/ZlIcon/index.vue.mjs +8 -0
- package/dist/components/ZlIcon/index2.vue.mjs +34 -0
- package/dist/components/ZlIcon/presetIconifyIcon.d.ts +5 -0
- package/dist/components/ZlIcon/presetIconifyIcon.mjs +10 -0
- package/dist/components/ZlIconHover/index.vue.d.ts +3 -0
- package/dist/components/ZlIconHover/index.vue.mjs +14 -0
- package/dist/components/ZlIconHover/index2.vue.mjs +5 -0
- package/dist/components/ZlIconLabel/index.css +1 -0
- package/dist/components/ZlIconLabel/index.vue.d.ts +28 -0
- package/dist/components/ZlIconLabel/index.vue.mjs +31 -0
- package/dist/components/ZlIconLabel/index3.vue.mjs +6 -0
- package/dist/components/ZlLayoutSwitch/index.css +1 -0
- package/dist/components/ZlLayoutSwitch/index.vue.d.ts +15 -0
- package/dist/components/ZlLayoutSwitch/index.vue.mjs +8 -0
- package/dist/components/ZlLayoutSwitch/index2.vue.mjs +48 -0
- package/dist/components/ZlLogin/components/LoginForm.css +1 -0
- package/dist/components/ZlLogin/components/LoginForm.vue.d.ts +73 -0
- package/dist/components/ZlLogin/components/LoginForm.vue.mjs +8 -0
- package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +105 -0
- package/dist/components/ZlLogin/components/SlideChecker.css +1 -0
- package/dist/components/ZlLogin/components/SlideChecker.vue.d.ts +15 -0
- package/dist/components/ZlLogin/components/SlideChecker.vue.mjs +8 -0
- package/dist/components/ZlLogin/components/SlideChecker2.vue.mjs +58 -0
- package/dist/components/ZlLogin/index.css +1 -0
- package/dist/components/ZlLogin/index.vue.d.ts +33 -0
- package/dist/components/ZlLogin/index.vue.mjs +63 -0
- package/dist/components/ZlLogin/index3.vue.mjs +6 -0
- package/dist/components/ZlPagination/index.css +1 -0
- package/dist/components/ZlPagination/index.vue.d.ts +17 -0
- package/dist/components/ZlPagination/index.vue.mjs +8 -0
- package/dist/components/ZlPagination/index2.vue.mjs +43 -0
- package/dist/components/ZlPagination/usePagination.d.ts +20 -0
- package/dist/components/ZlPagination/usePagination.mjs +39 -0
- package/dist/components/ZlPdfViewer/index.css +1 -0
- package/dist/components/ZlPdfViewer/index.vue.d.ts +7 -0
- package/dist/components/ZlPdfViewer/index.vue.mjs +23 -0
- package/dist/components/ZlPdfViewer/index3.vue.mjs +6 -0
- package/dist/components/ZlPermission/index.vue.d.ts +22 -0
- package/dist/components/ZlPermission/index.vue.mjs +17 -0
- package/dist/components/ZlPermission/index2.vue.mjs +5 -0
- package/dist/components/ZlPermission/usePermission.d.ts +12 -0
- package/dist/components/ZlPermission/usePermission.mjs +34 -0
- package/dist/components/ZlPopconfirm/index.css +1 -0
- package/dist/components/ZlPopconfirm/index.vue.d.ts +36 -0
- package/dist/components/ZlPopconfirm/index.vue.mjs +85 -0
- package/dist/components/ZlPopconfirm/index3.vue.mjs +6 -0
- package/dist/components/ZlRadioTag/index.css +1 -0
- package/dist/components/ZlRadioTag/index.vue.d.ts +42 -0
- package/dist/components/ZlRadioTag/index.vue.mjs +62 -0
- package/dist/components/ZlRadioTag/index3.vue.mjs +6 -0
- package/dist/components/ZlSearch/index.css +1 -0
- package/dist/components/ZlSearch/index.vue.d.ts +420 -0
- package/dist/components/ZlSearch/index.vue.mjs +244 -0
- package/dist/components/ZlSearch/index3.vue.mjs +6 -0
- package/dist/components/ZlSearchTable/index.css +1 -0
- package/dist/components/ZlSearchTable/index.vue.d.ts +841 -0
- package/dist/components/ZlSearchTable/index.vue.mjs +125 -0
- package/dist/components/ZlSearchTable/index3.vue.mjs +6 -0
- package/dist/components/ZlSection/index.css +1 -0
- package/dist/components/ZlSection/index.vue.d.ts +29 -0
- package/dist/components/ZlSection/index.vue.mjs +49 -0
- package/dist/components/ZlSection/index3.vue.mjs +6 -0
- package/dist/components/ZlSorter/ZlSorterList.css +1 -0
- package/dist/components/ZlSorter/ZlSorterList.vue.d.ts +24 -0
- package/dist/components/ZlSorter/ZlSorterList.vue.mjs +8 -0
- package/dist/components/ZlSorter/ZlSorterList2.vue.mjs +39 -0
- package/dist/components/ZlSorter/index.css +1 -0
- package/dist/components/ZlSorter/index.vue.d.ts +31 -0
- package/dist/components/ZlSorter/index.vue.mjs +8 -0
- package/dist/components/ZlSorter/index2.vue.mjs +46 -0
- package/dist/components/ZlSwitch/index.css +1 -0
- package/dist/components/ZlSwitch/index.vue.d.ts +35 -0
- package/dist/components/ZlSwitch/index.vue.mjs +47 -0
- package/dist/components/ZlSwitch/index3.vue.mjs +6 -0
- package/dist/components/ZlTable/index.css +1 -0
- package/dist/components/ZlTable/index.vue.d.ts +51 -0
- package/dist/components/ZlTable/index.vue.mjs +121 -0
- package/dist/components/ZlTable/index3.vue.mjs +6 -0
- package/dist/components/ZlTable/useTablePagination.d.ts +29 -0
- package/dist/components/ZlTable/useTablePagination.mjs +27 -0
- package/dist/components/ZlTabs/index.css +1 -0
- package/dist/components/ZlTabs/index.vue.d.ts +42 -0
- package/dist/components/ZlTabs/index.vue.mjs +44 -0
- package/dist/components/ZlTabs/index3.vue.mjs +6 -0
- package/dist/components/ZlTag/ZlCornerTag.css +1 -0
- package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +25 -0
- package/dist/components/ZlTag/ZlCornerTag.vue.mjs +32 -0
- package/dist/components/ZlTag/ZlCornerTag3.vue.mjs +6 -0
- package/dist/components/ZlTag/index.css +1 -0
- package/dist/components/ZlTag/index.vue.d.ts +167 -0
- package/dist/components/ZlTag/index.vue.mjs +79 -0
- package/dist/components/ZlTag/index3.vue.mjs +6 -0
- package/dist/components/ZlText/index.css +1 -0
- package/dist/components/ZlText/index.vue.d.ts +21 -0
- package/dist/components/ZlText/index.vue.mjs +8 -0
- package/dist/components/ZlText/index2.vue.mjs +19 -0
- package/dist/components/ZlTitle/index.css +1 -0
- package/dist/components/ZlTitle/index.vue.d.ts +29 -0
- package/dist/components/ZlTitle/index.vue.mjs +8 -0
- package/dist/components/ZlTitle/index2.vue.mjs +59 -0
- package/dist/components/ZlTree/index.css +1 -0
- package/dist/components/ZlTree/index.vue.d.ts +47 -0
- package/dist/components/ZlTree/index.vue.mjs +104 -0
- package/dist/components/ZlTree/index3.vue.mjs +6 -0
- package/dist/components/ZlTreeSelect/index.css +1 -0
- package/dist/components/ZlTreeSelect/index.vue.d.ts +33 -0
- package/dist/components/ZlTreeSelect/index.vue.mjs +8 -0
- package/dist/components/ZlTreeSelect/index2.vue.mjs +75 -0
- package/dist/components/ZlUpload/index.css +1 -0
- package/dist/components/ZlUpload/index.vue.d.ts +50 -0
- package/dist/components/ZlUpload/index.vue.mjs +8 -0
- package/dist/components/ZlUpload/index2.vue.mjs +153 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.mjs +227 -0
- package/dist/locales/createZlI18n.d.ts +43 -0
- package/dist/locales/createZlI18n.mjs +19 -0
- package/dist/locales/en.d.ts +7 -0
- package/dist/locales/en.mjs +40 -0
- package/dist/locales/index.d.ts +10 -0
- package/dist/locales/messages.d.ts +7 -0
- package/dist/locales/messages.mjs +13 -0
- package/dist/locales/zh-cn.d.ts +7 -0
- package/dist/locales/zh-cn.mjs +40 -0
- package/dist/types.d.ts +46 -0
- package/dist/utils/echarts.d.ts +69 -0
- package/package.json +93 -4
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
|
+
import { SearchItem } from '../../types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
items?: SearchItem[];
|
|
5
|
+
model?: Record<string, any>;
|
|
6
|
+
immediate?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
showLabels?: boolean;
|
|
9
|
+
/** 超过该项数显示"多行筛选"按钮(EP 版阈值判断,替代原 overflow 检测) */
|
|
10
|
+
overflowCount?: number;
|
|
11
|
+
};
|
|
12
|
+
declare function search(): Promise<void>;
|
|
13
|
+
declare function reset(): Promise<void>;
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: Partial<Record<string, (_: {
|
|
17
|
+
model: Record<string, any>;
|
|
18
|
+
field: {
|
|
19
|
+
formItemProps: Record<string, any>;
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
component: any;
|
|
22
|
+
label?: string;
|
|
23
|
+
model: string;
|
|
24
|
+
slot?: boolean;
|
|
25
|
+
slots?: Record<string, any>;
|
|
26
|
+
props: Record<string, any>;
|
|
27
|
+
};
|
|
28
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
29
|
+
model: Record<string, any>;
|
|
30
|
+
field: {
|
|
31
|
+
formItemProps: Record<string, any>;
|
|
32
|
+
tooltip?: string;
|
|
33
|
+
component: any;
|
|
34
|
+
label?: string;
|
|
35
|
+
model: string;
|
|
36
|
+
slot?: boolean;
|
|
37
|
+
slots?: Record<string, any>;
|
|
38
|
+
props: Record<string, any>;
|
|
39
|
+
};
|
|
40
|
+
}) => any>> & {
|
|
41
|
+
actions?(_: {}): any;
|
|
42
|
+
};
|
|
43
|
+
refs: {
|
|
44
|
+
formRef: ({
|
|
45
|
+
$: import('vue').ComponentInternalInstance;
|
|
46
|
+
$data: {};
|
|
47
|
+
$props: {
|
|
48
|
+
readonly items: import('../..').FormItem[];
|
|
49
|
+
readonly model?: Record<string, any> | undefined;
|
|
50
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
51
|
+
$attrs: import('vue').Attrs;
|
|
52
|
+
$refs: {
|
|
53
|
+
[x: string]: unknown;
|
|
54
|
+
} & {
|
|
55
|
+
formRef: unknown;
|
|
56
|
+
};
|
|
57
|
+
$slots: Readonly<{
|
|
58
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
61
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
62
|
+
$host: Element | null;
|
|
63
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
64
|
+
$el: any;
|
|
65
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
66
|
+
items: import('../..').FormItem[];
|
|
67
|
+
model?: Record<string, any>;
|
|
68
|
+
}> & Readonly<{}>, {
|
|
69
|
+
validate: () => Promise<void>;
|
|
70
|
+
validateField: (name: string) => Promise<void>;
|
|
71
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
72
|
+
items: import('../..').FormItem[];
|
|
73
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
74
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
75
|
+
created?: (() => void) | (() => void)[];
|
|
76
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
77
|
+
mounted?: (() => void) | (() => void)[];
|
|
78
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
79
|
+
updated?: (() => void) | (() => void)[];
|
|
80
|
+
activated?: (() => void) | (() => void)[];
|
|
81
|
+
deactivated?: (() => void) | (() => void)[];
|
|
82
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
83
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
84
|
+
destroyed?: (() => void) | (() => void)[];
|
|
85
|
+
unmounted?: (() => void) | (() => void)[];
|
|
86
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
87
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
88
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
89
|
+
};
|
|
90
|
+
$forceUpdate: () => void;
|
|
91
|
+
$nextTick: typeof nextTick;
|
|
92
|
+
$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;
|
|
93
|
+
} & Readonly<{
|
|
94
|
+
items: import('../..').FormItem[];
|
|
95
|
+
}> & Omit<Readonly<{
|
|
96
|
+
items: import('../..').FormItem[];
|
|
97
|
+
model?: Record<string, any>;
|
|
98
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
99
|
+
validate: () => Promise<void>;
|
|
100
|
+
validateField: (name: string) => Promise<void>;
|
|
101
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
102
|
+
$slots: Partial<Record<string, (_: {
|
|
103
|
+
model: Record<string, any>;
|
|
104
|
+
field: {
|
|
105
|
+
formItemProps: Record<string, any>;
|
|
106
|
+
tooltip?: string;
|
|
107
|
+
component: any;
|
|
108
|
+
label?: string;
|
|
109
|
+
model: string;
|
|
110
|
+
slot?: boolean;
|
|
111
|
+
slots?: Record<string, any>;
|
|
112
|
+
props: Record<string, any>;
|
|
113
|
+
};
|
|
114
|
+
}) => any>> & {
|
|
115
|
+
label?(_: {
|
|
116
|
+
label: string | undefined;
|
|
117
|
+
item: {
|
|
118
|
+
formItemProps: Record<string, any>;
|
|
119
|
+
tooltip?: string;
|
|
120
|
+
component: any;
|
|
121
|
+
label?: string;
|
|
122
|
+
model: string;
|
|
123
|
+
slot?: boolean;
|
|
124
|
+
slots?: Record<string, any>;
|
|
125
|
+
props: Record<string, any>;
|
|
126
|
+
};
|
|
127
|
+
}): any;
|
|
128
|
+
default?(_: {}): any;
|
|
129
|
+
};
|
|
130
|
+
}) | null;
|
|
131
|
+
multipleFormRef: ({
|
|
132
|
+
$: import('vue').ComponentInternalInstance;
|
|
133
|
+
$data: {};
|
|
134
|
+
$props: {
|
|
135
|
+
readonly items: import('../..').FormItem[];
|
|
136
|
+
readonly model?: Record<string, any> | undefined;
|
|
137
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
138
|
+
$attrs: import('vue').Attrs;
|
|
139
|
+
$refs: {
|
|
140
|
+
[x: string]: unknown;
|
|
141
|
+
} & {
|
|
142
|
+
formRef: unknown;
|
|
143
|
+
};
|
|
144
|
+
$slots: Readonly<{
|
|
145
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
146
|
+
}>;
|
|
147
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
148
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
149
|
+
$host: Element | null;
|
|
150
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
151
|
+
$el: any;
|
|
152
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
153
|
+
items: import('../..').FormItem[];
|
|
154
|
+
model?: Record<string, any>;
|
|
155
|
+
}> & Readonly<{}>, {
|
|
156
|
+
validate: () => Promise<void>;
|
|
157
|
+
validateField: (name: string) => Promise<void>;
|
|
158
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
159
|
+
items: import('../..').FormItem[];
|
|
160
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
161
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
162
|
+
created?: (() => void) | (() => void)[];
|
|
163
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
164
|
+
mounted?: (() => void) | (() => void)[];
|
|
165
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
166
|
+
updated?: (() => void) | (() => void)[];
|
|
167
|
+
activated?: (() => void) | (() => void)[];
|
|
168
|
+
deactivated?: (() => void) | (() => void)[];
|
|
169
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
170
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
171
|
+
destroyed?: (() => void) | (() => void)[];
|
|
172
|
+
unmounted?: (() => void) | (() => void)[];
|
|
173
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
174
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
175
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
176
|
+
};
|
|
177
|
+
$forceUpdate: () => void;
|
|
178
|
+
$nextTick: typeof nextTick;
|
|
179
|
+
$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;
|
|
180
|
+
} & Readonly<{
|
|
181
|
+
items: import('../..').FormItem[];
|
|
182
|
+
}> & Omit<Readonly<{
|
|
183
|
+
items: import('../..').FormItem[];
|
|
184
|
+
model?: Record<string, any>;
|
|
185
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
186
|
+
validate: () => Promise<void>;
|
|
187
|
+
validateField: (name: string) => Promise<void>;
|
|
188
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
189
|
+
$slots: Partial<Record<string, (_: {
|
|
190
|
+
model: Record<string, any>;
|
|
191
|
+
field: {
|
|
192
|
+
formItemProps: Record<string, any>;
|
|
193
|
+
tooltip?: string;
|
|
194
|
+
component: any;
|
|
195
|
+
label?: string;
|
|
196
|
+
model: string;
|
|
197
|
+
slot?: boolean;
|
|
198
|
+
slots?: Record<string, any>;
|
|
199
|
+
props: Record<string, any>;
|
|
200
|
+
};
|
|
201
|
+
}) => any>> & {
|
|
202
|
+
label?(_: {
|
|
203
|
+
label: string | undefined;
|
|
204
|
+
item: {
|
|
205
|
+
formItemProps: Record<string, any>;
|
|
206
|
+
tooltip?: string;
|
|
207
|
+
component: any;
|
|
208
|
+
label?: string;
|
|
209
|
+
model: string;
|
|
210
|
+
slot?: boolean;
|
|
211
|
+
slots?: Record<string, any>;
|
|
212
|
+
props: Record<string, any>;
|
|
213
|
+
};
|
|
214
|
+
}): any;
|
|
215
|
+
default?(_: {}): any;
|
|
216
|
+
};
|
|
217
|
+
}) | null;
|
|
218
|
+
};
|
|
219
|
+
rootEl: HTMLDivElement;
|
|
220
|
+
};
|
|
221
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
222
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
223
|
+
params: import('vue').ComputedRef<Record<string, any>>;
|
|
224
|
+
search: typeof search;
|
|
225
|
+
reset: typeof reset;
|
|
226
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
227
|
+
search: (params: Record<string, any>) => any;
|
|
228
|
+
reset: () => any;
|
|
229
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
230
|
+
onSearch?: ((params: Record<string, any>) => any) | undefined;
|
|
231
|
+
onReset?: (() => any) | undefined;
|
|
232
|
+
}>, {
|
|
233
|
+
immediate: boolean;
|
|
234
|
+
disabled: boolean;
|
|
235
|
+
items: SearchItem[];
|
|
236
|
+
overflowCount: number;
|
|
237
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
238
|
+
formRef: ({
|
|
239
|
+
$: import('vue').ComponentInternalInstance;
|
|
240
|
+
$data: {};
|
|
241
|
+
$props: {
|
|
242
|
+
readonly items: import('../..').FormItem[];
|
|
243
|
+
readonly model?: Record<string, any> | undefined;
|
|
244
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
245
|
+
$attrs: import('vue').Attrs;
|
|
246
|
+
$refs: {
|
|
247
|
+
[x: string]: unknown;
|
|
248
|
+
} & {
|
|
249
|
+
formRef: unknown;
|
|
250
|
+
};
|
|
251
|
+
$slots: Readonly<{
|
|
252
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
253
|
+
}>;
|
|
254
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
255
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
256
|
+
$host: Element | null;
|
|
257
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
258
|
+
$el: any;
|
|
259
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
260
|
+
items: import('../..').FormItem[];
|
|
261
|
+
model?: Record<string, any>;
|
|
262
|
+
}> & Readonly<{}>, {
|
|
263
|
+
validate: () => Promise<void>;
|
|
264
|
+
validateField: (name: string) => Promise<void>;
|
|
265
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
266
|
+
items: import('../..').FormItem[];
|
|
267
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
268
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
269
|
+
created?: (() => void) | (() => void)[];
|
|
270
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
271
|
+
mounted?: (() => void) | (() => void)[];
|
|
272
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
273
|
+
updated?: (() => void) | (() => void)[];
|
|
274
|
+
activated?: (() => void) | (() => void)[];
|
|
275
|
+
deactivated?: (() => void) | (() => void)[];
|
|
276
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
277
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
278
|
+
destroyed?: (() => void) | (() => void)[];
|
|
279
|
+
unmounted?: (() => void) | (() => void)[];
|
|
280
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
281
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
282
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
283
|
+
};
|
|
284
|
+
$forceUpdate: () => void;
|
|
285
|
+
$nextTick: typeof nextTick;
|
|
286
|
+
$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;
|
|
287
|
+
} & Readonly<{
|
|
288
|
+
items: import('../..').FormItem[];
|
|
289
|
+
}> & Omit<Readonly<{
|
|
290
|
+
items: import('../..').FormItem[];
|
|
291
|
+
model?: Record<string, any>;
|
|
292
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
293
|
+
validate: () => Promise<void>;
|
|
294
|
+
validateField: (name: string) => Promise<void>;
|
|
295
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
296
|
+
$slots: Partial<Record<string, (_: {
|
|
297
|
+
model: Record<string, any>;
|
|
298
|
+
field: {
|
|
299
|
+
formItemProps: Record<string, any>;
|
|
300
|
+
tooltip?: string;
|
|
301
|
+
component: any;
|
|
302
|
+
label?: string;
|
|
303
|
+
model: string;
|
|
304
|
+
slot?: boolean;
|
|
305
|
+
slots?: Record<string, any>;
|
|
306
|
+
props: Record<string, any>;
|
|
307
|
+
};
|
|
308
|
+
}) => any>> & {
|
|
309
|
+
label?(_: {
|
|
310
|
+
label: string | undefined;
|
|
311
|
+
item: {
|
|
312
|
+
formItemProps: Record<string, any>;
|
|
313
|
+
tooltip?: string;
|
|
314
|
+
component: any;
|
|
315
|
+
label?: string;
|
|
316
|
+
model: string;
|
|
317
|
+
slot?: boolean;
|
|
318
|
+
slots?: Record<string, any>;
|
|
319
|
+
props: Record<string, any>;
|
|
320
|
+
};
|
|
321
|
+
}): any;
|
|
322
|
+
default?(_: {}): any;
|
|
323
|
+
};
|
|
324
|
+
}) | null;
|
|
325
|
+
multipleFormRef: ({
|
|
326
|
+
$: import('vue').ComponentInternalInstance;
|
|
327
|
+
$data: {};
|
|
328
|
+
$props: {
|
|
329
|
+
readonly items: import('../..').FormItem[];
|
|
330
|
+
readonly model?: Record<string, any> | undefined;
|
|
331
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
332
|
+
$attrs: import('vue').Attrs;
|
|
333
|
+
$refs: {
|
|
334
|
+
[x: string]: unknown;
|
|
335
|
+
} & {
|
|
336
|
+
formRef: unknown;
|
|
337
|
+
};
|
|
338
|
+
$slots: Readonly<{
|
|
339
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
342
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
343
|
+
$host: Element | null;
|
|
344
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
345
|
+
$el: any;
|
|
346
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
347
|
+
items: import('../..').FormItem[];
|
|
348
|
+
model?: Record<string, any>;
|
|
349
|
+
}> & Readonly<{}>, {
|
|
350
|
+
validate: () => Promise<void>;
|
|
351
|
+
validateField: (name: string) => Promise<void>;
|
|
352
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
353
|
+
items: import('../..').FormItem[];
|
|
354
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
355
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
356
|
+
created?: (() => void) | (() => void)[];
|
|
357
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
358
|
+
mounted?: (() => void) | (() => void)[];
|
|
359
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
360
|
+
updated?: (() => void) | (() => void)[];
|
|
361
|
+
activated?: (() => void) | (() => void)[];
|
|
362
|
+
deactivated?: (() => void) | (() => void)[];
|
|
363
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
364
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
365
|
+
destroyed?: (() => void) | (() => void)[];
|
|
366
|
+
unmounted?: (() => void) | (() => void)[];
|
|
367
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
368
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
369
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
370
|
+
};
|
|
371
|
+
$forceUpdate: () => void;
|
|
372
|
+
$nextTick: typeof nextTick;
|
|
373
|
+
$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;
|
|
374
|
+
} & Readonly<{
|
|
375
|
+
items: import('../..').FormItem[];
|
|
376
|
+
}> & Omit<Readonly<{
|
|
377
|
+
items: import('../..').FormItem[];
|
|
378
|
+
model?: Record<string, any>;
|
|
379
|
+
}> & Readonly<{}>, "items" | "validate" | "validateField"> & {
|
|
380
|
+
validate: () => Promise<void>;
|
|
381
|
+
validateField: (name: string) => Promise<void>;
|
|
382
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
383
|
+
$slots: Partial<Record<string, (_: {
|
|
384
|
+
model: Record<string, any>;
|
|
385
|
+
field: {
|
|
386
|
+
formItemProps: Record<string, any>;
|
|
387
|
+
tooltip?: string;
|
|
388
|
+
component: any;
|
|
389
|
+
label?: string;
|
|
390
|
+
model: string;
|
|
391
|
+
slot?: boolean;
|
|
392
|
+
slots?: Record<string, any>;
|
|
393
|
+
props: Record<string, any>;
|
|
394
|
+
};
|
|
395
|
+
}) => any>> & {
|
|
396
|
+
label?(_: {
|
|
397
|
+
label: string | undefined;
|
|
398
|
+
item: {
|
|
399
|
+
formItemProps: Record<string, any>;
|
|
400
|
+
tooltip?: string;
|
|
401
|
+
component: any;
|
|
402
|
+
label?: string;
|
|
403
|
+
model: string;
|
|
404
|
+
slot?: boolean;
|
|
405
|
+
slots?: Record<string, any>;
|
|
406
|
+
props: Record<string, any>;
|
|
407
|
+
};
|
|
408
|
+
}): any;
|
|
409
|
+
default?(_: {}): any;
|
|
410
|
+
};
|
|
411
|
+
}) | null;
|
|
412
|
+
}, HTMLDivElement>;
|
|
413
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
414
|
+
export default _default;
|
|
415
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
416
|
+
new (): {
|
|
417
|
+
$slots: S;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { defineComponent as Y, computed as i, useSlots as ee, ref as z, nextTick as $, resolveComponent as le, openBlock as r, createElementBlock as d, createElementVNode as k, createVNode as t, withModifiers as j, createSlots as F, withCtx as a, createTextVNode as v, toDisplayString as f, renderList as V, renderSlot as B, normalizeProps as N, guardReactiveProps as x, createBlock as E, createCommentVNode as h, unref as C, Fragment as oe, Transition as te } from "vue";
|
|
2
|
+
import { useZlT as ae } from "@zl-ui-kit/composables";
|
|
3
|
+
import { isArray as se, isPlainObject as re } from "@zl-ui-kit/utils";
|
|
4
|
+
import O from "../ZlAutoTooltip/index.vue.mjs";
|
|
5
|
+
import A from "../ZlForm/index.vue.mjs";
|
|
6
|
+
import '../ZlTag/index.css';import '../ZlForm/index.css';/* empty css */
|
|
7
|
+
import w from "../ZlIcon/index.vue.mjs";
|
|
8
|
+
import I from "../ZlTag/index.vue.mjs";
|
|
9
|
+
/* empty css */
|
|
10
|
+
const ne = { class: "zl-search" }, ie = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "zl-search-search"
|
|
13
|
+
}, ce = { class: "zl-search-search-single" }, ue = { class: "zl-search-form-actions" }, me = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "zl-search-label"
|
|
16
|
+
}, de = { class: "zl-search-label__summary" }, fe = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "zl-search-search-multiple"
|
|
19
|
+
}, ve = { class: "zl-search-form-actions" }, he = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "zl-search__actions"
|
|
22
|
+
}, Se = /* @__PURE__ */ Y({
|
|
23
|
+
name: "ZlSearch",
|
|
24
|
+
__name: "index",
|
|
25
|
+
props: {
|
|
26
|
+
items: { default: () => [] },
|
|
27
|
+
model: {},
|
|
28
|
+
immediate: { type: Boolean, default: !0 },
|
|
29
|
+
disabled: { type: Boolean, default: !1 },
|
|
30
|
+
showLabels: { type: Boolean },
|
|
31
|
+
overflowCount: { default: 4 }
|
|
32
|
+
},
|
|
33
|
+
emits: ["search", "reset"],
|
|
34
|
+
setup(_, { expose: q, emit: D }) {
|
|
35
|
+
const { t: y } = ae(), n = _, T = D, Z = i(() => Object.keys(ee()).filter((e) => e !== "label" && e !== "actions")), L = z(null), S = z(null), c = z(!1), G = i(() => {
|
|
36
|
+
const e = {};
|
|
37
|
+
for (const l of n.items)
|
|
38
|
+
e[l.model] = typeof l.toLabel == "function" ? l.toLabel : U;
|
|
39
|
+
return e;
|
|
40
|
+
}), H = i(() => {
|
|
41
|
+
const e = {};
|
|
42
|
+
for (const l of n.items)
|
|
43
|
+
typeof l.toParams == "function" && (e[l.model] = l.toParams);
|
|
44
|
+
return e;
|
|
45
|
+
}), u = i(() => {
|
|
46
|
+
const e = [];
|
|
47
|
+
for (const l of n.items) {
|
|
48
|
+
if (!l.model)
|
|
49
|
+
throw new Error("[ZlSearch]: form item's model is required!");
|
|
50
|
+
if (!Q(l))
|
|
51
|
+
continue;
|
|
52
|
+
const { toLabel: s, toParams: o, visible: p, ...X } = l;
|
|
53
|
+
e.push(X);
|
|
54
|
+
}
|
|
55
|
+
return e;
|
|
56
|
+
}), J = z(n.model ?? {}), m = i(() => n.model ?? J.value), M = i(() => u.value.reduce((e, l) => {
|
|
57
|
+
const s = H.value[l.model];
|
|
58
|
+
return s ? Object.assign(e, s(m.value[l.model], e)) : { ...e, [l.model]: m.value[l.model] };
|
|
59
|
+
}, {})), R = i(() => u.value.map((e) => ({
|
|
60
|
+
labelValue: G.value[e.model](m.value[e.model]),
|
|
61
|
+
model: e.model,
|
|
62
|
+
label: e.label
|
|
63
|
+
})).filter((e) => e.labelValue)), K = i(() => n.showLabels ?? u.value.length > n.overflowCount);
|
|
64
|
+
function Q(e) {
|
|
65
|
+
const l = e.visible;
|
|
66
|
+
return l === void 0 ? !0 : l === !1 || typeof l == "function" && !l(m.value, e) ? !1 : !!l;
|
|
67
|
+
}
|
|
68
|
+
function U(e) {
|
|
69
|
+
return se(e) ? e.join(", ") : re(e) ? e.label : e;
|
|
70
|
+
}
|
|
71
|
+
async function g() {
|
|
72
|
+
c.value && (c.value = !1), T("search", M.value);
|
|
73
|
+
}
|
|
74
|
+
async function b() {
|
|
75
|
+
try {
|
|
76
|
+
await (c.value ? S.value : L.value)?.validate(), g();
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function P() {
|
|
81
|
+
try {
|
|
82
|
+
const e = c.value ? S.value : L.value;
|
|
83
|
+
e?.resetFields(), await $(), await e?.validate().catch(() => {
|
|
84
|
+
}), T("reset"), await $(), g();
|
|
85
|
+
} catch (e) {
|
|
86
|
+
console.error("[ZlSearch] reset validate error", e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function W(e) {
|
|
90
|
+
delete m.value[e.model];
|
|
91
|
+
}
|
|
92
|
+
return n.immediate && (async () => (await $(), b()))(), q({ params: M, search: g, reset: P }), (e, l) => {
|
|
93
|
+
const s = le("el-button");
|
|
94
|
+
return r(), d("div", ne, [
|
|
95
|
+
u.value.length ? (r(), d("div", ie, [
|
|
96
|
+
k("div", ce, [
|
|
97
|
+
t(A, {
|
|
98
|
+
ref_key: "formRef",
|
|
99
|
+
ref: L,
|
|
100
|
+
class: "zl-search-form",
|
|
101
|
+
model: m.value,
|
|
102
|
+
items: u.value,
|
|
103
|
+
disabled: _.disabled,
|
|
104
|
+
onSubmit: j(b, ["prevent"])
|
|
105
|
+
}, F({
|
|
106
|
+
label: a(({ label: o }) => [
|
|
107
|
+
t(O, null, {
|
|
108
|
+
default: a(() => [
|
|
109
|
+
v(f(o), 1)
|
|
110
|
+
]),
|
|
111
|
+
_: 2
|
|
112
|
+
}, 1024)
|
|
113
|
+
]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, [
|
|
116
|
+
V(Z.value, (o) => ({
|
|
117
|
+
name: o,
|
|
118
|
+
fn: a((p) => [
|
|
119
|
+
B(e.$slots, o, N(x(p)))
|
|
120
|
+
])
|
|
121
|
+
}))
|
|
122
|
+
]), 1032, ["model", "items", "disabled"]),
|
|
123
|
+
k("div", ue, [
|
|
124
|
+
t(s, { onClick: P }, {
|
|
125
|
+
icon: a(() => [
|
|
126
|
+
t(w, { icon: "zl:brush-color" })
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}),
|
|
130
|
+
u.value.length > _.overflowCount ? (r(), E(s, {
|
|
131
|
+
key: 0,
|
|
132
|
+
onClick: l[0] || (l[0] = (o) => c.value = !0)
|
|
133
|
+
}, {
|
|
134
|
+
icon: a(() => [
|
|
135
|
+
t(w, { icon: "zl:filter-color" })
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})) : h("", !0),
|
|
139
|
+
t(s, {
|
|
140
|
+
type: "primary",
|
|
141
|
+
onClick: b
|
|
142
|
+
}, {
|
|
143
|
+
default: a(() => [
|
|
144
|
+
v(f(C(y)("zl.search.search", "查询")), 1)
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
})
|
|
148
|
+
])
|
|
149
|
+
]),
|
|
150
|
+
K.value ? (r(), d("div", me, [
|
|
151
|
+
k("div", de, f(C(y)("zl.search.filterConditions", "筛选条件")), 1),
|
|
152
|
+
R.value.length === 0 ? (r(), E(I, { key: 0 }, {
|
|
153
|
+
default: a(() => [
|
|
154
|
+
v(f(C(y)("zl.search.all", "全部")), 1)
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
})) : h("", !0),
|
|
158
|
+
(r(!0), d(oe, null, V(R.value, (o) => (r(), d("div", {
|
|
159
|
+
key: o.model,
|
|
160
|
+
class: "zl-search-label-item"
|
|
161
|
+
}, [
|
|
162
|
+
t(I, {
|
|
163
|
+
closable: "",
|
|
164
|
+
fill: "",
|
|
165
|
+
color: "primary",
|
|
166
|
+
onClose: (p) => W(o)
|
|
167
|
+
}, {
|
|
168
|
+
default: a(() => [
|
|
169
|
+
v(f(o.labelValue), 1)
|
|
170
|
+
]),
|
|
171
|
+
_: 2
|
|
172
|
+
}, 1032, ["onClose"])
|
|
173
|
+
]))), 128))
|
|
174
|
+
])) : h("", !0),
|
|
175
|
+
t(te, { name: "zl-search-fade-slide" }, {
|
|
176
|
+
default: a(() => [
|
|
177
|
+
c.value ? (r(), d("div", fe, [
|
|
178
|
+
t(A, {
|
|
179
|
+
ref_key: "multipleFormRef",
|
|
180
|
+
ref: S,
|
|
181
|
+
class: "zl-search-form",
|
|
182
|
+
model: m.value,
|
|
183
|
+
items: u.value,
|
|
184
|
+
disabled: _.disabled,
|
|
185
|
+
onSubmit: j(b, ["prevent"])
|
|
186
|
+
}, F({
|
|
187
|
+
label: a(({ label: o }) => [
|
|
188
|
+
t(O, null, {
|
|
189
|
+
default: a(() => [
|
|
190
|
+
v(f(o), 1)
|
|
191
|
+
]),
|
|
192
|
+
_: 2
|
|
193
|
+
}, 1024)
|
|
194
|
+
]),
|
|
195
|
+
_: 2
|
|
196
|
+
}, [
|
|
197
|
+
V(Z.value, (o) => ({
|
|
198
|
+
name: o,
|
|
199
|
+
fn: a((p) => [
|
|
200
|
+
B(e.$slots, o, N(x(p)))
|
|
201
|
+
])
|
|
202
|
+
}))
|
|
203
|
+
]), 1032, ["model", "items", "disabled"]),
|
|
204
|
+
k("div", ve, [
|
|
205
|
+
t(s, { onClick: P }, {
|
|
206
|
+
icon: a(() => [
|
|
207
|
+
t(w, { icon: "zl:brush-color" })
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}),
|
|
211
|
+
t(s, {
|
|
212
|
+
onClick: l[1] || (l[1] = (o) => c.value = !1)
|
|
213
|
+
}, {
|
|
214
|
+
icon: a(() => [
|
|
215
|
+
t(w, { icon: "zl:filter-color" })
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}),
|
|
219
|
+
t(s, {
|
|
220
|
+
type: "primary",
|
|
221
|
+
onClick: b
|
|
222
|
+
}, {
|
|
223
|
+
default: a(() => [
|
|
224
|
+
v(f(C(y)("zl.search.search", "查询")), 1)
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
})
|
|
228
|
+
])
|
|
229
|
+
])) : h("", !0)
|
|
230
|
+
]),
|
|
231
|
+
_: 3
|
|
232
|
+
})
|
|
233
|
+
])) : h("", !0),
|
|
234
|
+
e.$slots.actions ? (r(), d("div", he, [
|
|
235
|
+
B(e.$slots, "actions")
|
|
236
|
+
])) : h("", !0)
|
|
237
|
+
]);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
export {
|
|
242
|
+
Se as default
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-search-table{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.zl-search-table .zl-table{flex:1;padding:0 16px;overflow:hidden}.zl-search-table .zl-table__pagination{margin:10px -16px 0}
|