@zl-ui-kit/components 0.26.1 → 0.27.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 +22 -18
- package/dist/components/ZlAction/List.vue.mjs +46 -49
- package/dist/components/ZlAction/index.vue.d.ts +1 -7
- package/dist/components/ZlAction/index.vue.mjs +8 -12
- package/dist/components/ZlAction/types.d.ts +2 -5
- package/dist/components/ZlAppLayout/Horizontal.css +1 -1
- package/dist/components/ZlAppLayout/Vertical.css +1 -1
- package/dist/components/ZlAppLayout/Vertical2.vue.mjs +41 -39
- package/dist/components/ZlAppLayout/index.vue.d.ts +6 -6
- package/dist/components/ZlAppLayout/index.vue.mjs +8 -8
- package/dist/components/ZlAppMenu/AppMenu.css +1 -0
- package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +27 -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 -1
- package/dist/components/ZlAppSlogan/index.vue.d.ts +1 -1
- package/dist/components/ZlAppSlogan/index.vue.mjs +12 -19
- package/dist/components/ZlCardPage/index.vue.d.ts +3 -41
- package/dist/components/ZlCardPage/index.vue.mjs +68 -68
- package/dist/components/ZlCheckboxTag/index.css +1 -1
- package/dist/components/ZlCheckboxTag/index.vue.d.ts +4 -4
- package/dist/components/ZlCheckboxTag/index.vue.mjs +30 -34
- package/dist/components/ZlCopy/copy.mjs +7 -17
- package/dist/components/ZlCopy/index.css +1 -1
- package/dist/components/ZlCopy/index.vue.mjs +2 -2
- package/dist/components/ZlCopy/index2.vue.mjs +36 -34
- package/dist/components/ZlDescription/index.css +1 -1
- package/dist/components/ZlDescription/index.vue.mjs +24 -28
- package/dist/components/ZlDialog/index.css +1 -1
- package/dist/components/ZlDialog/index.vue.d.ts +0 -3
- package/dist/components/ZlDialog/index.vue.mjs +35 -39
- package/dist/components/ZlDictTag/index.vue.d.ts +3 -12
- package/dist/components/ZlDictTag/index.vue.mjs +26 -31
- package/dist/components/ZlDrawer/index.css +1 -1
- package/dist/components/ZlDrawer/index.vue.d.ts +0 -3
- package/dist/components/ZlDrawer/index.vue.mjs +32 -36
- package/dist/components/ZlDynamicComponent/index.vue.d.ts +3 -5
- package/dist/components/ZlForm/index.css +1 -1
- package/dist/components/ZlForm/index.vue.d.ts +0 -7
- package/dist/components/ZlForm/index.vue.mjs +47 -50
- package/dist/components/ZlLayoutSwitch/index.css +1 -1
- package/dist/components/ZlLayoutSwitch/index.vue.d.ts +0 -10
- package/dist/components/ZlLayoutSwitch/index.vue.mjs +1 -1
- package/dist/components/ZlLayoutSwitch/index2.vue.mjs +19 -27
- package/dist/components/ZlLogin/components/LoginForm.css +1 -1
- package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
- package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +25 -26
- package/dist/components/ZlPageContainer/index.css +1 -1
- package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.d.ts +1 -21
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index2.vue.mjs +33 -59
- package/dist/components/ZlPagination/usePagination.d.ts +0 -1
- package/dist/components/ZlPagination/usePagination.mjs +34 -51
- package/dist/components/ZlPopconfirm/index.vue.mjs +24 -25
- package/dist/components/ZlSearch/index.vue.d.ts +0 -25
- package/dist/components/ZlSearch/index.vue.mjs +205 -202
- package/dist/components/ZlSearchTable/index.vue.d.ts +2 -40
- package/dist/components/ZlSearchTable/index.vue.mjs +55 -59
- package/dist/components/ZlTable/useTablePagination.d.ts +0 -1
- package/dist/components/ZlTable/useTablePagination.mjs +23 -37
- package/dist/components/ZlTabs/index.vue.d.ts +3 -16
- package/dist/components/ZlTag/ZlCornerTag.css +1 -1
- package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +1 -14
- package/dist/components/ZlTag/ZlCornerTag.vue.mjs +14 -25
- package/dist/components/ZlTag/index.vue.mjs +4 -4
- package/dist/components/ZlUpload/index.css +1 -1
- package/dist/components/ZlUpload/index.vue.d.ts +3 -44
- package/dist/components/ZlUpload/index.vue.mjs +3 -3
- package/dist/components/ZlUpload/index2.vue.mjs +79 -119
- package/dist/index.d.ts +2 -8
- package/dist/index.mjs +169 -183
- package/dist/locales/en.mjs +2 -2
- package/dist/locales/zh-cn.mjs +3 -3
- package/package.json +6 -6
- package/dist/components/ZlAppLayout/HeaderAside.css +0 -1
- package/dist/components/ZlAppLayout/HeaderAside.vue.d.ts +0 -25
- package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +0 -6
- package/dist/components/ZlAppLayout/HeaderAside2.vue.mjs +0 -65
- package/dist/components/ZlBreadcrumb/index.css +0 -1
- package/dist/components/ZlBreadcrumb/index.vue.d.ts +0 -32
- package/dist/components/ZlBreadcrumb/index.vue.mjs +0 -58
- package/dist/components/ZlBreadcrumb/index3.vue.mjs +0 -6
- package/dist/components/ZlBreadcrumb/types.d.ts +0 -16
- package/dist/components/ZlButton/index.vue.d.ts +0 -81
- package/dist/components/ZlButton/index.vue.mjs +0 -60
- package/dist/components/ZlButton/index2.vue.mjs +0 -5
- package/dist/components/ZlCardPage/resolvePagination.d.ts +0 -20
- package/dist/components/ZlCardPage/resolvePagination.mjs +0 -24
- package/dist/components/ZlDevMenu/index.css +0 -1
- package/dist/components/ZlDevMenu/index.vue.d.ts +0 -33
- package/dist/components/ZlDevMenu/index.vue.mjs +0 -110
- package/dist/components/ZlDevMenu/index3.vue.mjs +0 -6
- package/dist/components/ZlDevMenu/types.d.ts +0 -8
- package/dist/components/ZlLoading/index.css +0 -1
- package/dist/components/ZlLoading/index.vue.d.ts +0 -27
- package/dist/components/ZlLoading/index.vue.mjs +0 -8
- package/dist/components/ZlLoading/index2.vue.mjs +0 -30
- package/dist/components/ZlMenu/MenuIcon.d.ts +0 -17
- package/dist/components/ZlMenu/MenuIcon.mjs +0 -21
- package/dist/components/ZlMenu/ZlMenuItem.vue.d.ts +0 -7
- package/dist/components/ZlMenu/ZlMenuItem.vue.mjs +0 -53
- package/dist/components/ZlMenu/ZlMenuItem2.vue.mjs +0 -5
- package/dist/components/ZlMenu/index.css +0 -1
- package/dist/components/ZlMenu/index.vue.d.ts +0 -40
- package/dist/components/ZlMenu/index.vue.mjs +0 -60
- package/dist/components/ZlMenu/index3.vue.mjs +0 -6
- package/dist/components/ZlMenu/types.d.ts +0 -20
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as x, useModel as
|
|
2
|
-
import
|
|
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
3
|
import '../ZlTag/index.css';/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const M = { class: "zl-checkbox-tag" }, T = /* @__PURE__ */ x({
|
|
5
5
|
name: "ZlCheckboxTag",
|
|
6
6
|
__name: "index",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ V({
|
|
8
8
|
options: { default: () => [] },
|
|
9
9
|
single: { type: Boolean },
|
|
10
|
-
rounded: { type:
|
|
10
|
+
rounded: { type: Boolean, default: !0 },
|
|
11
11
|
bordered: { type: Boolean, default: !0 },
|
|
12
12
|
fill: { type: Boolean, default: !0 },
|
|
13
13
|
size: { default: "small" }
|
|
@@ -17,55 +17,51 @@ const N = { class: "zl-checkbox-tag" }, F = /* @__PURE__ */ x({
|
|
|
17
17
|
}),
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
19
|
setup(o) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}), i = t(() => a.options.some((e) => e.exclusive)), d = h();
|
|
24
|
-
if (i.value && u.value) {
|
|
25
|
-
const e = a.options.find((n) => n.value === u.value[0]);
|
|
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]);
|
|
26
23
|
d.value = e?.exclusive;
|
|
27
24
|
}
|
|
28
|
-
const
|
|
29
|
-
function
|
|
25
|
+
const t = i(() => new Set(s.single ? [a.value] : a.value ?? []));
|
|
26
|
+
function f(e) {
|
|
30
27
|
if (e.disabled) return;
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
|
|
28
|
+
const u = s.single ? [a.value] : [...a.value ?? []], l = u.includes(e.value);
|
|
29
|
+
if (c.value && !l) {
|
|
30
|
+
const n = e;
|
|
31
|
+
n.exclusive === !0 || n.exclusive !== d.value ? (a.value = [e.value], d.value = n.exclusive) : a.value = [...u, e.value];
|
|
35
32
|
return;
|
|
36
33
|
}
|
|
37
34
|
if (l) {
|
|
38
|
-
const
|
|
39
|
-
|
|
35
|
+
const n = u.filter((p) => p !== e.value);
|
|
36
|
+
a.value = s.single ? n[0] : n;
|
|
40
37
|
} else
|
|
41
|
-
|
|
38
|
+
s.single ? a.value = e.value : a.value = [...u, e.value];
|
|
42
39
|
}
|
|
43
|
-
return (e,
|
|
44
|
-
(
|
|
40
|
+
return (e, u) => (r(), v("div", M, [
|
|
41
|
+
(r(!0), v(b, null, k(o.options, (l) => (r(), m(E, {
|
|
45
42
|
key: l.value,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
bordered: o.bordered,
|
|
43
|
+
fill: o.fill,
|
|
44
|
+
rounded: o.rounded,
|
|
45
|
+
color: t.value.has(l.value) ? "primary" : void 0,
|
|
46
|
+
bordered: t.value.has(l.value) && o.bordered,
|
|
51
47
|
selectable: "",
|
|
52
|
-
selected:
|
|
48
|
+
selected: t.value.has(l.value),
|
|
53
49
|
disabled: l.disabled,
|
|
54
50
|
icon: l.icon,
|
|
55
51
|
size: o.size,
|
|
56
|
-
onClick: (
|
|
52
|
+
onClick: (n) => f(l)
|
|
57
53
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
default: y(() => [
|
|
55
|
+
B(e.$slots, "default", C({ ref_for: !0 }, { item: l, checked: t.value.has(l.value) }), () => [
|
|
56
|
+
z(S(l.label), 1)
|
|
61
57
|
])
|
|
62
58
|
]),
|
|
63
59
|
_: 2
|
|
64
|
-
}, 1032, ["
|
|
60
|
+
}, 1032, ["fill", "rounded", "color", "bordered", "selected", "disabled", "icon", "size", "onClick"]))), 128))
|
|
65
61
|
]));
|
|
66
62
|
}
|
|
67
63
|
});
|
|
68
64
|
export {
|
|
69
|
-
|
|
65
|
+
T as default
|
|
70
66
|
};
|
|
71
67
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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();
|
|
3
5
|
}
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
throw new Error("[ZlCopy] document is not available");
|
|
7
|
-
const e = document.createElement("textarea");
|
|
8
|
-
e.value = o ?? "", e.style.position = "fixed", e.style.top = "-9999px", e.style.opacity = "0", document.body.appendChild(e), e.select();
|
|
9
|
-
try {
|
|
10
|
-
if (!document.execCommand("copy"))
|
|
11
|
-
throw new Error('[ZlCopy] execCommand("copy") failed');
|
|
12
|
-
} finally {
|
|
13
|
-
e.remove();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
async function a(o) {
|
|
17
|
-
o != null && (t() ? await navigator.clipboard.writeText(o) : n(o));
|
|
6
|
+
async function c(e) {
|
|
7
|
+
e != null && (n ? await o.clipboard.writeText(e) : a(e));
|
|
18
8
|
}
|
|
19
9
|
export {
|
|
20
|
-
|
|
10
|
+
c as default
|
|
21
11
|
};
|
|
22
12
|
//# sourceMappingURL=copy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-copy[data-v-
|
|
1
|
+
.zl-copy[data-v-3a18b7dd]{max-width:100%;display:inline-flex;align-items:center;gap:12px}.zl-copy__text[data-v-3a18b7dd]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./index2.vue.mjs";
|
|
2
2
|
import './index.css';/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a18b7dd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as m, ref as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
import { ElMessage as
|
|
4
|
-
import C from "../ZlButton/index.vue.mjs";
|
|
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";
|
|
5
4
|
import i from "./copy.mjs";
|
|
6
|
-
const
|
|
5
|
+
const k = { class: "zl-copy" }, T = ["title"], B = /* @__PURE__ */ m({
|
|
7
6
|
name: "ZlCopy",
|
|
8
7
|
__name: "index",
|
|
9
8
|
props: {
|
|
@@ -11,42 +10,45 @@ const g = { class: "zl-copy" }, k = ["title"], w = /* @__PURE__ */ m({
|
|
|
11
10
|
copyText: {}
|
|
12
11
|
},
|
|
13
12
|
setup(e) {
|
|
14
|
-
const c = e, { t: o } =
|
|
15
|
-
|
|
16
|
-
const t = c.copyText ?? c.text ?? s.value?.textContent ?? "";
|
|
13
|
+
const c = e, { t: o } = g(), n = x(null);
|
|
14
|
+
function u() {
|
|
17
15
|
try {
|
|
18
|
-
|
|
16
|
+
const t = c.copyText ?? c.text ?? n.value?.textContent ?? "";
|
|
17
|
+
i(t), a.success(o("zl.copy.success", "复制成功"));
|
|
19
18
|
} catch {
|
|
20
|
-
|
|
19
|
+
a.error(o("zl.copy.failed", "复制失败"));
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
|
-
return (t,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
})
|
|
31
46
|
], !0)
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
d(C, {
|
|
35
|
-
size: "small",
|
|
36
|
-
text: "",
|
|
37
|
-
class: "zl-copy__button",
|
|
38
|
-
onClick: f
|
|
39
|
-
}, {
|
|
40
|
-
default: _(() => [
|
|
41
|
-
z(l(a(o)("zl.copy.copy", "复制")), 1)
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
})
|
|
45
|
-
], !0)
|
|
46
|
-
]));
|
|
47
|
+
]);
|
|
48
|
+
};
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
B as default
|
|
51
53
|
};
|
|
52
54
|
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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}
|
|
@@ -1,56 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
2
|
import { useZlT as S } from "@zl-ui-kit/composables";
|
|
3
|
-
import { isNumber as
|
|
4
|
-
|
|
5
|
-
const K = { class: "zl-description-item-label" }, L = { class: "zl-description-item-value" }, H = /* @__PURE__ */ C({
|
|
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({
|
|
6
5
|
name: "ZlDescription",
|
|
7
6
|
__name: "index",
|
|
8
7
|
props: {
|
|
9
8
|
items: {},
|
|
10
9
|
data: { default: () => ({}) },
|
|
11
|
-
emptyChecker: { type: Function, default: (s) => !s && !
|
|
10
|
+
emptyChecker: { type: Function, default: (s) => !s && !A(s) },
|
|
12
11
|
emptyText: {},
|
|
13
12
|
secondary: { type: Boolean }
|
|
14
13
|
},
|
|
15
14
|
setup(s) {
|
|
16
|
-
const { t:
|
|
17
|
-
const c = [],
|
|
15
|
+
const { t: k } = S(), t = s, v = h(() => {
|
|
16
|
+
const c = [], d = t.emptyText ?? k("zl.description.empty", "暂无");
|
|
18
17
|
for (const o of t.items) {
|
|
19
|
-
const { visible: e, key:
|
|
20
|
-
if (e === !1 || typeof e == "function" && !e(i,
|
|
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))
|
|
21
20
|
continue;
|
|
22
|
-
const
|
|
23
|
-
c.push({ ...
|
|
21
|
+
const C = typeof a == "string" ? { dictKey: a } : a;
|
|
22
|
+
c.push({ ...z, key: l, value: i, text: x, dict: C });
|
|
24
23
|
}
|
|
25
24
|
return c;
|
|
26
|
-
}),
|
|
27
|
-
return (c,
|
|
28
|
-
const o =
|
|
29
|
-
return n(),
|
|
30
|
-
class:
|
|
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 }])
|
|
31
30
|
}, [
|
|
32
|
-
(n(!0),
|
|
31
|
+
(n(!0), r(m, null, D(v.value, (e) => (n(), r("div", {
|
|
33
32
|
key: e.key,
|
|
34
33
|
class: "zl-description-item"
|
|
35
34
|
}, [
|
|
36
|
-
e.icon ? (n(),
|
|
35
|
+
e.icon ? (n(), u(o, {
|
|
37
36
|
key: 0,
|
|
38
37
|
class: "zl-description-item-icon",
|
|
39
38
|
icon: e.icon
|
|
40
39
|
}, null, 8, ["icon"])) : E("", !0),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
e.dict ? (n(),
|
|
40
|
+
y("div", I, f(e.label), 1),
|
|
41
|
+
y("div", K, [
|
|
42
|
+
e.dict ? (n(), u(N(_), V({
|
|
44
43
|
key: 0,
|
|
45
44
|
ref_for: !0
|
|
46
45
|
}, e.dict, {
|
|
47
46
|
value: e.text
|
|
48
|
-
}), null, 16, ["value"])) : e.slot ? Z(c.$slots, e.key, {}, void 0, void 0, 1) : (n(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
_: 2
|
|
53
|
-
}, 1024))
|
|
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))
|
|
54
50
|
])
|
|
55
51
|
]))), 128))
|
|
56
52
|
], 2);
|
|
@@ -58,6 +54,6 @@ const K = { class: "zl-description-item-label" }, L = { class: "zl-description-i
|
|
|
58
54
|
}
|
|
59
55
|
});
|
|
60
56
|
export {
|
|
61
|
-
|
|
57
|
+
q as default
|
|
62
58
|
};
|
|
63
59
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-dialog__body{width:100%}
|
|
1
|
+
.zl-dialog__body{width:100%}
|
|
@@ -9,8 +9,6 @@ type __VLS_Props = {
|
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
/** 内容区加载态,为 true 时显示遮罩 loading */
|
|
11
11
|
loading?: boolean;
|
|
12
|
-
/** 底部按钮区是否可见;为 false 时隐藏整个页脚(默认取消/确定按钮与 footer 插槽一并隐藏),默认 true */
|
|
13
|
-
footerVisible?: boolean;
|
|
14
12
|
};
|
|
15
13
|
type __VLS_PublicProps = {
|
|
16
14
|
'visible'?: boolean;
|
|
@@ -31,7 +29,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
31
29
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
32
30
|
}>, {
|
|
33
31
|
autoCloseAfterConfirm: boolean;
|
|
34
|
-
footerVisible: boolean;
|
|
35
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
34
|
export default _default;
|
|
@@ -1,84 +1,80 @@
|
|
|
1
|
-
import { defineComponent as h, useModel as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
|
|
4
|
-
const E = { class: "zl-dialog__body" }, j = /* @__PURE__ */ h({
|
|
1
|
+
import { defineComponent as h, useModel as V, ref as w, computed as f, useAttrs as x, resolveComponent as m, resolveDirective as z, openBlock as d, createBlock as v, mergeProps as A, withCtx as a, withDirectives as D, createElementBlock as M, renderSlot as g, createTextVNode as y, toDisplayString as p, unref as N, createCommentVNode as O, createVNode as T, mergeModels as Z } from "vue";
|
|
2
|
+
import { useZlT as $ } from "@zl-ui-kit/composables";
|
|
3
|
+
const S = { class: "zl-dialog__body" }, P = /* @__PURE__ */ h({
|
|
5
4
|
name: "ZlDialog",
|
|
6
5
|
inheritAttrs: !1,
|
|
7
6
|
__name: "index",
|
|
8
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ Z({
|
|
9
8
|
onCancel: {},
|
|
10
9
|
onOk: {},
|
|
11
10
|
autoCloseAfterConfirm: { type: Boolean, default: !0 },
|
|
12
11
|
readonly: { type: Boolean },
|
|
13
|
-
loading: { type: Boolean }
|
|
14
|
-
footerVisible: { type: Boolean, default: !0 }
|
|
12
|
+
loading: { type: Boolean }
|
|
15
13
|
}, {
|
|
16
14
|
visible: { type: Boolean, default: !1 },
|
|
17
15
|
visibleModifiers: {}
|
|
18
16
|
}),
|
|
19
17
|
emits: ["update:visible"],
|
|
20
|
-
setup(
|
|
21
|
-
const { t:
|
|
22
|
-
async function
|
|
23
|
-
|
|
18
|
+
setup(l) {
|
|
19
|
+
const { t: r } = $(), e = l, t = V(l, "visible");
|
|
20
|
+
async function i() {
|
|
21
|
+
e.onCancel && !await e.onCancel() || (t.value = !1);
|
|
24
22
|
}
|
|
25
23
|
const s = w(!1);
|
|
26
|
-
async function
|
|
24
|
+
async function C() {
|
|
27
25
|
s.value = !0;
|
|
28
26
|
try {
|
|
29
|
-
await
|
|
30
|
-
} catch (
|
|
31
|
-
console.error("[ZlDialog] handleConfirm: ",
|
|
27
|
+
e.onOk && (await e.onOk(), e.autoCloseAfterConfirm && (t.value = !1));
|
|
28
|
+
} catch (o) {
|
|
29
|
+
console.error("[ZlDialog] handleConfirm: ", o);
|
|
32
30
|
} finally {
|
|
33
31
|
s.value = !1;
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
|
-
const
|
|
37
|
-
return (
|
|
38
|
-
const B =
|
|
39
|
-
return d(),
|
|
40
|
-
class: ["zl-dialog", { "zl-dialog--no-footer": !e.footerVisible }]
|
|
41
|
-
}, b.value, {
|
|
34
|
+
const k = f(() => e.readonly ? r("zl.dialog.close", "关闭") : r("zl.dialog.confirm", "确定")), b = f(() => ({ width: "600px", "destroy-on-close": !0, ...x() }));
|
|
35
|
+
return (o, n) => {
|
|
36
|
+
const u = m("el-button"), B = m("el-dialog"), _ = z("loading");
|
|
37
|
+
return d(), v(B, A({ class: "zl-dialog" }, b.value, {
|
|
42
38
|
modelValue: t.value,
|
|
43
|
-
"onUpdate:modelValue":
|
|
44
|
-
"before-close":
|
|
39
|
+
"onUpdate:modelValue": n[1] || (n[1] = (c) => t.value = c),
|
|
40
|
+
"before-close": i
|
|
45
41
|
}), {
|
|
46
|
-
footer:
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
footer: a(() => [
|
|
43
|
+
g(o.$slots, "footer", {}, () => [
|
|
44
|
+
l.readonly ? O("", !0) : (d(), v(u, {
|
|
49
45
|
key: 0,
|
|
50
|
-
onClick:
|
|
46
|
+
onClick: i
|
|
51
47
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
48
|
+
default: a(() => [
|
|
49
|
+
y(p(N(r)("zl.dialog.cancel", "取消")), 1)
|
|
54
50
|
]),
|
|
55
51
|
_: 1
|
|
56
52
|
})),
|
|
57
|
-
|
|
53
|
+
T(u, {
|
|
58
54
|
type: "primary",
|
|
59
55
|
loading: s.value,
|
|
60
|
-
onClick:
|
|
56
|
+
onClick: n[0] || (n[0] = (c) => l.readonly ? i() : C())
|
|
61
57
|
}, {
|
|
62
|
-
default:
|
|
63
|
-
|
|
58
|
+
default: a(() => [
|
|
59
|
+
y(p(k.value), 1)
|
|
64
60
|
]),
|
|
65
61
|
_: 1
|
|
66
62
|
}, 8, ["loading"])
|
|
67
63
|
])
|
|
68
64
|
]),
|
|
69
|
-
default:
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
default: a(() => [
|
|
66
|
+
D((d(), M("div", S, [
|
|
67
|
+
g(o.$slots, "default")
|
|
72
68
|
])), [
|
|
73
|
-
[
|
|
69
|
+
[_, l.loading]
|
|
74
70
|
])
|
|
75
71
|
]),
|
|
76
72
|
_: 3
|
|
77
|
-
}, 16, ["
|
|
73
|
+
}, 16, ["modelValue"]);
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
76
|
});
|
|
81
77
|
export {
|
|
82
|
-
|
|
78
|
+
P as default
|
|
83
79
|
};
|
|
84
80
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -6,18 +6,15 @@ type __VLS_Props = {
|
|
|
6
6
|
* 行级字典请用独立 key(如 `` `resourceType.${row.id}` ``)。
|
|
7
7
|
*/
|
|
8
8
|
dictKey: string;
|
|
9
|
-
/**
|
|
10
|
-
* 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 `DictItem[]`(`{ label, value, icon?, color?, type? }`)。
|
|
11
|
-
* `color` 可以是主题色名,也可以是 `#ff7d45` 这类原生 CSS 颜色值(角标上按纯色渲染,不自动渐变)
|
|
12
|
-
*/
|
|
9
|
+
/** 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 `DictItem[]`(`{ label, value, icon?, color?, type? }`) */
|
|
13
10
|
dict?: DictItem[];
|
|
14
11
|
/** 是否渲染成角标并指定方位,true 时为右上角 */
|
|
15
12
|
corner?: boolean | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
16
13
|
/**
|
|
17
14
|
* 角标形态(`corner` 生效时才起作用):
|
|
18
15
|
* `badge` 贴边小标签(默认);`ribbon` 斜跨在角上的绶带(45° 文字,如卡片右上角的「委托任务」)。
|
|
19
|
-
* 绶带与角点留有间距、文案建议 ≤4
|
|
20
|
-
*
|
|
16
|
+
* 绶带与角点留有间距、文案建议 ≤4 个字;尺寸/留白/带宽度走 CSS 变量
|
|
17
|
+
* `--zl-corner-tag-ribbon-size` / `--zl-corner-tag-ribbon-gap` / `--zl-corner-tag-ribbon-width`
|
|
21
18
|
*/
|
|
22
19
|
variant?: 'badge' | 'ribbon';
|
|
23
20
|
/**
|
|
@@ -35,14 +32,8 @@ type __VLS_Props = {
|
|
|
35
32
|
* @deprecated 用 `iconVisible`:全库显隐统一用 visible 语义,且不要用反向命名
|
|
36
33
|
*/
|
|
37
34
|
hideIcon?: boolean;
|
|
38
|
-
/** 是否使用填充背景(配合字典项 `color`/`type` 显示浅色底色,如 `--zl-<色>-1`),透传给内部 ZlTag */
|
|
39
|
-
fill?: boolean;
|
|
40
|
-
/** 是否使用全圆角样式,透传给内部 ZlTag */
|
|
41
|
-
rounded?: boolean;
|
|
42
35
|
};
|
|
43
36
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
44
|
-
fill: boolean;
|
|
45
|
-
rounded: boolean;
|
|
46
37
|
variant: "badge" | "ribbon";
|
|
47
38
|
corner: boolean | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
48
39
|
iconVisible: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as g, watch as
|
|
2
|
-
import { useDict as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as g, watch as h, computed as n, openBlock as l, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as v, toDisplayString as f } from "vue";
|
|
2
|
+
import { useDict as B, useDictStore as _ } from "@zl-ui-kit/composables";
|
|
3
|
+
import b from "../ZlTag/ZlCornerTag.vue.mjs";
|
|
4
4
|
import '../ZlTag/index.css';import '../ZlTag/ZlCornerTag.css';/* empty css */
|
|
5
|
-
import
|
|
5
|
+
import S from "../ZlTag/index.vue.mjs";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const
|
|
7
|
+
const I = /* @__PURE__ */ g({
|
|
8
8
|
name: "ZlDictTag",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -15,61 +15,56 @@ const K = /* @__PURE__ */ g({
|
|
|
15
15
|
value: {},
|
|
16
16
|
simple: { type: Boolean },
|
|
17
17
|
iconVisible: { type: Boolean, default: void 0 },
|
|
18
|
-
hideIcon: { type: Boolean, default: void 0 }
|
|
19
|
-
fill: { type: Boolean, default: !1 },
|
|
20
|
-
rounded: { type: Boolean, default: !1 }
|
|
18
|
+
hideIcon: { type: Boolean, default: void 0 }
|
|
21
19
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const t =
|
|
24
|
-
|
|
20
|
+
setup(i) {
|
|
21
|
+
const t = i, p = B(t.dictKey, { data: t.dict });
|
|
22
|
+
h(
|
|
25
23
|
() => t.dict,
|
|
26
24
|
(e) => {
|
|
27
25
|
if (e?.length) {
|
|
28
|
-
const { dictStore: o } =
|
|
26
|
+
const { dictStore: o } = _();
|
|
29
27
|
o.value = { ...o.value, [t.dictKey]: e };
|
|
30
28
|
}
|
|
31
29
|
},
|
|
32
30
|
{ deep: !1 }
|
|
33
31
|
);
|
|
34
|
-
const
|
|
32
|
+
const a = n(() => p.value.find((e) => e.value === t.value)), m = { info: "gray" };
|
|
35
33
|
function y(e) {
|
|
36
34
|
const o = e.color ?? e.type;
|
|
37
35
|
if (o)
|
|
38
36
|
return m[o] ?? o;
|
|
39
37
|
}
|
|
40
|
-
const
|
|
41
|
-
const e =
|
|
38
|
+
const r = n(() => {
|
|
39
|
+
const e = a.value;
|
|
42
40
|
return e ? {
|
|
43
41
|
color: t.simple ? void 0 : y(e),
|
|
44
42
|
icon: t.iconVisible ?? !t.hideIcon ? e.icon : void 0
|
|
45
43
|
} : {};
|
|
46
|
-
}),
|
|
47
|
-
return (e, o) =>
|
|
44
|
+
}), c = n(() => t.corner === !0 ? "top-right" : t.corner);
|
|
45
|
+
return (e, o) => c.value ? (l(), s(b, u({
|
|
48
46
|
key: 0,
|
|
49
47
|
class: "zl-dict-corner-tag"
|
|
50
|
-
}, { ...
|
|
51
|
-
position:
|
|
52
|
-
variant:
|
|
48
|
+
}, { ...r.value, ...e.$attrs }, {
|
|
49
|
+
position: c.value,
|
|
50
|
+
variant: i.variant
|
|
53
51
|
}), {
|
|
54
|
-
default:
|
|
55
|
-
f(
|
|
52
|
+
default: d(() => [
|
|
53
|
+
v(f(a.value?.label || i.value), 1)
|
|
56
54
|
]),
|
|
57
55
|
_: 1
|
|
58
|
-
}, 16, ["position", "variant"])) : (
|
|
56
|
+
}, 16, ["position", "variant"])) : (l(), s(S, u({
|
|
59
57
|
key: 1,
|
|
60
58
|
class: "zl-dict-tag"
|
|
61
|
-
}, { ...
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}), {
|
|
65
|
-
default: s(() => [
|
|
66
|
-
f(v(i.value?.label || a.value), 1)
|
|
59
|
+
}, { ...r.value, ...e.$attrs }), {
|
|
60
|
+
default: d(() => [
|
|
61
|
+
v(f(a.value?.label || i.value), 1)
|
|
67
62
|
]),
|
|
68
63
|
_: 1
|
|
69
|
-
}, 16
|
|
64
|
+
}, 16));
|
|
70
65
|
}
|
|
71
66
|
});
|
|
72
67
|
export {
|
|
73
|
-
|
|
68
|
+
I as default
|
|
74
69
|
};
|
|
75
70
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-drawer__body{width:100%;min-height:100%}
|
|
1
|
+
.zl-drawer__body{width:100%;min-height:100%}
|
|
@@ -9,8 +9,6 @@ type __VLS_Props = {
|
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
/** 内容区加载态,为 true 时显示遮罩 loading */
|
|
11
11
|
loading?: boolean;
|
|
12
|
-
/** 底部按钮区是否可见;为 false 时隐藏整个页脚(默认取消/确定按钮与 footer 插槽一并隐藏),默认 true */
|
|
13
|
-
footerVisible?: boolean;
|
|
14
12
|
};
|
|
15
13
|
type __VLS_PublicProps = {
|
|
16
14
|
'visible'?: boolean;
|
|
@@ -31,7 +29,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
31
29
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
32
30
|
}>, {
|
|
33
31
|
autoCloseAfterConfirm: boolean;
|
|
34
|
-
footerVisible: boolean;
|
|
35
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
34
|
export default _default;
|