@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,133 @@
|
|
|
1
|
+
import { defineComponent as L, toRefs as M, ref as b, computed as h, resolveComponent as c, openBlock as s, createBlock as u, mergeProps as i, withCtx as f, createElementBlock as S, Fragment as T, renderList as U, renderSlot as p, createElementVNode as E, toDisplayString as q, createCommentVNode as V, createVNode as x } from "vue";
|
|
2
|
+
import W from "./ZlFormChild.vue.mjs";
|
|
3
|
+
import j from "../ZlIcon/index.vue.mjs";
|
|
4
|
+
const G = { class: "zl-form-item-label" }, w = "onUpdate:modelValue", Q = /* @__PURE__ */ L({
|
|
5
|
+
name: "ZlForm",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
items: { default: () => [] },
|
|
9
|
+
model: {}
|
|
10
|
+
},
|
|
11
|
+
setup(y, { expose: P }) {
|
|
12
|
+
const d = y, { items: v } = M(d), g = b(d.model ?? {}), t = h(() => d.model ?? g.value), I = h(() => {
|
|
13
|
+
const o = [];
|
|
14
|
+
return v.value.forEach((e) => {
|
|
15
|
+
if (!e.model)
|
|
16
|
+
throw new Error("[ZlForm]: form item's model is required!");
|
|
17
|
+
e.defaultValue !== void 0 && t.value[e.model] === void 0 && (t.value[e.model] = e.defaultValue);
|
|
18
|
+
}), v.value.forEach((e) => {
|
|
19
|
+
if (!$(e))
|
|
20
|
+
return;
|
|
21
|
+
const {
|
|
22
|
+
visible: r,
|
|
23
|
+
props: a,
|
|
24
|
+
tooltip: m,
|
|
25
|
+
formItemProps: l = {},
|
|
26
|
+
component: R,
|
|
27
|
+
label: z,
|
|
28
|
+
model: C,
|
|
29
|
+
defaultValue: H,
|
|
30
|
+
slot: B,
|
|
31
|
+
slots: Z,
|
|
32
|
+
...A
|
|
33
|
+
} = e, _ = { ...l };
|
|
34
|
+
delete _.tooltip;
|
|
35
|
+
const D = { ...A, ...a ?? {} };
|
|
36
|
+
o.push({
|
|
37
|
+
formItemProps: _,
|
|
38
|
+
tooltip: m,
|
|
39
|
+
component: R,
|
|
40
|
+
label: z,
|
|
41
|
+
model: C,
|
|
42
|
+
slot: B,
|
|
43
|
+
slots: Z,
|
|
44
|
+
props: k(D, e.model)
|
|
45
|
+
});
|
|
46
|
+
}), o;
|
|
47
|
+
}), n = b(null);
|
|
48
|
+
function $(o) {
|
|
49
|
+
const e = o.visible;
|
|
50
|
+
return e === void 0 ? !0 : e === !1 || typeof e == "function" && !e(t.value, o) ? !1 : !!e;
|
|
51
|
+
}
|
|
52
|
+
function k(o = {}, e) {
|
|
53
|
+
const r = o[w];
|
|
54
|
+
return o[w] = (a) => {
|
|
55
|
+
t.value[e] = a, r?.(a);
|
|
56
|
+
}, o;
|
|
57
|
+
}
|
|
58
|
+
async function F() {
|
|
59
|
+
const o = await n.value?.validate().catch((e) => e);
|
|
60
|
+
if (o !== !0)
|
|
61
|
+
throw o;
|
|
62
|
+
}
|
|
63
|
+
async function N(o) {
|
|
64
|
+
try {
|
|
65
|
+
await n.value?.validateField(o);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
throw e;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return P(new Proxy({ validate: F, validateField: N }, {
|
|
71
|
+
get(o, e, r) {
|
|
72
|
+
return Reflect.get(o, e, r) || n.value?.[e];
|
|
73
|
+
},
|
|
74
|
+
has(o, e) {
|
|
75
|
+
return Reflect.has(o, e) || e in (n.value ?? {});
|
|
76
|
+
}
|
|
77
|
+
})), (o, e) => {
|
|
78
|
+
const r = c("el-tooltip"), a = c("el-form-item"), m = c("el-form");
|
|
79
|
+
return s(), u(m, i({
|
|
80
|
+
ref_key: "formRef",
|
|
81
|
+
ref: n,
|
|
82
|
+
class: "zl-form",
|
|
83
|
+
model: t.value
|
|
84
|
+
}, { labelWidth: "auto", ...o.$attrs }), {
|
|
85
|
+
default: f(() => [
|
|
86
|
+
(s(!0), S(T, null, U(I.value, (l) => (s(), u(a, i({
|
|
87
|
+
key: l.model,
|
|
88
|
+
label: l.label,
|
|
89
|
+
prop: l.model
|
|
90
|
+
}, { ref_for: !0 }, l.formItemProps), {
|
|
91
|
+
label: f(() => [
|
|
92
|
+
E("span", G, [
|
|
93
|
+
o.$slots.label ? p(o.$slots, "label", i({ ref_for: !0 }, { label: l.label, item: l }), () => [
|
|
94
|
+
E("span", null, q(l.label), 1)
|
|
95
|
+
], void 0, 0) : V("", !0),
|
|
96
|
+
l.tooltip ? (s(), u(r, {
|
|
97
|
+
key: 1,
|
|
98
|
+
content: l.tooltip,
|
|
99
|
+
placement: "top"
|
|
100
|
+
}, {
|
|
101
|
+
default: f(() => [
|
|
102
|
+
x(j, {
|
|
103
|
+
class: "zl-form-item-label__tooltip",
|
|
104
|
+
icon: "zl:help-color"
|
|
105
|
+
})
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["content"])) : V("", !0)
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
default: f(() => [
|
|
112
|
+
l.slot ? p(o.$slots, l.model, {
|
|
113
|
+
model: t.value,
|
|
114
|
+
field: l
|
|
115
|
+
}, void 0, void 0, 0) : (s(), u(W, {
|
|
116
|
+
key: 1,
|
|
117
|
+
item: l,
|
|
118
|
+
"model-value": t.value[l.model]
|
|
119
|
+
}, null, 8, ["item", "model-value"]))
|
|
120
|
+
]),
|
|
121
|
+
_: 2
|
|
122
|
+
}, 1040, ["label", "prop"]))), 128)),
|
|
123
|
+
p(o.$slots, "default")
|
|
124
|
+
]),
|
|
125
|
+
_: 3
|
|
126
|
+
}, 16, ["model"]);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
export {
|
|
131
|
+
Q as default
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IGridItem } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: IGridItem & {
|
|
4
|
+
text?: any;
|
|
5
|
+
size?: number | 'auto';
|
|
6
|
+
dict?: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
default?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=ZlGridItem.vue.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as u, inject as v, defineAsyncComponent as y, resolveComponent as f, openBlock as t, createElementBlock as a, normalizeStyle as l, createElementVNode as n, unref as m, toDisplayString as i, renderSlot as g, createBlock as c, mergeProps as k, withCtx as x } from "vue";
|
|
2
|
+
import { ZL_GRID_CONTEXT as h } from "./context.mjs";
|
|
3
|
+
const z = ["data-grid-item-key"], C = { class: "zl-grid-item__content" }, S = {
|
|
4
|
+
key: 3,
|
|
5
|
+
class: "zl-grid-item__value"
|
|
6
|
+
}, D = /* @__PURE__ */ u({
|
|
7
|
+
name: "ZlGridItem",
|
|
8
|
+
__name: "ZlGridItem",
|
|
9
|
+
props: {
|
|
10
|
+
item: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const o = v(h), s = y(() => import("../ZlDictTag/index2.vue.mjs"));
|
|
14
|
+
return (d, b) => {
|
|
15
|
+
const r = f("el-tooltip");
|
|
16
|
+
return t(), a("div", {
|
|
17
|
+
class: "zl-grid-item",
|
|
18
|
+
"data-grid-item-key": e.item.key,
|
|
19
|
+
style: l({ "--grid-item-col": e.item.size })
|
|
20
|
+
}, [
|
|
21
|
+
n("div", {
|
|
22
|
+
class: "zl-grid-item__label",
|
|
23
|
+
style: l({ width: m(o).labelWidth.value })
|
|
24
|
+
}, i(e.item.label) + i(m(o).labelSuffix.value), 5),
|
|
25
|
+
n("div", C, [
|
|
26
|
+
e.item.slot ? g(d.$slots, "default", {}, void 0, void 0, 0) : e.item.dict ? (t(), c(m(s), k({ key: 1 }, e.item.dict, {
|
|
27
|
+
value: e.item.text
|
|
28
|
+
}), null, 16, ["value"])) : e.item.ellipsis ? (t(), c(r, {
|
|
29
|
+
key: 2,
|
|
30
|
+
content: String(e.item.text ?? ""),
|
|
31
|
+
placement: "top"
|
|
32
|
+
}, {
|
|
33
|
+
default: x(() => [
|
|
34
|
+
n("div", {
|
|
35
|
+
class: "ellipsis",
|
|
36
|
+
style: l({ "--ellipsis-line": e.item.ellipsis === !0 ? 1 : e.item.ellipsis })
|
|
37
|
+
}, i(e.item.text), 5)
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 8, ["content"])) : (t(), a("div", S, i(e.item.text), 1))
|
|
41
|
+
])
|
|
42
|
+
], 12, z);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
D as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ZlGridItem.vue.mjs.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
export interface GridContext {
|
|
3
|
+
labelWidth: ComputedRef<string>;
|
|
4
|
+
labelSuffix: Ref<string | undefined>;
|
|
5
|
+
labelPosition: Ref<'left' | 'top' | 'right'>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ZL_GRID_CONTEXT: InjectionKey<GridContext>;
|
|
8
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-grid{width:100%;display:grid;grid-template-columns:repeat(var(--grid-cols),1fr);gap:10px 20px;--font-size: 12px;--color-label: var(--zl-text-2, #4d5e7d);--color-content: var(--zl-text-1, #242e43);--color-border: var(--zl-border-2, #e3e9ef)}.zl-grid--label-right .zl-grid-item__label{text-align:right}.zl-grid--label-top .zl-grid-item{flex-direction:column}.zl-grid--label-top .zl-grid-item__label{border-bottom:1px solid var(--color-border)}.zl-grid--label-top .zl-grid-item__content{align-items:flex-start}.zl-grid-item{grid-column-start:span var(--grid-item-col, 1);display:flex;overflow:hidden}.zl-grid-item__label{font-size:var(--font-size);line-height:calc(1em + 8px);color:var(--color-label);flex:0 0 auto;font-weight:400;padding-right:12px;align-content:center}.zl-grid-item__content{margin-left:0!important;display:flex;align-items:center;color:var(--color-content);font-size:var(--font-size);line-height:calc(1em + 8px);overflow:hidden;width:initial}.zl-grid-item__content .zl-tag{max-width:100%}.zl-grid.is-border{gap:0;border:1px solid var(--color-border);border-width:1px 0 0 1px;border-radius:4px 4px 0;--color-label: var(--zl-text-2, #4d5e7d)}.zl-grid.is-border .zl-grid-item{border:1px solid var(--color-border);border-width:0 1px 1px 0;background:var(--zl-fill-1, #f9fbfd);margin:0}.zl-grid.is-border .zl-grid-item .zl-grid-item__label{padding:4px 20px;border-right:1px solid var(--color-border)}.zl-grid.is-border .zl-grid-item .zl-grid-item__content{padding:4px 20px;background-color:var(--zl-bg-1, #fff);flex:1}.zl-grid .ellipsis{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--ellipsis-line, 1);line-clamp:var(--ellipsis-line, 1);overflow:hidden;word-break:break-all}.zl-grid .zl-tag:not(.zl-tag-fill){padding:0}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IGridItem } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data?: Record<string, any>;
|
|
4
|
+
grid?: IGridItem[];
|
|
5
|
+
cols?: number;
|
|
6
|
+
border?: boolean;
|
|
7
|
+
emptyChecker?: (value: any, key: string, data: Record<string, any>) => boolean;
|
|
8
|
+
labelWidth?: string | number;
|
|
9
|
+
labelSuffix?: string;
|
|
10
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
11
|
+
/** 空值占位文案(缺省走 i18n zl.grid.empty,未接入时兜底"暂无") */
|
|
12
|
+
emptyText?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: Partial<Record<string, (_: {}) => any>> & {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {
|
|
20
|
+
gridRootRef: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
data: Record<string, any>;
|
|
27
|
+
labelWidth: string | number;
|
|
28
|
+
grid: IGridItem[];
|
|
29
|
+
cols: number;
|
|
30
|
+
labelPosition: "left" | "top" | "right";
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
32
|
+
gridRootRef: HTMLDivElement;
|
|
33
|
+
}, HTMLDivElement>;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as R, computed as y, ref as p, onMounted as T, provide as E, toRef as b, openBlock as d, createElementBlock as g, normalizeStyle as P, normalizeClass as h, Fragment as B, renderList as G, createBlock as I, withCtx as L, renderSlot as k, createCommentVNode as M } from "vue";
|
|
2
|
+
import { useZlT as N } from "@zl-ui-kit/composables";
|
|
3
|
+
import { isNumber as Z } from "@zl-ui-kit/utils";
|
|
4
|
+
import q from "./ZlGridItem.vue.mjs";
|
|
5
|
+
import { ZL_GRID_CONTEXT as D } from "./context.mjs";
|
|
6
|
+
const F = /* @__PURE__ */ R({
|
|
7
|
+
name: "ZlGrid",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
data: { default: () => ({}) },
|
|
11
|
+
grid: { default: () => [] },
|
|
12
|
+
cols: { default: 3 },
|
|
13
|
+
border: { type: Boolean },
|
|
14
|
+
emptyChecker: {},
|
|
15
|
+
labelWidth: { default: "auto" },
|
|
16
|
+
labelSuffix: {},
|
|
17
|
+
labelPosition: { default: "left" },
|
|
18
|
+
emptyText: {}
|
|
19
|
+
},
|
|
20
|
+
setup(a) {
|
|
21
|
+
const { t: x } = N(), e = a, v = y(() => {
|
|
22
|
+
const o = [], i = e.emptyText ?? x("zl.grid.empty", "暂无");
|
|
23
|
+
for (const t of e.grid) {
|
|
24
|
+
const { visible: l, key: n, dict: s, getValue: u, size: m, ...W } = t, r = typeof u == "function" ? u(e.data, t.key, t) : e.data[t.key], C = (typeof e.emptyChecker == "function" ? e.emptyChecker(r, n, e.data) : !Z(r) && !r) ? i : r;
|
|
25
|
+
if (l === !1 || typeof l == "function" && !l(r, n, e.data))
|
|
26
|
+
continue;
|
|
27
|
+
const S = o.length, _ = typeof s == "string" ? { dictKey: s } : s, $ = m === "auto" ? e.cols - S % e.cols : m;
|
|
28
|
+
o.push({ ...W, key: n, dict: _, value: r, size: $ ?? 1, text: C });
|
|
29
|
+
}
|
|
30
|
+
return o;
|
|
31
|
+
}), c = p(null), f = p({}), z = y(() => {
|
|
32
|
+
if (e.labelPosition === "top")
|
|
33
|
+
return "100%";
|
|
34
|
+
if (e.labelWidth !== "auto")
|
|
35
|
+
return typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth;
|
|
36
|
+
const o = Math.max(...Object.values(f.value));
|
|
37
|
+
return o ? `${o}px` : "";
|
|
38
|
+
});
|
|
39
|
+
return T(() => {
|
|
40
|
+
const o = {};
|
|
41
|
+
c.value?.querySelectorAll(".zl-grid-item").forEach((i) => {
|
|
42
|
+
const t = i.dataset.gridItemKey, l = i.querySelector(".zl-grid-item__label");
|
|
43
|
+
t && l && (o[t] = l.offsetWidth);
|
|
44
|
+
}), f.value = o;
|
|
45
|
+
}), E(D, {
|
|
46
|
+
labelWidth: z,
|
|
47
|
+
labelSuffix: b(e, "labelSuffix"),
|
|
48
|
+
labelPosition: b(e, "labelPosition")
|
|
49
|
+
}), (o, i) => (d(), g("div", {
|
|
50
|
+
ref_key: "gridRootRef",
|
|
51
|
+
ref: c,
|
|
52
|
+
class: h(["zl-grid", [{ "is-border": a.border }, `zl-grid--label-${a.labelPosition}`]]),
|
|
53
|
+
style: P({ "--grid-cols": a.cols })
|
|
54
|
+
}, [
|
|
55
|
+
(d(!0), g(B, null, G(v.value, (t) => (d(), I(q, {
|
|
56
|
+
key: t.key,
|
|
57
|
+
class: h([`grid__${t.key}`]),
|
|
58
|
+
item: t
|
|
59
|
+
}, {
|
|
60
|
+
default: L(() => [
|
|
61
|
+
t.slot ? k(o.$slots, t.key, {}, void 0, void 0, 0) : M("", !0)
|
|
62
|
+
]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["class", "item"]))), 128)),
|
|
65
|
+
k(o.$slots, "default")
|
|
66
|
+
], 6));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
F as default
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** ZlGrid 子项 schema */
|
|
2
|
+
export interface IGridItem {
|
|
3
|
+
label: string;
|
|
4
|
+
key: string;
|
|
5
|
+
/** 跨列数('auto' 占满剩余列) */
|
|
6
|
+
size?: number | 'auto';
|
|
7
|
+
getValue?: (data: Record<string, any>, key: string, item: IGridItem) => any;
|
|
8
|
+
visible?: boolean | ((value: unknown, key: string, data: Record<string, any>) => boolean);
|
|
9
|
+
dict?: string | {
|
|
10
|
+
dictKey: string;
|
|
11
|
+
simple?: boolean;
|
|
12
|
+
showType?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** 是否启用具名插槽(#key)渲染 */
|
|
15
|
+
slot?: boolean;
|
|
16
|
+
/** 溢出省略行数(悬浮提示) */
|
|
17
|
+
ellipsis?: number | boolean;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-horizontal-table[data-v-e6b52e78]{border:1px solid var(--zl-border-2, #e3e9ef);border-bottom:none}.zl-horizontal-table__row[data-v-e6b52e78]{display:flex;flex-direction:row;border-bottom:1px solid var(--zl-border-2, #e3e9ef);align-items:stretch}.zl-horizontal-table__label[data-v-e6b52e78]{border-right:1px solid var(--zl-border-2, #e3e9ef);background:var(--zl-fill-2, #eff4f9);font-weight:400;font-size:12px;line-height:20px;color:var(--zl-text-2, #4d5e7d);padding:10px;display:flex;align-items:center}.zl-horizontal-table__value[data-v-e6b52e78]{flex:1;font-weight:400;font-size:12px;line-height:20px;color:var(--zl-text-1, #242e43);padding:10px}.zl-horizontal-table__value.ellipsis[data-v-e6b52e78]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface HorizontalTableItem {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: any;
|
|
4
|
+
/** 栅格跨度(24 栅格) */
|
|
5
|
+
span?: number;
|
|
6
|
+
/** 具名插槽名(渲染自定义值) */
|
|
7
|
+
slot?: string;
|
|
8
|
+
/** 值过长时悬浮提示 */
|
|
9
|
+
tooltip?: boolean;
|
|
10
|
+
/** 关闭省略 */
|
|
11
|
+
noEllipsis?: boolean;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
items?: HorizontalTableItem[];
|
|
16
|
+
span?: number | string;
|
|
17
|
+
labelWidth?: string;
|
|
18
|
+
labelAlign?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function __VLS_template(): {
|
|
21
|
+
attrs: Partial<{}>;
|
|
22
|
+
slots: Partial<Record<string, (_: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
label: string;
|
|
25
|
+
value?: any;
|
|
26
|
+
/** 栅格跨度(24 栅格) */
|
|
27
|
+
span?: number;
|
|
28
|
+
/** 具名插槽名(渲染自定义值) */
|
|
29
|
+
slot?: string;
|
|
30
|
+
/** 值过长时悬浮提示 */
|
|
31
|
+
tooltip?: boolean;
|
|
32
|
+
/** 关闭省略 */
|
|
33
|
+
noEllipsis?: boolean;
|
|
34
|
+
}) => any>>;
|
|
35
|
+
refs: {};
|
|
36
|
+
rootEl: any;
|
|
37
|
+
};
|
|
38
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
39
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
40
|
+
span: number | string;
|
|
41
|
+
items: HorizontalTableItem[];
|
|
42
|
+
labelWidth: string;
|
|
43
|
+
labelAlign: string;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import o from "./index2.vue.mjs";
|
|
2
|
+
import './index.css';/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e6b52e78"]]);
|
|
5
|
+
export {
|
|
6
|
+
m as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as b, resolveComponent as n, openBlock as l, createBlock as a, withCtx as s, createElementBlock as p, Fragment as h, renderList as m, createElementVNode as t, normalizeStyle as z, toDisplayString as r, normalizeClass as v, renderSlot as y, mergeProps as g } from "vue";
|
|
2
|
+
const k = { class: "zl-horizontal-table__row" }, w = { key: 2 }, S = /* @__PURE__ */ b({
|
|
3
|
+
name: "ZlHorizontalTable",
|
|
4
|
+
__name: "index",
|
|
5
|
+
props: {
|
|
6
|
+
items: { default: () => [] },
|
|
7
|
+
span: { default: 24 },
|
|
8
|
+
labelWidth: { default: "88px" },
|
|
9
|
+
labelAlign: { default: "center" }
|
|
10
|
+
},
|
|
11
|
+
setup(c) {
|
|
12
|
+
const o = c;
|
|
13
|
+
return (i, x) => {
|
|
14
|
+
const _ = n("el-tooltip"), u = n("el-col"), d = n("el-row");
|
|
15
|
+
return l(), a(d, { class: "zl-horizontal-table" }, {
|
|
16
|
+
default: s(() => [
|
|
17
|
+
(l(!0), p(h, null, m(c.items, (e, f) => (l(), a(u, {
|
|
18
|
+
key: f,
|
|
19
|
+
span: e.span || Number(o.span)
|
|
20
|
+
}, {
|
|
21
|
+
default: s(() => [
|
|
22
|
+
t("div", k, [
|
|
23
|
+
t("div", {
|
|
24
|
+
class: "zl-horizontal-table__label",
|
|
25
|
+
style: z({ width: o.labelWidth || "88px", justifyContent: o.labelAlign || "center" })
|
|
26
|
+
}, r(e.label), 5),
|
|
27
|
+
t("div", {
|
|
28
|
+
class: v(["zl-horizontal-table__value", { ellipsis: !e.noEllipsis }])
|
|
29
|
+
}, [
|
|
30
|
+
e.slot ? y(i.$slots, e.slot, g({ ref_for: !0 }, e), void 0, !0, 0) : e.tooltip ? (l(), a(_, {
|
|
31
|
+
key: 1,
|
|
32
|
+
content: String(e.value ?? ""),
|
|
33
|
+
placement: "top"
|
|
34
|
+
}, {
|
|
35
|
+
default: s(() => [
|
|
36
|
+
t("span", null, r(e.value), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 2
|
|
39
|
+
}, 1032, ["content"])) : (l(), p("span", w, r(e.value), 1))
|
|
40
|
+
], 2)
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["span"]))), 128))
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
S as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as l, createBlock as a, unref as e, withCtx as n, renderSlot as c } from "vue";
|
|
2
|
+
import { ElConfigProvider as s } from "element-plus";
|
|
3
|
+
import { useMicroGlobalData as i } from "@zl-ui-kit/composables";
|
|
4
|
+
const _ = /* @__PURE__ */ t({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(f) {
|
|
7
|
+
const { elLocaleMessages: o } = i();
|
|
8
|
+
return (r, m) => (l(), a(e(s), {
|
|
9
|
+
locale: e(o) || void 0
|
|
10
|
+
}, {
|
|
11
|
+
default: n(() => [
|
|
12
|
+
c(r.$slots, "default")
|
|
13
|
+
]),
|
|
14
|
+
_: 3
|
|
15
|
+
}, 8, ["locale"]));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
_ as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-icon[data-v-40e3d486]{display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1}.zl-icon--external[data-v-40e3d486]{width:1em;height:1em;background-color:currentColor;mask-size:100% 100%}.zl-icon--local[data-v-40e3d486]{width:1em;height:1em;fill:currentColor}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 图标:zl:xxx(本地图标集)/ http(s) 地址 / 本地 svg sprite 名称 */
|
|
3
|
+
icon: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import o from "./index2.vue.mjs";
|
|
2
|
+
import './index.css';/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-40e3d486"]]);
|
|
5
|
+
export {
|
|
6
|
+
_ as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as a, computed as t, openBlock as n, createElementBlock as c, renderSlot as u, createBlock as d, unref as m, normalizeStyle as f, createElementVNode as k, createCommentVNode as h } from "vue";
|
|
2
|
+
import { Icon as v } from "@iconify/vue/offline";
|
|
3
|
+
const x = { class: "zl-icon" }, y = {
|
|
4
|
+
key: 2,
|
|
5
|
+
class: "zl-icon--local"
|
|
6
|
+
}, I = ["xlink:href"], E = /* @__PURE__ */ a({
|
|
7
|
+
name: "ZlIcon",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
icon: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const o = e, l = t(() => o.icon.startsWith("http")), i = t(() => o.icon.includes(":")), r = t(() => `#icon-${o.icon}`);
|
|
14
|
+
return (s, p) => (n(), c("div", x, [
|
|
15
|
+
u(s.$slots, "default", {}, () => [
|
|
16
|
+
i.value ? (n(), d(m(v), {
|
|
17
|
+
key: 0,
|
|
18
|
+
id: e.icon,
|
|
19
|
+
icon: e.icon
|
|
20
|
+
}, null, 8, ["id", "icon"])) : l.value ? (n(), c("div", {
|
|
21
|
+
key: 1,
|
|
22
|
+
style: f({ mask: `url(${e.icon}) no-repeat 50% 50%` }),
|
|
23
|
+
class: "zl-icon--external"
|
|
24
|
+
}, null, 4)) : e.icon ? (n(), c("svg", y, [
|
|
25
|
+
k("use", { "xlink:href": r.value }, null, 8, I)
|
|
26
|
+
])) : h("", !0)
|
|
27
|
+
], !0)
|
|
28
|
+
]));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
E as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=index.vue.d.ts.map
|