zhihao-ui 1.1.0 → 1.1.1
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/dist/es/{Button-CUB5krFr.js → Button-DnpxJA88.js} +3 -2
- package/dist/es/DatePicker-DdLVvq3M.js +57 -0
- package/dist/es/DetailSubTitle-BWNtw5qC.js +35 -0
- package/dist/es/Dialog-D9YXcRFu.js +112 -0
- package/dist/es/EditInfoPair-Dkj9ohlm.js +36 -0
- package/dist/es/FileWrapper-D9UO6aN1.js +77 -0
- package/dist/es/Grid-D8odZrqs.js +96 -0
- package/dist/es/InfoPair-BXFe3add.js +36 -0
- package/dist/es/Input-wPjJsk3b.js +88 -0
- package/dist/es/Loading-ClJhDU4h.js +22 -0
- package/dist/es/MessageBox-BbG8P2uz.js +100 -0
- package/dist/es/MoneyInput-CbCeKV_v.js +53 -0
- package/dist/es/PageHeadPanel-BaNhcn2t.js +32 -0
- package/dist/es/ToolTips-Dm28zKim.js +37 -0
- package/dist/es/index.js +32 -5
- package/dist/es/{utils-Dj4hZBjs.js → utils-amzq0_Yw.js} +1 -1
- package/dist/es/vendor-Cv1TpEaZ.js +12409 -0
- package/dist/index.css +1 -1
- package/dist/types/components/DatePicker/DatePicker.vue.d.ts +28 -0
- package/dist/types/components/DatePicker/index.d.ts +70 -0
- package/dist/types/components/DatePicker/types.d.ts +1 -0
- package/dist/types/components/DetailSubTitle/DetailSubTitle.vue.d.ts +30 -0
- package/dist/types/components/DetailSubTitle/index.d.ts +59 -0
- package/dist/types/components/DetailSubTitle/types.d.ts +7 -0
- package/dist/types/components/Dialog/Dialog.vue.d.ts +14 -0
- package/dist/types/components/Dialog/index.d.ts +19 -0
- package/dist/types/components/Dialog/types.d.ts +25 -0
- package/dist/types/components/EditInfoPair/EditInfoPair.vue.d.ts +30 -0
- package/dist/types/components/EditInfoPair/index.d.ts +59 -0
- package/dist/types/components/EditInfoPair/types.d.ts +1 -0
- package/dist/types/components/FileWrapper/FileWrapper.vue.d.ts +64 -0
- package/dist/types/components/FileWrapper/index.d.ts +119 -0
- package/dist/types/components/FileWrapper/types.d.ts +1 -0
- package/dist/types/components/Grid/Grid.vue.d.ts +65 -0
- package/dist/types/components/Grid/index.d.ts +107 -0
- package/dist/types/components/Grid/interface/index.d.ts +5 -0
- package/dist/types/components/Grid/types.d.ts +1 -0
- package/dist/types/components/InfoPair/InfoPair.vue.d.ts +30 -0
- package/dist/types/components/InfoPair/index.d.ts +59 -0
- package/dist/types/components/InfoPair/types.d.ts +1 -0
- package/dist/types/components/Input/Input.vue.d.ts +45 -0
- package/dist/types/components/Input/index.d.ts +72 -0
- package/dist/types/components/Input/types.d.ts +1 -0
- package/dist/types/components/InputNumber/InputNumber.vue.d.ts +33 -0
- package/dist/types/components/InputNumber/index.d.ts +67 -0
- package/dist/types/components/InputNumber/types.d.ts +1 -0
- package/dist/types/components/Loading/Loading.vue.d.ts +2 -0
- package/dist/types/components/Loading/index.d.ts +13 -0
- package/dist/types/components/Loading/types.d.ts +1 -0
- package/dist/types/components/MessageBox/MessageBox.vue.d.ts +219 -0
- package/dist/types/components/MessageBox/index.d.ts +343 -0
- package/dist/types/components/MessageBox/types.d.ts +20 -0
- package/dist/types/components/MoneyInput/MoneyInput.vue.d.ts +40 -0
- package/dist/types/components/MoneyInput/index.d.ts +67 -0
- package/dist/types/components/MoneyInput/types.d.ts +1 -0
- package/dist/types/components/PageHeadPanel/PageHeadPanel.vue.d.ts +30 -0
- package/dist/types/components/PageHeadPanel/index.d.ts +32 -0
- package/dist/types/components/PageHeadPanel/types.d.ts +1 -0
- package/dist/types/components/ToolTips/ToolTips.vue.d.ts +33 -0
- package/dist/types/components/ToolTips/index.d.ts +53 -0
- package/dist/types/components/ToolTips/types.d.ts +1 -0
- package/dist/types/components/const.d.ts +4 -0
- package/dist/types/components/index.d.ts +14 -0
- package/dist/types/components/utils.d.ts +4 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +40 -1
- package/package.json +1 -1
- package/dist/es/vendor-Co4JjPth.js +0 -157
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, useSlots as r, openBlock as _, createElementBlock as a } from "vue";
|
|
2
|
-
import { w as p } from "./utils-
|
|
2
|
+
import { w as p } from "./utils-amzq0_Yw.js";
|
|
3
3
|
const u = { style: { "background-color": "blue", color: "red" } }, l = /* @__PURE__ */ c({
|
|
4
4
|
name: "ZhButton",
|
|
5
5
|
__name: "Button",
|
|
@@ -17,5 +17,6 @@ const u = { style: { "background-color": "blue", color: "red" } }, l = /* @__PUR
|
|
|
17
17
|
return o;
|
|
18
18
|
}, m = /* @__PURE__ */ i(l, [["__scopeId", "data-v-e1dcabfd"]]), h = p(m);
|
|
19
19
|
export {
|
|
20
|
-
h as Z
|
|
20
|
+
h as Z,
|
|
21
|
+
i as _
|
|
21
22
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as d, openBlock as u, createElementBlock as f, normalizeClass as h, createVNode as D, unref as M, mergeProps as _ } from "vue";
|
|
2
|
+
import { h as g, E as Y } from "./vendor-Cv1TpEaZ.js";
|
|
3
|
+
import { w as A } from "./utils-amzq0_Yw.js";
|
|
4
|
+
const p = "--", m = "YYYY-MM-DDTHH:mm:ss", E = "YYYY-MM-DDT23:59:59", T = "YYYY-MM-DD", i = (e, l = T) => e ? g(e).format(l).replace("Invalid date", p) : p, N = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
|
|
5
|
+
function O(e) {
|
|
6
|
+
const l = ["角", "分"], c = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
|
|
7
|
+
["元", "万", "亿"],
|
|
8
|
+
["", "拾", "佰", "仟"]
|
|
9
|
+
], n = e < 0 ? "负" : "";
|
|
10
|
+
e = Math.abs(e);
|
|
11
|
+
let a = "";
|
|
12
|
+
for (let o = 0; o < l.length; o++)
|
|
13
|
+
a += (c[Math.floor(e * 10 * Math.pow(10, o)) % 10] + l[o]).replace(/零./, "");
|
|
14
|
+
a = a || "整", e = Math.floor(e);
|
|
15
|
+
for (let o = 0; o < s[0].length && e > 0; o++) {
|
|
16
|
+
let t = "";
|
|
17
|
+
for (let r = 0; r < s[1].length && e > 0; r++)
|
|
18
|
+
t = c[e % 10] + s[1][r] + t, e = Math.floor(e / 10);
|
|
19
|
+
a = t.replace(/(零.)*零$/, "").replace(/^$/, "零") + s[0][o] + a;
|
|
20
|
+
}
|
|
21
|
+
return n + a.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
22
|
+
}
|
|
23
|
+
const k = /* @__PURE__ */ d({
|
|
24
|
+
name: "zh-date-icker",
|
|
25
|
+
__name: "DatePicker",
|
|
26
|
+
props: {
|
|
27
|
+
style: {},
|
|
28
|
+
class: {},
|
|
29
|
+
modelValue: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["update:modelValue", "change"],
|
|
32
|
+
setup(e, { emit: l }) {
|
|
33
|
+
const c = e, s = l, n = (t) => Array.isArray(t) ? [i(t[0], m), i(t[1], E)] : t && i(t, m), a = (t) => {
|
|
34
|
+
const r = n(t);
|
|
35
|
+
s("update:modelValue", r);
|
|
36
|
+
}, o = (t) => {
|
|
37
|
+
const r = n(t);
|
|
38
|
+
s("change", r);
|
|
39
|
+
};
|
|
40
|
+
return (t, r) => (u(), f("div", {
|
|
41
|
+
class: h([c.class, "zh-date-picker"])
|
|
42
|
+
}, [
|
|
43
|
+
D(M(Y), _(t.$attrs, {
|
|
44
|
+
style: c.style,
|
|
45
|
+
"model-value": c.modelValue,
|
|
46
|
+
"onUpdate:modelValue": a,
|
|
47
|
+
onChange: o
|
|
48
|
+
}), null, 16, ["style", "model-value"])
|
|
49
|
+
], 2));
|
|
50
|
+
}
|
|
51
|
+
}), P = A(k);
|
|
52
|
+
export {
|
|
53
|
+
p as D,
|
|
54
|
+
P as Z,
|
|
55
|
+
O as d,
|
|
56
|
+
N as v
|
|
57
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as o, createElementBlock as s, createElementVNode as l, createTextVNode as a, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as d } from "vue";
|
|
2
|
+
import { D as u } from "./DatePicker-DdLVvq3M.js";
|
|
3
|
+
import { w as f } from "./utils-amzq0_Yw.js";
|
|
4
|
+
const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "info-pair--title--tip"
|
|
7
|
+
}, D = /* @__PURE__ */ r({
|
|
8
|
+
name: "zh-detail-sub-title",
|
|
9
|
+
__name: "DetailSubTitle",
|
|
10
|
+
props: {
|
|
11
|
+
title: {},
|
|
12
|
+
value: {},
|
|
13
|
+
ellipsis: { type: Boolean },
|
|
14
|
+
tip: {}
|
|
15
|
+
},
|
|
16
|
+
setup(n) {
|
|
17
|
+
const i = n;
|
|
18
|
+
return (e, E) => (o(), s("div", _, [
|
|
19
|
+
l("div", v, [
|
|
20
|
+
a(t(i.title) + " ", 1),
|
|
21
|
+
e.tip ? (o(), s("div", h, t(e.tip), 1)) : p("", !0)
|
|
22
|
+
]),
|
|
23
|
+
l("div", {
|
|
24
|
+
class: c(["info-pair--value", { ellipsis: e.ellipsis }])
|
|
25
|
+
}, [
|
|
26
|
+
m(e.$slots, "value", {}, () => [
|
|
27
|
+
a(t(i.value || d(u)), 1)
|
|
28
|
+
])
|
|
29
|
+
], 2)
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
}), b = f(D);
|
|
33
|
+
export {
|
|
34
|
+
b as Z
|
|
35
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineComponent as b, openBlock as l, createBlock as r, unref as p, mergeProps as s, createSlots as N, withCtx as a, renderSlot as u, resolveDynamicComponent as d, createElementBlock as n, Fragment as f, renderList as k, toDisplayString as m, createCommentVNode as V, createVNode as i, createElementVNode as y, createTextVNode as h } from "vue";
|
|
2
|
+
import { a as v, b as C, c } from "./vendor-Cv1TpEaZ.js";
|
|
3
|
+
import { _ as E } from "./Button-DnpxJA88.js";
|
|
4
|
+
import { w as D } from "./utils-amzq0_Yw.js";
|
|
5
|
+
const $ = { class: "el-dialog__title" }, w = { key: 0 }, z = { key: 1 }, F = { class: "dialog-footer" }, T = { class: "dialog-footer" }, U = /* @__PURE__ */ b({
|
|
6
|
+
name: "zh-dialog",
|
|
7
|
+
__name: "Dialog",
|
|
8
|
+
setup(B) {
|
|
9
|
+
return (e, g) => (l(), r(p(v), s({
|
|
10
|
+
modelValue: e.dialogVisible,
|
|
11
|
+
"onUpdate:modelValue": g[0] || (g[0] = (o) => e.dialogVisible = o),
|
|
12
|
+
title: e.dialogTitle,
|
|
13
|
+
width: e.props.width,
|
|
14
|
+
"destroy-on-close": !0
|
|
15
|
+
}, e.$attrs, { class: "base-dialog" }), N({
|
|
16
|
+
header: a(() => [
|
|
17
|
+
y("span", $, m(e.dialogTitle), 1)
|
|
18
|
+
]),
|
|
19
|
+
default: a(() => [
|
|
20
|
+
e.slots.default ? u(e.$slots, "default", { key: 0 }, void 0, !0) : (l(), r(d(e.component.ElForm), s({ key: 1 }, e.formOptions.form, {
|
|
21
|
+
ref: "proFormRef",
|
|
22
|
+
model: e.model,
|
|
23
|
+
rules: e.formOptions.rules
|
|
24
|
+
}), {
|
|
25
|
+
default: a(() => [
|
|
26
|
+
(l(!0), n(f, null, k(e.formOptions.columns, (o) => (l(), n(f, {
|
|
27
|
+
key: o.prop
|
|
28
|
+
}, [
|
|
29
|
+
o.formItem.hidden ? (l(), r(d(`el-${o.attrs.typeName}`), s({
|
|
30
|
+
key: 0,
|
|
31
|
+
ref_for: !0
|
|
32
|
+
}, o.attrs, {
|
|
33
|
+
modelValue: e.model[o.formItem.prop],
|
|
34
|
+
"onUpdate:modelValue": (t) => e.model[o.formItem.prop] = t
|
|
35
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (l(), r(d(e.component.ElFormItem), s({
|
|
36
|
+
key: 1,
|
|
37
|
+
ref_for: !0
|
|
38
|
+
}, o.formItem), {
|
|
39
|
+
default: a(() => [
|
|
40
|
+
(l(), r(d(`el-${o.attrs.typeName}`), s({ ref_for: !0 }, o.attrs, {
|
|
41
|
+
modelValue: e.model[o.formItem.prop],
|
|
42
|
+
"onUpdate:modelValue": (t) => e.model[o.formItem.prop] = t
|
|
43
|
+
}), {
|
|
44
|
+
default: a(() => [
|
|
45
|
+
o.attrs.typeName === "text" ? (l(), n("span", w, m(e.model[o.formItem.prop]), 1)) : V("", !0),
|
|
46
|
+
o.attrs.typeName === "cascader" ? (l(), n("span", z, m(o.formItem.label), 1)) : V("", !0),
|
|
47
|
+
o.attrs.typeName === "select" ? (l(!0), n(f, { key: 2 }, k(o.attrs.enum, (t, I) => (l(), r(d(e.component.ElOption), {
|
|
48
|
+
key: I,
|
|
49
|
+
label: t[o.attrs.fieldNames.label],
|
|
50
|
+
value: t[o.attrs.fieldNames.value]
|
|
51
|
+
}, null, 8, ["label", "value"]))), 128)) : u(e.$slots, "default", { key: 3 }, void 0, !0)
|
|
52
|
+
]),
|
|
53
|
+
_: 2
|
|
54
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"]))
|
|
55
|
+
]),
|
|
56
|
+
_: 2
|
|
57
|
+
}, 1040))
|
|
58
|
+
], 64))), 128)),
|
|
59
|
+
i(p(C), null, {
|
|
60
|
+
default: a(() => [
|
|
61
|
+
u(e.$slots, "operation", {}, void 0, !0)
|
|
62
|
+
]),
|
|
63
|
+
_: 3
|
|
64
|
+
})
|
|
65
|
+
]),
|
|
66
|
+
_: 3
|
|
67
|
+
}, 16, ["model", "rules"]))
|
|
68
|
+
]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, [
|
|
71
|
+
e.slots.footer ? {
|
|
72
|
+
name: "footer",
|
|
73
|
+
fn: a(() => [
|
|
74
|
+
y("span", F, [
|
|
75
|
+
u(e.$slots, "footer", {}, void 0, !0)
|
|
76
|
+
])
|
|
77
|
+
]),
|
|
78
|
+
key: "0"
|
|
79
|
+
} : {
|
|
80
|
+
name: "footer",
|
|
81
|
+
fn: a(() => [
|
|
82
|
+
y("span", T, [
|
|
83
|
+
i(p(c), {
|
|
84
|
+
size: "large",
|
|
85
|
+
onClick: e.closeDialog
|
|
86
|
+
}, {
|
|
87
|
+
default: a(() => [
|
|
88
|
+
h(m(e.dialogCancelText), 1)
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["onClick"]),
|
|
92
|
+
i(p(c), {
|
|
93
|
+
size: "large",
|
|
94
|
+
type: "primary",
|
|
95
|
+
onClick: e.submit
|
|
96
|
+
}, {
|
|
97
|
+
default: a(() => [
|
|
98
|
+
h(m(e.dialogSubmitText), 1)
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["onClick"])
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
key: "1"
|
|
105
|
+
}
|
|
106
|
+
]), 1040, ["modelValue", "title", "width"]));
|
|
107
|
+
}
|
|
108
|
+
}), _ = /* @__PURE__ */ E(U, [["__scopeId", "data-v-c0d85cb8"]]), P = D(_);
|
|
109
|
+
export {
|
|
110
|
+
P as Z,
|
|
111
|
+
_ as z
|
|
112
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as o, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as d, unref as m } from "vue";
|
|
2
|
+
import { D as f } from "./DatePicker-DdLVvq3M.js";
|
|
3
|
+
import { _ } from "./Button-DnpxJA88.js";
|
|
4
|
+
import { w as u } from "./utils-amzq0_Yw.js";
|
|
5
|
+
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, E = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "info-pair--title--tip"
|
|
8
|
+
}, I = /* @__PURE__ */ l({
|
|
9
|
+
name: "zh-edit-info-pair",
|
|
10
|
+
__name: "EditInfoPair",
|
|
11
|
+
props: {
|
|
12
|
+
title: {},
|
|
13
|
+
value: {},
|
|
14
|
+
ellipsis: { type: Boolean },
|
|
15
|
+
tip: {}
|
|
16
|
+
},
|
|
17
|
+
setup(n) {
|
|
18
|
+
const i = n;
|
|
19
|
+
return (e, k) => (o(), s("div", v, [
|
|
20
|
+
a("div", h, [
|
|
21
|
+
r(t(i.title) + " ", 1),
|
|
22
|
+
e.tip ? (o(), s("div", E, t(e.tip), 1)) : p("", !0)
|
|
23
|
+
]),
|
|
24
|
+
a("div", {
|
|
25
|
+
class: c(["info-pair--value", { ellipsis: e.ellipsis }])
|
|
26
|
+
}, [
|
|
27
|
+
d(e.$slots, "value", {}, () => [
|
|
28
|
+
r(t(i.value || m(f)), 1)
|
|
29
|
+
], !0)
|
|
30
|
+
], 2)
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
}), V = /* @__PURE__ */ _(I, [["__scopeId", "data-v-8ed96c83"]]), N = u(V);
|
|
34
|
+
export {
|
|
35
|
+
N as Z
|
|
36
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as i, createElementBlock as o, toDisplayString as n, createCommentVNode as s, createElementVNode as t, createVNode as p, unref as m, withCtx as _, createTextVNode as u } from "vue";
|
|
2
|
+
import { D as w } from "./DatePicker-DdLVvq3M.js";
|
|
3
|
+
import { d as y } from "./vendor-Cv1TpEaZ.js";
|
|
4
|
+
import { _ as h } from "./Button-DnpxJA88.js";
|
|
5
|
+
import { w as v } from "./utils-amzq0_Yw.js";
|
|
6
|
+
const k = { class: "file_wrapper" }, x = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "header"
|
|
9
|
+
}, F = { class: "file_main" }, N = { class: "file" }, g = { class: "file_name" }, D = /* @__PURE__ */ f({
|
|
10
|
+
name: "zh-file-wrapper",
|
|
11
|
+
__name: "FileWrapper",
|
|
12
|
+
props: {
|
|
13
|
+
downLoadUrl: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
canPreview: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
fileName: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: w
|
|
24
|
+
},
|
|
25
|
+
canDelete: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
fileId: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 0
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["deleteFile"],
|
|
39
|
+
setup(a, { emit: r }) {
|
|
40
|
+
const e = a, d = r, c = () => {
|
|
41
|
+
e.canDelete && d("deleteFile", e.fileId);
|
|
42
|
+
};
|
|
43
|
+
return (L, l) => (i(), o("div", k, [
|
|
44
|
+
e.title ? (i(), o("div", x, n(e.title), 1)) : s("", !0),
|
|
45
|
+
t("div", F, [
|
|
46
|
+
t("div", N, [
|
|
47
|
+
l[0] || (l[0] = t("div", { class: "file_type mr-12" }, [
|
|
48
|
+
t("i", { class: "iconfont icon-xiangmuguanli" })
|
|
49
|
+
], -1)),
|
|
50
|
+
t("div", g, n(e.fileName), 1)
|
|
51
|
+
]),
|
|
52
|
+
p(m(y), {
|
|
53
|
+
size: "small",
|
|
54
|
+
class: "btn",
|
|
55
|
+
link: "",
|
|
56
|
+
style: { width: "80px" },
|
|
57
|
+
href: e.downLoadUrl,
|
|
58
|
+
underline: !1,
|
|
59
|
+
download: "download"
|
|
60
|
+
}, {
|
|
61
|
+
default: _(() => l[1] || (l[1] = [
|
|
62
|
+
u(" 查看/下载 ")
|
|
63
|
+
])),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["href"]),
|
|
66
|
+
a.canDelete ? (i(), o("i", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: "iconfont icon-close close",
|
|
69
|
+
onClick: c
|
|
70
|
+
})) : s("", !0)
|
|
71
|
+
])
|
|
72
|
+
]));
|
|
73
|
+
}
|
|
74
|
+
}), E = /* @__PURE__ */ h(D, [["__scopeId", "data-v-480bb0e6"]]), S = v(E);
|
|
75
|
+
export {
|
|
76
|
+
S as Z
|
|
77
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { defineComponent as $, onBeforeMount as B, useSlots as C, ref as k, computed as f, onMounted as L, onActivated as S, onUnmounted as j, onDeactivated as M, provide as p, watch as z, openBlock as P, createElementBlock as R, normalizeStyle as Z, renderSlot as D } from "vue";
|
|
2
|
+
import { w as H } from "./utils-amzq0_Yw.js";
|
|
3
|
+
const N = /* @__PURE__ */ $({
|
|
4
|
+
name: "zh-grid",
|
|
5
|
+
__name: "Grid",
|
|
6
|
+
props: {
|
|
7
|
+
cols: { default: () => ({ xs: 1, sm: 2, md: 2, lg: 4, xl: 4 }) },
|
|
8
|
+
collapsed: { type: Boolean, default: !1 },
|
|
9
|
+
collapsedRows: { default: 1 },
|
|
10
|
+
gap: { default: 10 }
|
|
11
|
+
},
|
|
12
|
+
setup(A, { expose: E }) {
|
|
13
|
+
const t = A;
|
|
14
|
+
B(() => t.collapsed && u()), L(() => {
|
|
15
|
+
o({ target: { innerWidth: window.innerWidth } }), window.addEventListener("resize", o);
|
|
16
|
+
}), S(() => {
|
|
17
|
+
o({ target: { innerWidth: window.innerWidth } }), window.addEventListener("resize", o);
|
|
18
|
+
}), j(() => {
|
|
19
|
+
window.removeEventListener("resize", o);
|
|
20
|
+
}), M(() => {
|
|
21
|
+
window.removeEventListener("resize", o);
|
|
22
|
+
});
|
|
23
|
+
const o = (s) => {
|
|
24
|
+
let e = s.target.innerWidth;
|
|
25
|
+
switch (!!e) {
|
|
26
|
+
case e < 768:
|
|
27
|
+
r.value = "xs";
|
|
28
|
+
break;
|
|
29
|
+
case (e >= 768 && e < 992):
|
|
30
|
+
r.value = "sm";
|
|
31
|
+
break;
|
|
32
|
+
case (e >= 992 && e < 1200):
|
|
33
|
+
r.value = "md";
|
|
34
|
+
break;
|
|
35
|
+
case (e >= 1200 && e < 1920):
|
|
36
|
+
r.value = "lg";
|
|
37
|
+
break;
|
|
38
|
+
case e >= 1920:
|
|
39
|
+
r.value = "xl";
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
p("gap", Array.isArray(t.gap) ? t.gap[0] : t.gap);
|
|
44
|
+
let r = k("xl");
|
|
45
|
+
p("breakPoint", r);
|
|
46
|
+
const i = k(-1);
|
|
47
|
+
p("shouldHiddenIndex", i);
|
|
48
|
+
const d = f(() => typeof t.cols == "object" ? t.cols[r.value] ?? t.cols : t.cols);
|
|
49
|
+
p("cols", d);
|
|
50
|
+
const G = C().default(), u = () => {
|
|
51
|
+
var m, v, g, h;
|
|
52
|
+
let s = [], e = null;
|
|
53
|
+
G.forEach((a) => {
|
|
54
|
+
var n;
|
|
55
|
+
typeof a.type == "object" && a.type.name === "GridItem" && ((n = a.props) == null ? void 0 : n.suffix) !== void 0 && (e = a), typeof a.type == "symbol" && Array.isArray(a.children) && s.push(...a.children);
|
|
56
|
+
});
|
|
57
|
+
let c = 0;
|
|
58
|
+
e && (c = (((m = e.props[r.value]) == null ? void 0 : m.span) ?? ((v = e.props) == null ? void 0 : v.span) ?? 1) + (((g = e.props[r.value]) == null ? void 0 : g.offset) ?? ((h = e.props) == null ? void 0 : h.offset) ?? 0));
|
|
59
|
+
try {
|
|
60
|
+
let a = !1;
|
|
61
|
+
s.reduce((n = 0, l, _) => {
|
|
62
|
+
var w, y, x, b;
|
|
63
|
+
if (n += (((w = l.props[r.value]) == null ? void 0 : w.span) ?? ((y = l.props) == null ? void 0 : y.span) ?? 1) + (((x = l.props[r.value]) == null ? void 0 : x.offset) ?? ((b = l.props) == null ? void 0 : b.offset) ?? 0), Number(n) > t.collapsedRows * d.value - c)
|
|
64
|
+
throw i.value = _, a = !0, "find it";
|
|
65
|
+
return n;
|
|
66
|
+
}, 0), a || (i.value = -1);
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
z(
|
|
71
|
+
() => r.value,
|
|
72
|
+
() => {
|
|
73
|
+
t.collapsed && u();
|
|
74
|
+
}
|
|
75
|
+
), z(
|
|
76
|
+
() => t.collapsed,
|
|
77
|
+
(s) => {
|
|
78
|
+
if (s) return u();
|
|
79
|
+
i.value = -1;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
const I = f(() => typeof t.gap == "number" ? `${t.gap}px` : Array.isArray(t.gap) ? `${t.gap[1]}px ${t.gap[0]}px` : "unset"), W = f(() => ({
|
|
83
|
+
display: "grid",
|
|
84
|
+
gridGap: I.value,
|
|
85
|
+
gridTemplateColumns: `repeat(${d.value}, minmax(0, 1fr))`
|
|
86
|
+
}));
|
|
87
|
+
return E({ breakPoint: r }), (s, e) => (P(), R("div", {
|
|
88
|
+
style: Z(W.value)
|
|
89
|
+
}, [
|
|
90
|
+
D(s.$slots, "default")
|
|
91
|
+
], 4));
|
|
92
|
+
}
|
|
93
|
+
}), q = H(N);
|
|
94
|
+
export {
|
|
95
|
+
q as Z
|
|
96
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as i, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as f } from "vue";
|
|
2
|
+
import { D as d } from "./DatePicker-DdLVvq3M.js";
|
|
3
|
+
import { _ } from "./Button-DnpxJA88.js";
|
|
4
|
+
import { w as u } from "./utils-amzq0_Yw.js";
|
|
5
|
+
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, I = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "info-pair--title--tip"
|
|
8
|
+
}, E = /* @__PURE__ */ l({
|
|
9
|
+
name: "zh-info-pair",
|
|
10
|
+
__name: "InfoPair",
|
|
11
|
+
props: {
|
|
12
|
+
title: {},
|
|
13
|
+
value: {},
|
|
14
|
+
ellipsis: { type: Boolean },
|
|
15
|
+
tip: {}
|
|
16
|
+
},
|
|
17
|
+
setup(n) {
|
|
18
|
+
const o = n;
|
|
19
|
+
return (e, k) => (i(), s("div", v, [
|
|
20
|
+
a("div", h, [
|
|
21
|
+
r(t(o.title) + " ", 1),
|
|
22
|
+
e.tip ? (i(), s("div", I, t(e.tip), 1)) : p("", !0)
|
|
23
|
+
]),
|
|
24
|
+
a("div", {
|
|
25
|
+
class: c(["info-pair--value", { ellipsis: e.ellipsis }])
|
|
26
|
+
}, [
|
|
27
|
+
m(e.$slots, "value", {}, () => [
|
|
28
|
+
r(t(o.value || f(d)), 1)
|
|
29
|
+
], !0)
|
|
30
|
+
], 2)
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
}), V = /* @__PURE__ */ _(E, [["__scopeId", "data-v-7c46e10e"]]), N = u(V);
|
|
34
|
+
export {
|
|
35
|
+
N as Z
|
|
36
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as b, useAttrs as v, useModel as k, openBlock as h, createElementBlock as I, normalizeClass as z, createVNode as S, unref as $, mergeProps as N, createSlots as x, renderList as _, withCtx as y, renderSlot as B, normalizeProps as M, guardReactiveProps as C, mergeModels as E, normalizeStyle as j } from "vue";
|
|
2
|
+
import { e as P } from "./vendor-Cv1TpEaZ.js";
|
|
3
|
+
import { _ as U } from "./Button-DnpxJA88.js";
|
|
4
|
+
import { w as Z } from "./utils-amzq0_Yw.js";
|
|
5
|
+
const A = /* @__PURE__ */ b({
|
|
6
|
+
name: "zh-input",
|
|
7
|
+
__name: "Input",
|
|
8
|
+
props: /* @__PURE__ */ E({
|
|
9
|
+
style: {},
|
|
10
|
+
class: { default: "zh-default-input" },
|
|
11
|
+
size: { default: "default" },
|
|
12
|
+
className: {}
|
|
13
|
+
}, {
|
|
14
|
+
modelValue: {},
|
|
15
|
+
modelModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:modelValue"],
|
|
18
|
+
setup(d) {
|
|
19
|
+
const o = v(), r = d, l = k(d, "modelValue"), s = () => {
|
|
20
|
+
(o.max || Number(o.max) === 0) && Number(l.value) >= o.max && (l.value = o.max.toString()), (o.min || Number(o.min) === 0) && Number(l.value) <= o.min && (l.value = o.min.toString());
|
|
21
|
+
};
|
|
22
|
+
return (m, p) => (h(), I("div", {
|
|
23
|
+
class: z(r.class)
|
|
24
|
+
}, [
|
|
25
|
+
S($(P), N(m.$attrs, {
|
|
26
|
+
modelValue: l.value,
|
|
27
|
+
"onUpdate:modelValue": p[0] || (p[0] = (a) => l.value = a),
|
|
28
|
+
size: m.size,
|
|
29
|
+
onBlur: s
|
|
30
|
+
}), x({ _: 2 }, [
|
|
31
|
+
_(m.$slots, (a, g) => ({
|
|
32
|
+
name: a,
|
|
33
|
+
fn: y((t) => [
|
|
34
|
+
B(m.$slots, a, M(C(t)), void 0, !0)
|
|
35
|
+
])
|
|
36
|
+
}))
|
|
37
|
+
]), 1040, ["modelValue", "size"])
|
|
38
|
+
], 2));
|
|
39
|
+
}
|
|
40
|
+
}), H = /* @__PURE__ */ U(A, [["__scopeId", "data-v-75a9ec9f"]]), G = Z(H), L = /* @__PURE__ */ b({
|
|
41
|
+
name: "zh-input-number",
|
|
42
|
+
__name: "InputNumber",
|
|
43
|
+
props: {
|
|
44
|
+
style: {},
|
|
45
|
+
class: {},
|
|
46
|
+
modelValue: {}
|
|
47
|
+
},
|
|
48
|
+
emits: ["update:modelValue"],
|
|
49
|
+
setup(d, { emit: o }) {
|
|
50
|
+
const r = d, l = o, s = v(), m = (t, n = 0, u = 0, c = 0) => {
|
|
51
|
+
let e = (t == null ? void 0 : t.toString()) ?? "", i, f, V;
|
|
52
|
+
return u === 0 ? (e = e.replace(/[^\d]/g, ""), e = e.replace(/^0\d+/g, "0"), n !== 0 && (e = e.slice(0, n))) : (e = e.replace(/[^\-\d.]/g, ""), e = e.replace(/^[^\-\d]/g, ""), e = e.replace(/\.{2}/g, "."), e = e.replace(/^0(\d+)/g, "$1"), i = e.split(".") || [], i.length > 1 ? (n === 0 ? f = i[0] : f = i[0].slice(0, n), V = i[1].slice(0, u), e = f + "." + V) : n !== 0 && (e = e.slice(0, n))), c !== 0 && (e = e.slice(0, c)), e;
|
|
53
|
+
}, p = () => {
|
|
54
|
+
r.modelValue === "" || r.modelValue === void 0 || (s.max && Number(r.modelValue) > s.max && l("update:modelValue", s.max.toString()), s.min && Number(r.modelValue) < s.min && l("update:modelValue", s.min.toString()));
|
|
55
|
+
}, a = (t) => t ? m(
|
|
56
|
+
t,
|
|
57
|
+
s.integer,
|
|
58
|
+
s.precision,
|
|
59
|
+
s.maxLength
|
|
60
|
+
) : "", g = (t) => {
|
|
61
|
+
/^\d+\.0*$/.test((t == null ? void 0 : t.toString()) || "") || t === "" ? l("update:modelValue", a(t)) : l("update:modelValue", Number(a(t)));
|
|
62
|
+
};
|
|
63
|
+
return (t, n) => (h(), I("div", {
|
|
64
|
+
class: z(["input-number", r.class]),
|
|
65
|
+
style: j(r.style)
|
|
66
|
+
}, [
|
|
67
|
+
S($(P), N(t.$attrs, {
|
|
68
|
+
"model-value": r.modelValue,
|
|
69
|
+
"onUpdate:modelValue": g,
|
|
70
|
+
onBlur: p,
|
|
71
|
+
style: { width: "100%" },
|
|
72
|
+
formatter: a
|
|
73
|
+
}), x({ _: 2 }, [
|
|
74
|
+
_(Object.keys(t.$slots), (u) => ({
|
|
75
|
+
name: u,
|
|
76
|
+
fn: y((c) => [
|
|
77
|
+
B(t.$slots, u, M(C(c)), void 0, !0)
|
|
78
|
+
])
|
|
79
|
+
}))
|
|
80
|
+
]), 1040, ["model-value"])
|
|
81
|
+
], 6));
|
|
82
|
+
}
|
|
83
|
+
}), O = /* @__PURE__ */ U(L, [["__scopeId", "data-v-32d536a9"]]), J = Z(O);
|
|
84
|
+
export {
|
|
85
|
+
O as I,
|
|
86
|
+
G as Z,
|
|
87
|
+
J as a
|
|
88
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as a, createElementBlock as s, createElementVNode as o } from "vue";
|
|
2
|
+
import { _ as e } from "./Button-DnpxJA88.js";
|
|
3
|
+
import { w as i } from "./utils-amzq0_Yw.js";
|
|
4
|
+
const r = { class: "loading-box" }, c = /* @__PURE__ */ t({
|
|
5
|
+
name: "zh-loading",
|
|
6
|
+
__name: "Loading",
|
|
7
|
+
setup(p) {
|
|
8
|
+
return (_, n) => (a(), s("div", r, n[0] || (n[0] = [
|
|
9
|
+
o("div", { class: "loading-wrap" }, [
|
|
10
|
+
o("span", { class: "dot dot-spin" }, [
|
|
11
|
+
o("i"),
|
|
12
|
+
o("i"),
|
|
13
|
+
o("i"),
|
|
14
|
+
o("i")
|
|
15
|
+
])
|
|
16
|
+
], -1)
|
|
17
|
+
])));
|
|
18
|
+
}
|
|
19
|
+
}), d = /* @__PURE__ */ e(c, [["__scopeId", "data-v-bcc04aa5"]]), g = i(d);
|
|
20
|
+
export {
|
|
21
|
+
g as Z
|
|
22
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineComponent as k, useModel as P, ref as m, openBlock as n, createBlock as p, mergeProps as r, withCtx as u, createElementBlock as w, toDisplayString as V, createCommentVNode as v, resolveDynamicComponent as M, normalizeProps as C, unref as c, createVNode as h, mergeModels as g } from "vue";
|
|
2
|
+
import { f as F, b as I, e as z } from "./vendor-Cv1TpEaZ.js";
|
|
3
|
+
import { z as E } from "./Dialog-D9YXcRFu.js";
|
|
4
|
+
import { _ } from "./Button-DnpxJA88.js";
|
|
5
|
+
import { w as A } from "./utils-amzq0_Yw.js";
|
|
6
|
+
const D = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "tips"
|
|
9
|
+
}, T = /* @__PURE__ */ k({
|
|
10
|
+
name: "zh-message-box",
|
|
11
|
+
__name: "MessageBox",
|
|
12
|
+
props: /* @__PURE__ */ g({
|
|
13
|
+
title: {},
|
|
14
|
+
subtitle: {},
|
|
15
|
+
tip: {},
|
|
16
|
+
placeholder: {},
|
|
17
|
+
formItemProps: {},
|
|
18
|
+
formProps: {},
|
|
19
|
+
inputProps: {},
|
|
20
|
+
closeOnClickModal: { type: Boolean },
|
|
21
|
+
callBack: { type: Function },
|
|
22
|
+
onAction: { type: Function },
|
|
23
|
+
onVanish: { type: Function },
|
|
24
|
+
submitText: {},
|
|
25
|
+
render: { type: Function },
|
|
26
|
+
maxlength: {},
|
|
27
|
+
renderProps: {}
|
|
28
|
+
}, {
|
|
29
|
+
visible: { type: Boolean, default: !0 },
|
|
30
|
+
visibleModifiers: {}
|
|
31
|
+
}),
|
|
32
|
+
emits: /* @__PURE__ */ g(["action", "vanish"], ["update:visible"]),
|
|
33
|
+
setup(d, { emit: y }) {
|
|
34
|
+
const t = d, i = y, l = P(d, "visible"), f = m(), s = m({
|
|
35
|
+
textarea: ""
|
|
36
|
+
}), x = m({
|
|
37
|
+
textarea: [{ validator: (e, a, o) => {
|
|
38
|
+
a || o(t.placeholder), o();
|
|
39
|
+
}, trigger: ["blur", "change"] }]
|
|
40
|
+
}), b = async () => {
|
|
41
|
+
var e;
|
|
42
|
+
t.placeholder ? (e = f.value) == null || e.validate(async (a) => {
|
|
43
|
+
if (a)
|
|
44
|
+
try {
|
|
45
|
+
if (t.callBack) {
|
|
46
|
+
const o = await t.callBack(s.value.textarea);
|
|
47
|
+
console.log(o);
|
|
48
|
+
}
|
|
49
|
+
i("action", "submit"), l.value = !1;
|
|
50
|
+
} catch (o) {
|
|
51
|
+
console.log(o);
|
|
52
|
+
}
|
|
53
|
+
}) : (i("action", "submit"), l.value = !1);
|
|
54
|
+
}, B = () => {
|
|
55
|
+
i("action", "cancel"), l.value = !1;
|
|
56
|
+
};
|
|
57
|
+
return (e, a) => (n(), p(E, r({
|
|
58
|
+
modelValue: l.value,
|
|
59
|
+
"onUpdate:modelValue": a[1] || (a[1] = (o) => l.value = o),
|
|
60
|
+
width: "544"
|
|
61
|
+
}, t, {
|
|
62
|
+
onSubmit: b,
|
|
63
|
+
onClose: B
|
|
64
|
+
}), {
|
|
65
|
+
default: u(() => [
|
|
66
|
+
e.tip ? (n(), w("div", D, V(e.tip), 1)) : v("", !0),
|
|
67
|
+
e.render ? (n(), p(M(e.render), C(r({ key: 1 }, t.renderProps)), null, 16)) : e.placeholder ? (n(), p(c(F), r({
|
|
68
|
+
key: 2,
|
|
69
|
+
ref_key: "formRef",
|
|
70
|
+
ref: f,
|
|
71
|
+
model: s.value,
|
|
72
|
+
rules: x.value
|
|
73
|
+
}, t.formProps), {
|
|
74
|
+
default: u(() => [
|
|
75
|
+
h(c(I), r({ prop: "textarea" }, t.formItemProps), {
|
|
76
|
+
default: u(() => [
|
|
77
|
+
h(c(z), r({
|
|
78
|
+
modelValue: s.value.textarea,
|
|
79
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value.textarea = o),
|
|
80
|
+
style: { width: "100%" },
|
|
81
|
+
rows: 4,
|
|
82
|
+
type: "textarea",
|
|
83
|
+
placeholder: e.placeholder,
|
|
84
|
+
maxlength: t.maxlength || 100,
|
|
85
|
+
"show-word-limit": ""
|
|
86
|
+
}, e.inputProps), null, 16, ["modelValue", "placeholder", "maxlength"])
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 16)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 16, ["model", "rules"])) : v("", !0)
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 16, ["modelValue"]));
|
|
96
|
+
}
|
|
97
|
+
}), N = /* @__PURE__ */ _(T, [["__scopeId", "data-v-1903b5ef"]]), q = A(N);
|
|
98
|
+
export {
|
|
99
|
+
q as Z
|
|
100
|
+
};
|