@zl-ui-kit/components 0.0.0-stage → 0.3.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/LICENSE +21 -0
- 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 +112 -3
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineComponent as Z, useSlots as x, ref as K, computed as i, watch as M, resolveDirective as V, withDirectives as A, openBlock as o, createElementBlock as q, normalizeStyle as F, createBlock as p, createSlots as L, withCtx as P, renderSlot as g, renderList as S, normalizeProps as G, guardReactiveProps as H, createCommentVNode as k, createElementVNode as z, Fragment as J, mergeProps as $, unref as h } from "vue";
|
|
2
|
+
import { usePageableRequest as Q } from "@zl-ui-kit/composables";
|
|
3
|
+
import { isArray as w } from "@zl-ui-kit/utils";
|
|
4
|
+
import T from "../ZlEmpty/index.vue.mjs";
|
|
5
|
+
import U from "../ZlPagination/index.vue.mjs";
|
|
6
|
+
import X from "../ZlSearch/index.vue.mjs";
|
|
7
|
+
import '../ZlSearch/index.css';/* empty css */
|
|
8
|
+
import { usePagination as Y } from "../ZlPagination/usePagination.mjs";
|
|
9
|
+
const ee = { class: "zl-card-page__content" }, te = { class: "zl-card-page__list" }, B = "search-", ce = /* @__PURE__ */ Z({
|
|
10
|
+
name: "ZlCardPage",
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
immediate: { type: Boolean, default: !0 },
|
|
14
|
+
request: {},
|
|
15
|
+
queryItems: { default: () => [] },
|
|
16
|
+
pagination: { type: [Object, Boolean], default: !0 },
|
|
17
|
+
itemKey: { default: "id" },
|
|
18
|
+
cardMinWidth: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["search-reset"],
|
|
21
|
+
setup(s, { expose: C, emit: R }) {
|
|
22
|
+
const a = s, b = R, D = x(), l = K(null), v = i(() => {
|
|
23
|
+
const e = { manual: !0, initialData: [] };
|
|
24
|
+
return typeof a.request == "function" ? { service: a.request, options: e } : {
|
|
25
|
+
...a.request,
|
|
26
|
+
options: Object.assign({ initialData: [] }, a.request.options, { manual: !0 })
|
|
27
|
+
};
|
|
28
|
+
}), { loading: E, data: n, run: I, params: N, refresh: _ } = Q(v.value.service, v.value.options), j = i(() => N.value?.[0]), O = i(() => {
|
|
29
|
+
if (w(n.value))
|
|
30
|
+
return a.pagination && { total: n.value.length, ...a.pagination };
|
|
31
|
+
{
|
|
32
|
+
const { pageNum: e, pageSize: t, total: d = 0 } = n.value;
|
|
33
|
+
return { pageNum: e, pageSize: t, total: d };
|
|
34
|
+
}
|
|
35
|
+
}), u = Y(() => O.value ?? !1), y = i(() => w(n.value) ? n.value : n.value?.rows ?? []), W = i(() => {
|
|
36
|
+
const e = [];
|
|
37
|
+
return Object.keys(D).forEach((t) => {
|
|
38
|
+
t.startsWith(B) && t !== "search-actions" && e.push(t.slice(B.length));
|
|
39
|
+
}), e;
|
|
40
|
+
});
|
|
41
|
+
let m;
|
|
42
|
+
function c(e, t = { pageNum: 1, pageSize: u.value !== !1 ? u.value.pageSize : 30 }) {
|
|
43
|
+
m = {
|
|
44
|
+
...m,
|
|
45
|
+
...e,
|
|
46
|
+
...t
|
|
47
|
+
}, I(m);
|
|
48
|
+
}
|
|
49
|
+
return M(
|
|
50
|
+
() => a.immediate,
|
|
51
|
+
(e) => {
|
|
52
|
+
e && !a.queryItems.length && c();
|
|
53
|
+
},
|
|
54
|
+
{ immediate: !0, once: !0 }
|
|
55
|
+
), C({
|
|
56
|
+
refresh: _,
|
|
57
|
+
params: j,
|
|
58
|
+
search: new Proxy({}, {
|
|
59
|
+
get(e, t) {
|
|
60
|
+
return !l.value && t === "search" ? c : l.value?.[t];
|
|
61
|
+
},
|
|
62
|
+
has(e, t) {
|
|
63
|
+
return t in (l.value ?? {});
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
}), (e, t) => {
|
|
67
|
+
const d = V("loading");
|
|
68
|
+
return A((o(), q("div", {
|
|
69
|
+
class: "zl-card-page",
|
|
70
|
+
style: F({ "--card-min-width": s.cardMinWidth })
|
|
71
|
+
}, [
|
|
72
|
+
s.queryItems.length || e.$slots["search-actions"] ? (o(), p(X, {
|
|
73
|
+
key: 0,
|
|
74
|
+
ref_key: "searchRef",
|
|
75
|
+
ref: l,
|
|
76
|
+
items: s.queryItems,
|
|
77
|
+
immediate: s.immediate,
|
|
78
|
+
onSearch: c,
|
|
79
|
+
onReset: t[0] || (t[0] = (r) => b("search-reset"))
|
|
80
|
+
}, L({ _: 2 }, [
|
|
81
|
+
e.$slots["search-actions"] ? {
|
|
82
|
+
name: "actions",
|
|
83
|
+
fn: P(() => [
|
|
84
|
+
g(e.$slots, "search-actions")
|
|
85
|
+
]),
|
|
86
|
+
key: "0"
|
|
87
|
+
} : void 0,
|
|
88
|
+
S(W.value, (r) => ({
|
|
89
|
+
name: r,
|
|
90
|
+
fn: P((f) => [
|
|
91
|
+
g(e.$slots, `search-${r}`, G(H(f)))
|
|
92
|
+
])
|
|
93
|
+
}))
|
|
94
|
+
]), 1032, ["items", "immediate"])) : k("", !0),
|
|
95
|
+
z("div", ee, [
|
|
96
|
+
z("div", te, [
|
|
97
|
+
y.value.length ? (o(!0), q(J, { key: 0 }, S(y.value, (r, f) => g(e.$slots, "default", $({
|
|
98
|
+
key: r[s.itemKey] || f
|
|
99
|
+
}, { ref_for: !0 }, { data: r }))), 128)) : (o(), p(T, { key: 1 }))
|
|
100
|
+
])
|
|
101
|
+
]),
|
|
102
|
+
s.pagination && h(u) !== !1 ? (o(), p(U, $({ key: 1 }, h(u), {
|
|
103
|
+
onChange: t[1] || (t[1] = (r) => c(void 0, r))
|
|
104
|
+
}), null, 16)) : k("", !0)
|
|
105
|
+
], 4)), [
|
|
106
|
+
[d, h(E)]
|
|
107
|
+
]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
ce as default
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-chart{width:100%;height:100%}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 系列(单对象或数组);其余图表配置经 attrs 透传(title/xAxis/yAxis/tooltip 等,可用 src/utils/echarts 工具构造) */
|
|
3
|
+
series?: Record<string, any> | Array<Record<string, any>>;
|
|
4
|
+
};
|
|
5
|
+
declare function clear(): void;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
7
|
+
clear: typeof clear;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
9
|
+
chartRef: HTMLDivElement;
|
|
10
|
+
}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as m, useAttrs as v, computed as h, shallowRef as d, ref as _, watch as x, onMounted as k, onScopeDispose as w, openBlock as R, createElementBlock as y, nextTick as o } from "vue";
|
|
2
|
+
import { useResizeObserver as z } from "@vueuse/core";
|
|
3
|
+
import * as O from "echarts";
|
|
4
|
+
const C = /* @__PURE__ */ m({
|
|
5
|
+
name: "ZlChart",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
series: {}
|
|
10
|
+
},
|
|
11
|
+
setup(a, { expose: c }) {
|
|
12
|
+
const i = a, l = v(), s = h(() => {
|
|
13
|
+
const { series: f, ...n } = l;
|
|
14
|
+
return {
|
|
15
|
+
...n,
|
|
16
|
+
series: [].concat(i.series ?? [])
|
|
17
|
+
};
|
|
18
|
+
}), e = d(), t = _();
|
|
19
|
+
async function r() {
|
|
20
|
+
await o(), e.value?.setOption(s.value);
|
|
21
|
+
}
|
|
22
|
+
async function u() {
|
|
23
|
+
await o(), t.value && (e.value = O.init(t.value), r());
|
|
24
|
+
}
|
|
25
|
+
function p() {
|
|
26
|
+
e.value?.clear();
|
|
27
|
+
}
|
|
28
|
+
return z(t, () => {
|
|
29
|
+
e.value?.resize();
|
|
30
|
+
}), x(() => s.value, () => {
|
|
31
|
+
r();
|
|
32
|
+
}), k(() => {
|
|
33
|
+
u();
|
|
34
|
+
}), w(() => {
|
|
35
|
+
e.value?.dispose();
|
|
36
|
+
}), c({
|
|
37
|
+
clear: p
|
|
38
|
+
}), (f, n) => (R(), y("div", {
|
|
39
|
+
ref_key: "chartRef",
|
|
40
|
+
ref: t,
|
|
41
|
+
class: "zl-chart"
|
|
42
|
+
}, null, 512));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
C as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-check[data-v-b48128de]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.zl-check__all[data-v-b48128de]{margin-bottom:4px}.zl-check[data-v-b48128de] .el-checkbox:not(.zl-check__all){padding:5px;background:var(--zl-primary-1, var(--el-color-primary-light-9, #e8f3ff))}.zl-check[data-v-b48128de] .el-checkbox:not(.zl-check__all):hover{background:var(--zl-fill-3, #e3e9ef)}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CheckAllOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
options?: CheckAllOption[];
|
|
9
|
+
model?: Array<string | number>;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:model": (value: (string | number)[]) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:model"?: ((value: (string | number)[]) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
model: Array<string | number>;
|
|
17
|
+
options: CheckAllOption[];
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
20
|
+
//# 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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b48128de"]]);
|
|
5
|
+
export {
|
|
6
|
+
p as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineComponent as C, computed as n, resolveComponent as m, openBlock as a, createElementBlock as i, createVNode as r, withCtx as d, createTextVNode as p, toDisplayString as h, unref as A, Fragment as V, renderList as z, createBlock as B } from "vue";
|
|
2
|
+
import { useZlT as y } from "@zl-ui-kit/composables";
|
|
3
|
+
const N = { class: "zl-check" }, w = /* @__PURE__ */ C({
|
|
4
|
+
name: "ZlCheckAll",
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
options: { default: () => [] },
|
|
8
|
+
model: { default: () => [] }
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:model"],
|
|
11
|
+
setup(o, { emit: v }) {
|
|
12
|
+
const { t: _ } = y(), e = o, c = v, k = n(() => e.model.length === e.options.length && e.options.length > 0), f = n(() => e.model.length > 0 && e.model.length < e.options.length), g = n(() => e.options.map((t) => t.value));
|
|
13
|
+
function x(t) {
|
|
14
|
+
c("update:model", t ? g.value : []);
|
|
15
|
+
}
|
|
16
|
+
return (t, u) => {
|
|
17
|
+
const s = m("el-checkbox"), b = m("el-checkbox-group");
|
|
18
|
+
return a(), i("div", N, [
|
|
19
|
+
r(s, {
|
|
20
|
+
class: "zl-check__all",
|
|
21
|
+
"model-value": k.value,
|
|
22
|
+
indeterminate: f.value,
|
|
23
|
+
onChange: x
|
|
24
|
+
}, {
|
|
25
|
+
default: d(() => [
|
|
26
|
+
p(h(A(_)("zl.checkAll.selectAll", "全选")), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
}, 8, ["model-value", "indeterminate"]),
|
|
30
|
+
r(b, {
|
|
31
|
+
"model-value": o.model,
|
|
32
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => c("update:model", l ?? []))
|
|
33
|
+
}, {
|
|
34
|
+
default: d(() => [
|
|
35
|
+
(a(!0), i(V, null, z(o.options, (l) => (a(), B(s, {
|
|
36
|
+
key: l.value,
|
|
37
|
+
value: l.value,
|
|
38
|
+
disabled: l.disabled
|
|
39
|
+
}, {
|
|
40
|
+
default: d(() => [
|
|
41
|
+
p(h(l.label), 1)
|
|
42
|
+
]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["value", "disabled"]))), 128))
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["model-value"])
|
|
48
|
+
]);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
w as default
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-checkbox-tag{display:inline-flex;flex-wrap:wrap;gap:8px}.zl-checkbox-tag .zl-tag-fill:not(.zl-tag-selected){border-color:transparent;background-color:var(--zl-fill-2)}.zl-checkbox-tag .zl-tag-fill:not(.zl-tag-selected):hover:not(.zl-tag-disabled){background-color:var(--zl-fill-3)}.zl-checkbox-tag .zl-tag.zl-tag-selected:not(.zl-tag-disabled):hover{background-color:var(--tag-color-fill)}.zl-checkbox-tag .zl-tag-disabled{color:var(--zl-text-4)}.zl-checkbox-tag .zl-tag-disabled.zl-tag-selected{background-color:var(--zl-primary-1);color:var(--zl-primary-3);border-color:var(--zl-primary-3)}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface CheckboxTagOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
icon?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** 互斥项:true 单互斥组;string 为互斥组名(同组互斥、跨组替换) */
|
|
7
|
+
exclusive?: boolean | string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
options?: CheckboxTagOption[];
|
|
12
|
+
/** 单选模式(值为单值) */
|
|
13
|
+
single?: boolean;
|
|
14
|
+
rounded?: boolean;
|
|
15
|
+
bordered?: boolean;
|
|
16
|
+
fill?: boolean;
|
|
17
|
+
size?: 'mini' | 'small' | 'medium';
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = {
|
|
20
|
+
modelValue?: any;
|
|
21
|
+
} & __VLS_Props;
|
|
22
|
+
declare function __VLS_template(): {
|
|
23
|
+
attrs: Partial<{}>;
|
|
24
|
+
slots: {
|
|
25
|
+
default?(_: {
|
|
26
|
+
item: CheckboxTagOption;
|
|
27
|
+
checked: boolean;
|
|
28
|
+
}): any;
|
|
29
|
+
};
|
|
30
|
+
refs: {};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
|
+
"update:modelValue": (value: any) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
fill: boolean;
|
|
40
|
+
size: "mini" | "small" | "medium";
|
|
41
|
+
bordered: boolean;
|
|
42
|
+
rounded: boolean;
|
|
43
|
+
options: CheckboxTagOption[];
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
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,68 @@
|
|
|
1
|
+
import { defineComponent as x, useModel as g, computed as i, ref as h, openBlock as r, createElementBlock as v, Fragment as b, renderList as k, createBlock as m, withCtx as y, renderSlot as B, mergeProps as C, createTextVNode as z, toDisplayString as S, mergeModels as V } from "vue";
|
|
2
|
+
import E from "../ZlTag/index.vue.mjs";
|
|
3
|
+
import '../ZlTag/index.css';/* empty css */
|
|
4
|
+
const M = { class: "zl-checkbox-tag" }, T = /* @__PURE__ */ x({
|
|
5
|
+
name: "ZlCheckboxTag",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: /* @__PURE__ */ V({
|
|
8
|
+
options: { default: () => [] },
|
|
9
|
+
single: { type: Boolean },
|
|
10
|
+
rounded: { type: Boolean, default: !0 },
|
|
11
|
+
bordered: { type: Boolean, default: !0 },
|
|
12
|
+
fill: { type: Boolean, default: !0 },
|
|
13
|
+
size: { default: "small" }
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: {},
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
}),
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(o) {
|
|
20
|
+
const s = o, a = g(o, "modelValue"), c = i(() => s.options.some((e) => e.exclusive)), d = h();
|
|
21
|
+
if (c.value && a.value) {
|
|
22
|
+
const e = s.options.find((u) => u.value === a.value[0]);
|
|
23
|
+
d.value = e?.exclusive;
|
|
24
|
+
}
|
|
25
|
+
const t = i(() => new Set(s.single ? [a.value] : a.value ?? []));
|
|
26
|
+
function f(e) {
|
|
27
|
+
if (e.disabled)
|
|
28
|
+
return;
|
|
29
|
+
const u = s.single ? [a.value] : [...a.value ?? []], l = u.includes(e.value);
|
|
30
|
+
if (c.value && !l) {
|
|
31
|
+
const n = e;
|
|
32
|
+
n.exclusive === !0 || n.exclusive !== d.value ? (a.value = [e.value], d.value = n.exclusive) : a.value = [...u, e.value];
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (l) {
|
|
36
|
+
const n = u.filter((p) => p !== e.value);
|
|
37
|
+
a.value = s.single ? n[0] : n;
|
|
38
|
+
} else
|
|
39
|
+
s.single ? a.value = e.value : a.value = [...u, e.value];
|
|
40
|
+
}
|
|
41
|
+
return (e, u) => (r(), v("div", M, [
|
|
42
|
+
(r(!0), v(b, null, k(o.options, (l) => (r(), m(E, {
|
|
43
|
+
key: l.value,
|
|
44
|
+
fill: o.fill,
|
|
45
|
+
rounded: o.rounded,
|
|
46
|
+
color: t.value.has(l.value) ? "primary" : void 0,
|
|
47
|
+
bordered: t.value.has(l.value) && o.bordered,
|
|
48
|
+
selectable: "",
|
|
49
|
+
selected: t.value.has(l.value),
|
|
50
|
+
disabled: l.disabled,
|
|
51
|
+
icon: l.icon,
|
|
52
|
+
size: o.size,
|
|
53
|
+
onClick: (n) => f(l)
|
|
54
|
+
}, {
|
|
55
|
+
default: y(() => [
|
|
56
|
+
B(e.$slots, "default", C({ ref_for: !0 }, { item: l, checked: t.value.has(l.value) }), () => [
|
|
57
|
+
z(S(l.label), 1)
|
|
58
|
+
])
|
|
59
|
+
]),
|
|
60
|
+
_: 2
|
|
61
|
+
}, 1032, ["fill", "rounded", "color", "bordered", "selected", "disabled", "icon", "size", "onClick"]))), 128))
|
|
62
|
+
]));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
T as default
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const o = window.navigator, n = o && "clipboard" in o;
|
|
2
|
+
function a(e) {
|
|
3
|
+
const t = document.createElement("textarea");
|
|
4
|
+
t.value = e ?? "", t.style.position = "absolute", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
5
|
+
}
|
|
6
|
+
async function c(e) {
|
|
7
|
+
e != null && (n ? await o.clipboard.writeText(e) : a(e));
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=copy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-copy[data-v-4138f7a5]{max-width:100%;display:inline-flex;align-items:center;gap:12px}.zl-copy__text[data-v-4138f7a5]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as copy } from './copy';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
text?: string;
|
|
4
|
+
copyText?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
trigger?(_: {
|
|
11
|
+
copy: typeof copy;
|
|
12
|
+
}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {
|
|
15
|
+
textRef: HTMLSpanElement;
|
|
16
|
+
};
|
|
17
|
+
rootEl: HTMLDivElement;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
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, {
|
|
21
|
+
textRef: HTMLSpanElement;
|
|
22
|
+
}, HTMLDivElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# 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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4138f7a5"]]);
|
|
5
|
+
export {
|
|
6
|
+
f as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as m, ref as x, resolveComponent as y, openBlock as d, createElementBlock as _, createElementVNode as s, renderSlot as l, toDisplayString as r, unref as p, createVNode as z, withCtx as C, createTextVNode as h } from "vue";
|
|
2
|
+
import { useZlT as g } from "@zl-ui-kit/composables";
|
|
3
|
+
import { ElMessage as a } from "element-plus";
|
|
4
|
+
import i from "./copy.mjs";
|
|
5
|
+
const k = { class: "zl-copy" }, T = ["title"], B = /* @__PURE__ */ m({
|
|
6
|
+
name: "ZlCopy",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
text: {},
|
|
10
|
+
copyText: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const c = e, { t: o } = g(), n = x(null);
|
|
14
|
+
function u() {
|
|
15
|
+
try {
|
|
16
|
+
const t = c.copyText ?? c.text ?? n.value?.textContent ?? "";
|
|
17
|
+
i(t), a.success(o("zl.copy.success", "复制成功"));
|
|
18
|
+
} catch {
|
|
19
|
+
a.error(o("zl.copy.failed", "复制失败"));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return (t, b) => {
|
|
23
|
+
const f = y("el-button");
|
|
24
|
+
return d(), _("div", k, [
|
|
25
|
+
s("span", {
|
|
26
|
+
ref_key: "textRef",
|
|
27
|
+
ref: n,
|
|
28
|
+
class: "zl-copy__text"
|
|
29
|
+
}, [
|
|
30
|
+
l(t.$slots, "default", {}, () => [
|
|
31
|
+
s("span", { title: e.text }, r(e.text), 9, T)
|
|
32
|
+
], !0)
|
|
33
|
+
], 512),
|
|
34
|
+
l(t.$slots, "trigger", { copy: p(i) }, () => [
|
|
35
|
+
z(f, {
|
|
36
|
+
size: "small",
|
|
37
|
+
text: "",
|
|
38
|
+
class: "zl-copy__button",
|
|
39
|
+
onClick: u
|
|
40
|
+
}, {
|
|
41
|
+
default: C(() => [
|
|
42
|
+
h(r(p(o)("zl.copy.copy", "复制")), 1)
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
})
|
|
46
|
+
], !0)
|
|
47
|
+
]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
B as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zl-description{display:inline-flex;gap:0 16px;font-size:12px;line-height:20px;white-space:nowrap;flex-wrap:wrap}.zl-description-type-secondary{padding:0 8px;background-color:var(--zl-fill-2, #eff4f9);border-radius:var(--zl-radius-small, 2px)}.zl-description-type-secondary .zl-description-item:not(:last-child):after{content:"";display:inline-block;height:12px;width:1px;background-color:var(--zl-border-2, #e3e9ef);position:absolute;top:4px;right:-8px}.zl-description-item{position:relative;display:inline-flex;align-items:center;gap:2px}.zl-description-item-icon{color:var(--zl-text-2, #4d5e7d)}.zl-description-item-label{color:var(--zl-text-3, #79879c);margin-right:10px}.zl-description-item-value{color:var(--zl-text-1, #242e43)}.zl-description .zl-tag:not(.zl-tag-fill){padding:0}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface DescriptionItem {
|
|
2
|
+
label: string;
|
|
3
|
+
key: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
/** 取值函数(缺省取 data[key]) */
|
|
6
|
+
getValue?: (data: Record<string, any>, key: string, item: DescriptionItem) => any;
|
|
7
|
+
/** 字典(string 视为 dictKey) */
|
|
8
|
+
dict?: string | Record<string, any>;
|
|
9
|
+
/** 显隐(false 或函数返回 false 时跳过) */
|
|
10
|
+
visible?: boolean | ((value: any, key: string, data: Record<string, any>) => boolean);
|
|
11
|
+
/** 是否启用具名插槽(#key)渲染值 */
|
|
12
|
+
slot?: boolean;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
items: DescriptionItem[];
|
|
17
|
+
data?: Record<string, any>;
|
|
18
|
+
emptyChecker?: (value: any, key: string, data: Record<string, any>) => boolean;
|
|
19
|
+
/** 空值占位文案(缺省走 i18n zl.description.empty,未接入时兜底"暂无") */
|
|
20
|
+
emptyText?: string;
|
|
21
|
+
secondary?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
attrs: Partial<{}>;
|
|
25
|
+
slots: Partial<Record<any, (_: {}) => any>>;
|
|
26
|
+
refs: {};
|
|
27
|
+
rootEl: HTMLDivElement;
|
|
28
|
+
};
|
|
29
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
30
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
31
|
+
data: Record<string, any>;
|
|
32
|
+
emptyChecker: (value: any, key: string, data: Record<string, any>) => boolean;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, 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,59 @@
|
|
|
1
|
+
import { defineComponent as g, computed as h, defineAsyncComponent as T, resolveComponent as b, openBlock as n, createElementBlock as r, normalizeClass as B, Fragment as m, renderList as D, createBlock as u, createCommentVNode as E, createElementVNode as y, toDisplayString as f, unref as N, mergeProps as V, renderSlot as Z, createTextVNode as F } from "vue";
|
|
2
|
+
import { useZlT as S } from "@zl-ui-kit/composables";
|
|
3
|
+
import { isNumber as A } from "@zl-ui-kit/utils";
|
|
4
|
+
const I = { class: "zl-description-item-label" }, K = { class: "zl-description-item-value" }, q = /* @__PURE__ */ g({
|
|
5
|
+
name: "ZlDescription",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
items: {},
|
|
9
|
+
data: { default: () => ({}) },
|
|
10
|
+
emptyChecker: { type: Function, default: (s) => !s && !A(s) },
|
|
11
|
+
emptyText: {},
|
|
12
|
+
secondary: { type: Boolean }
|
|
13
|
+
},
|
|
14
|
+
setup(s) {
|
|
15
|
+
const { t: k } = S(), t = s, v = h(() => {
|
|
16
|
+
const c = [], d = t.emptyText ?? k("zl.description.empty", "暂无");
|
|
17
|
+
for (const o of t.items) {
|
|
18
|
+
const { visible: e, key: l, getValue: p, dict: a, ...z } = o, i = typeof p == "function" ? p(t.data, o.key, o) : t.data[o.key], x = t.emptyChecker(i, l, t.data) ? d : i;
|
|
19
|
+
if (e === !1 || typeof e == "function" && !e(i, l, t.data))
|
|
20
|
+
continue;
|
|
21
|
+
const C = typeof a == "string" ? { dictKey: a } : a;
|
|
22
|
+
c.push({ ...z, key: l, value: i, text: x, dict: C });
|
|
23
|
+
}
|
|
24
|
+
return c;
|
|
25
|
+
}), _ = T(() => import("../ZlDictTag/index2.vue.mjs"));
|
|
26
|
+
return (c, d) => {
|
|
27
|
+
const o = b("zl-icon");
|
|
28
|
+
return n(), r("div", {
|
|
29
|
+
class: B(["zl-description", { "zl-description-type-secondary": s.secondary }])
|
|
30
|
+
}, [
|
|
31
|
+
(n(!0), r(m, null, D(v.value, (e) => (n(), r("div", {
|
|
32
|
+
key: e.key,
|
|
33
|
+
class: "zl-description-item"
|
|
34
|
+
}, [
|
|
35
|
+
e.icon ? (n(), u(o, {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "zl-description-item-icon",
|
|
38
|
+
icon: e.icon
|
|
39
|
+
}, null, 8, ["icon"])) : E("", !0),
|
|
40
|
+
y("div", I, f(e.label), 1),
|
|
41
|
+
y("div", K, [
|
|
42
|
+
e.dict ? (n(), u(N(_), V({
|
|
43
|
+
key: 0,
|
|
44
|
+
ref_for: !0
|
|
45
|
+
}, e.dict, {
|
|
46
|
+
value: e.text
|
|
47
|
+
}), null, 16, ["value"])) : e.slot ? Z(c.$slots, e.key, {}, void 0, void 0, 1) : (n(), r(m, { key: 2 }, [
|
|
48
|
+
F(f(e.text), 1)
|
|
49
|
+
], 64))
|
|
50
|
+
])
|
|
51
|
+
]))), 128))
|
|
52
|
+
], 2);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
q as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=index.vue.mjs.map
|