zhihao-ui 1.2.29 → 1.2.31
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/{BaseInfo-XETJaruy.js → BaseInfo-CAuR2Id0.js} +1 -1
- package/dist/es/BaseItem-CQzBP1WX.js +129 -0
- package/dist/es/{Button-CzjgaPIL.js → Button-D-R-2Fix.js} +4 -4
- package/dist/es/DatePicker-BDz_yTX2.js +36 -0
- package/dist/es/{DetailHeader-C7L01g9Z.js → DetailHeader-CBN9CqAp.js} +3 -3
- package/dist/es/{DetailSubTitle-ChWfR3qA.js → DetailSubTitle-DsnSxPKH.js} +2 -2
- package/dist/es/{Dialog-Cky8TKRM.js → Dialog-C_hAbDgU.js} +3 -3
- package/dist/es/{DiyDataTable-D1s7-cdV.js → DiyDataTable-CXSUoapn.js} +10 -10
- package/dist/es/{EditInfoPair-C0EG8kUd.js → EditInfoPair-C0Ielr4q.js} +3 -3
- package/dist/es/{FileWrapper-CmvheBNp.js → FileWrapper-DFqY2SD_.js} +4 -4
- package/dist/es/Grid-CLg9sn2Y.js +198 -0
- package/dist/es/{InfoPair-JA1pAAyP.js → InfoPair-6agPuvqq.js} +3 -3
- package/dist/es/{Input-12ajHBoj.js → Input-CzlIXSCf.js} +3 -3
- package/dist/es/{Loading-CHji9tKE.js → Loading-ClE8eADM.js} +2 -2
- package/dist/es/{Map-Bq9kPMot.js → Map-BJc6GMOA.js} +231 -222
- package/dist/es/{MessageBox-1NCCwju7.js → MessageBox-CBMAgp6C.js} +2 -2
- package/dist/es/{MoneyInput-PI2K9BeH.js → MoneyInput-EODuzFjO.js} +17 -18
- package/dist/es/{PageHeadPanel-CBDItYUC.js → PageHeadPanel-DDnMIqmC.js} +2 -2
- package/dist/es/{Table-BBWU5wYF.js → Table-D7YUOcI0.js} +132 -130
- package/dist/es/{ToolTips-BBCd543g.js → ToolTips-BpZo8gsa.js} +3 -3
- package/dist/es/index.js +67 -60
- package/dist/es/utils-BbWQLYZL.js +52 -0
- package/dist/es/{vendor-BhAIOWbw.js → vendor-Cq716b5Q.js} +2034 -2019
- package/dist/index.css +1 -1
- package/dist/types/components/BaseItem/BaseItem.test.d.ts +1 -0
- package/dist/types/components/BaseItem/BaseItem.vue.d.ts +50 -0
- package/dist/types/components/BaseItem/index.d.ts +209 -0
- package/dist/types/components/BaseItem/types.d.ts +39 -0
- package/dist/types/components/DatePicker/DatePicker.vue.d.ts +2 -2
- package/dist/types/components/DatePicker/index.d.ts +5 -5
- package/dist/types/components/Dialog/Dialog.vue.d.ts +29 -29
- package/dist/types/components/Dialog/index.d.ts +45 -45
- package/dist/types/components/FileWrapper/FileWrapper.vue.d.ts +2 -2
- package/dist/types/components/FileWrapper/index.d.ts +6 -6
- package/dist/types/components/Grid/Grid.vue.d.ts +7 -9
- package/dist/types/components/Grid/components/GridItem.vue.d.ts +71 -0
- package/dist/types/components/Grid/components/MultiGrid.vue.d.ts +11 -0
- package/dist/types/components/Grid/components/collectGridItems.d.ts +9 -0
- package/dist/types/components/Grid/index.d.ts +187 -0
- package/dist/types/components/Grid/types.d.ts +14 -1
- package/dist/types/components/Map/config.d.ts +1 -0
- package/dist/types/components/Map/interface/entity/render.d.ts +2 -0
- package/dist/types/components/Map/render/renderPoint.d.ts +1 -2
- package/dist/types/components/Table/components/ColSetting.vue.d.ts +2 -2
- package/dist/types/components/Table/components/SearchForm.vue.d.ts +2 -2
- package/dist/types/components/ToolTips/ToolTips.vue.d.ts +1 -1
- package/dist/types/components/ToolTips/index.d.ts +3 -3
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/utils/color.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +19 -19
- package/package.json +1 -1
- package/dist/es/DatePicker-DNgii92T.js +0 -58
- package/dist/es/Grid-CfJ_U3gi.js +0 -96
- package/dist/es/utils-BIGjF-zg.js +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as o, provide as n, watch as i, resolveComponent as p, openBlock as m, createBlock as W, withCtx as v, renderSlot as b } from "vue";
|
|
2
|
-
import { w as g } from "./utils-
|
|
2
|
+
import { w as g } from "./utils-BbWQLYZL.js";
|
|
3
3
|
const C = /* @__PURE__ */ h({
|
|
4
4
|
name: "ZhBaseInfo",
|
|
5
5
|
__name: "BaseInfo",
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as R, useSlots as T, inject as z, computed as n, ref as M, watchEffect as A, openBlock as t, createBlock as u, unref as i, withCtx as d, createElementVNode as h, normalizeClass as m, normalizeStyle as W, resolveDynamicComponent as k, createElementBlock as o, toDisplayString as s, renderSlot as S, Fragment as v, withModifiers as V, createTextVNode as f, createVNode as p, createCommentVNode as O } from "vue";
|
|
2
|
+
import { E as D, a as Z, d as g } from "./vendor-Cq716b5Q.js";
|
|
3
|
+
import { Z as G } from "./Grid-CLg9sn2Y.js";
|
|
4
|
+
import { w as U } from "./utils-BbWQLYZL.js";
|
|
5
|
+
const b = "--", X = "YYYY-MM-DDTHH:mm:ss", x = "YYYY-MM-DDT23:59:59", ee = "YYYY-MM-DD", le = "https://static.zhihaoscm.cn/", _ = { key: 1 }, H = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "zh-base-item--value--file"
|
|
8
|
+
}, $ = { key: 2 }, j = /* @__PURE__ */ R({
|
|
9
|
+
name: "ZhBaseItem",
|
|
10
|
+
__name: "BaseItem",
|
|
11
|
+
props: {
|
|
12
|
+
label: {},
|
|
13
|
+
labelRender: {},
|
|
14
|
+
colon: { type: Boolean, default: !1 },
|
|
15
|
+
value: {},
|
|
16
|
+
fileId: {},
|
|
17
|
+
rewriteFileName: {},
|
|
18
|
+
valueRender: {},
|
|
19
|
+
onClick: {},
|
|
20
|
+
labelWidth: {},
|
|
21
|
+
infoDirection: { default: "horizontal" },
|
|
22
|
+
defaultValue: { default: b },
|
|
23
|
+
className: {},
|
|
24
|
+
labelClassName: {},
|
|
25
|
+
valueClassName: {},
|
|
26
|
+
span: { default: 1 },
|
|
27
|
+
showFileName: { type: Boolean, default: !0 },
|
|
28
|
+
fetchFileById: {}
|
|
29
|
+
},
|
|
30
|
+
setup(C) {
|
|
31
|
+
const I = T(), l = C, w = z(
|
|
32
|
+
"infoLabelWidth",
|
|
33
|
+
void 0
|
|
34
|
+
), F = n(() => !!(l.onClick && l.value)), y = n(() => !!(!l.value && l.fileId)), c = M(), E = n(() => {
|
|
35
|
+
var a;
|
|
36
|
+
const e = (a = c.value) == null ? void 0 : a.name;
|
|
37
|
+
if (!e)
|
|
38
|
+
return "";
|
|
39
|
+
if (l.rewriteFileName) {
|
|
40
|
+
const r = e.substring(e.lastIndexOf("."));
|
|
41
|
+
return l.rewriteFileName + r;
|
|
42
|
+
}
|
|
43
|
+
return e;
|
|
44
|
+
}), B = n(() => {
|
|
45
|
+
const e = {}, a = l.labelWidth || w;
|
|
46
|
+
return a && l.infoDirection === "horizontal" && (isNaN(Number(a)) ? e.width = a : e.width = a + "px"), e;
|
|
47
|
+
}), L = n(() => ({
|
|
48
|
+
...B.value
|
|
49
|
+
})), Y = n(() => l.value === "" ? b : l.value ?? b);
|
|
50
|
+
return A(async () => {
|
|
51
|
+
!y.value || !l.fileId || !l.fetchFileById || (c.value = await l.fetchFileById(l.fileId));
|
|
52
|
+
}), (e, a) => (t(), u(i(G), {
|
|
53
|
+
span: e.span,
|
|
54
|
+
label: e.label
|
|
55
|
+
}, {
|
|
56
|
+
default: d((r) => {
|
|
57
|
+
var N;
|
|
58
|
+
return [
|
|
59
|
+
h("div", {
|
|
60
|
+
class: m(["zh-base-item", [e.infoDirection, e.className]])
|
|
61
|
+
}, [
|
|
62
|
+
h("div", {
|
|
63
|
+
class: m(["zh-base-item-label", [e.infoDirection, e.labelClassName]]),
|
|
64
|
+
style: W({
|
|
65
|
+
width: e.infoDirection === "horizontal" && r.maxLabelWidthInCol ? r.maxLabelWidthInCol + "px" : void 0,
|
|
66
|
+
...L.value
|
|
67
|
+
})
|
|
68
|
+
}, [
|
|
69
|
+
e.labelRender ? (t(), u(k(e.labelRender), { key: 0 })) : (t(), o("span", _, s(e.label) + s(e.colon ? ":" : ""), 1))
|
|
70
|
+
], 6),
|
|
71
|
+
h("div", {
|
|
72
|
+
class: m(["zh-base-item-value", e.valueClassName])
|
|
73
|
+
}, [
|
|
74
|
+
i(I).value ? S(e.$slots, "value", {
|
|
75
|
+
key: 0,
|
|
76
|
+
content: e.value
|
|
77
|
+
}) : (t(), o(v, { key: 1 }, [
|
|
78
|
+
F.value ? (t(), u(i(D), {
|
|
79
|
+
key: 0,
|
|
80
|
+
type: "primary",
|
|
81
|
+
onClick: a[0] || (a[0] = V((K) => e.onClick && e.onClick(e.value), ["stop"]))
|
|
82
|
+
}, {
|
|
83
|
+
default: d(() => [
|
|
84
|
+
f(s(e.value), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
})) : y.value ? (t(), o("div", H, [
|
|
88
|
+
e.showFileName ? (t(), o(v, { key: 0 }, [
|
|
89
|
+
p(i(Z), { class: "iconfont" }, {
|
|
90
|
+
default: d(() => [
|
|
91
|
+
p(i(g))
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}),
|
|
95
|
+
f(" " + s(E.value), 1)
|
|
96
|
+
], 64)) : O("", !0),
|
|
97
|
+
p(i(D), {
|
|
98
|
+
type: "primary",
|
|
99
|
+
href: (N = c.value) == null ? void 0 : N.path,
|
|
100
|
+
target: "_blank",
|
|
101
|
+
class: m({ "ml-8": e.showFileName })
|
|
102
|
+
}, {
|
|
103
|
+
default: d(() => a[1] || (a[1] = [
|
|
104
|
+
f(" 查看/下载 ")
|
|
105
|
+
])),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["href", "class"])
|
|
108
|
+
])) : e.valueRender ? (t(), o("div", $, [
|
|
109
|
+
(t(), u(k(e.valueRender)))
|
|
110
|
+
])) : (t(), o(v, { key: 3 }, [
|
|
111
|
+
f(s(Y.value), 1)
|
|
112
|
+
], 64))
|
|
113
|
+
], 64))
|
|
114
|
+
], 2)
|
|
115
|
+
], 2)
|
|
116
|
+
];
|
|
117
|
+
}),
|
|
118
|
+
_: 3
|
|
119
|
+
}, 8, ["span", "label"]));
|
|
120
|
+
}
|
|
121
|
+
}), ae = U(j);
|
|
122
|
+
export {
|
|
123
|
+
le as C,
|
|
124
|
+
b as D,
|
|
125
|
+
X as L,
|
|
126
|
+
ae as Z,
|
|
127
|
+
x as a,
|
|
128
|
+
ee as b
|
|
129
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as r, openBlock as a, createBlock as p, unref as u, mergeProps as c, withCtx as l, renderSlot as i } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { w as _ } from "./utils-
|
|
2
|
+
import { b as m, c as d } from "./vendor-Cq716b5Q.js";
|
|
3
|
+
import { w as _ } from "./utils-BbWQLYZL.js";
|
|
4
4
|
const h = /* @__PURE__ */ r({
|
|
5
5
|
name: "ZhButton",
|
|
6
6
|
inheritAttrs: !1,
|
|
@@ -13,7 +13,7 @@ const h = /* @__PURE__ */ r({
|
|
|
13
13
|
const e = t, s = (o) => {
|
|
14
14
|
e("click", o);
|
|
15
15
|
};
|
|
16
|
-
return (o,
|
|
16
|
+
return (o, v) => (a(), p(u(m), c(o.$attrs, {
|
|
17
17
|
class: ["zh-button", { "plr-20": o.p20 }],
|
|
18
18
|
onClick: s
|
|
19
19
|
}), {
|
|
@@ -45,7 +45,7 @@ const h = /* @__PURE__ */ r({
|
|
|
45
45
|
_: 3
|
|
46
46
|
}, 16, ["class"]));
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), b = /* @__PURE__ */ f(k, [["__scopeId", "data-v-5d6d5d4f"]]), g = _(b);
|
|
49
49
|
export {
|
|
50
50
|
B as Z,
|
|
51
51
|
f as _,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as p, createElementBlock as u, normalizeClass as _, createVNode as f, unref as h, mergeProps as k } from "vue";
|
|
2
|
+
import { e as D } from "./vendor-Cq716b5Q.js";
|
|
3
|
+
import { d as o, w as y } from "./utils-BbWQLYZL.js";
|
|
4
|
+
import { L as l, a as A } from "./BaseItem-CQzBP1WX.js";
|
|
5
|
+
const g = /* @__PURE__ */ i({
|
|
6
|
+
name: "zh-date-picker",
|
|
7
|
+
__name: "DatePicker",
|
|
8
|
+
props: {
|
|
9
|
+
style: {},
|
|
10
|
+
class: {},
|
|
11
|
+
modelValue: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue", "change"],
|
|
14
|
+
setup(m, { emit: c }) {
|
|
15
|
+
const a = m, r = c, s = (e) => Array.isArray(e) ? [o(e[0], l), o(e[1], A)] : e && o(e, l), n = (e) => {
|
|
16
|
+
const t = s(e);
|
|
17
|
+
r("update:modelValue", t);
|
|
18
|
+
}, d = (e) => {
|
|
19
|
+
const t = s(e);
|
|
20
|
+
r("change", t);
|
|
21
|
+
};
|
|
22
|
+
return (e, t) => (p(), u("div", {
|
|
23
|
+
class: _([a.class, "zh-date-picker"])
|
|
24
|
+
}, [
|
|
25
|
+
f(h(D), k(e.$attrs, {
|
|
26
|
+
style: a.style,
|
|
27
|
+
"model-value": a.modelValue,
|
|
28
|
+
"onUpdate:modelValue": n,
|
|
29
|
+
onChange: d
|
|
30
|
+
}), null, 16, ["style", "model-value"])
|
|
31
|
+
], 2));
|
|
32
|
+
}
|
|
33
|
+
}), O = y(g);
|
|
34
|
+
export {
|
|
35
|
+
O as Z
|
|
36
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p, useSlots as _, openBlock as a, createElementBlock as o, createElementVNode as t, renderSlot as l, toDisplayString as i, Fragment as m, renderList as u, unref as n, normalizeClass as D, createCommentVNode as g } from "vue";
|
|
2
|
-
import { D as v } from "./
|
|
3
|
-
import { _ as k } from "./Button-
|
|
4
|
-
import { w as y } from "./utils-
|
|
2
|
+
import { D as v } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { _ as k } from "./Button-D-R-2Fix.js";
|
|
4
|
+
import { w as y } from "./utils-BbWQLYZL.js";
|
|
5
5
|
const I = { class: "common-card" }, b = { class: "detail-header" }, E = { class: "detail-header--left" }, H = { class: "title common-title" }, M = { class: "info-pair--label" }, $ = { class: "info-pair--value" }, C = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "detail-header--right"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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 "./
|
|
3
|
-
import { w as f } from "./utils-
|
|
2
|
+
import { D as u } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { w as f } from "./utils-BbWQLYZL.js";
|
|
4
4
|
const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "info-pair--title--tip"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as k, useModel as w, computed as T, openBlock as r, createBlock as v, unref as D, mergeProps as M, withCtx as o, renderSlot as s, createElementVNode as c, createVNode as u, createTextVNode as m, toDisplayString as l, createElementBlock as Z, createCommentVNode as z, mergeModels as p } from "vue";
|
|
2
|
-
import { Z as f } from "./Button-
|
|
3
|
-
import {
|
|
4
|
-
import { w as I } from "./utils-
|
|
2
|
+
import { Z as f } from "./Button-D-R-2Fix.js";
|
|
3
|
+
import { f as E } from "./vendor-Cq716b5Q.js";
|
|
4
|
+
import { w as I } from "./utils-BbWQLYZL.js";
|
|
5
5
|
const N = { class: "title" }, O = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "sub-title"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as Z, useModel as z, ref as D, openBlock as n, createBlock as v, unref as s, withCtx as p, createVNode as g, createElementBlock as h, Fragment as C, renderList as P, normalizeClass as V, toDisplayString as c, renderSlot as R, createTextVNode as x, createCommentVNode as k, createElementVNode as w, mergeModels as X } from "vue";
|
|
2
|
-
import { D as $ } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { _ as J } from "./Button-
|
|
5
|
-
import { w as Q } from "./utils-
|
|
2
|
+
import { D as $ } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { g as b, h as A, i as j, j as K, k as E, l as T, m as G, n as F, b as M } from "./vendor-Cq716b5Q.js";
|
|
4
|
+
import { _ as J } from "./Button-D-R-2Fix.js";
|
|
5
|
+
import { w as Q } from "./utils-BbWQLYZL.js";
|
|
6
6
|
var m = /* @__PURE__ */ ((f) => (f.AUTOCOMPLETE = "autocomplete", f.FORMAT = "format", f.TEXT = "text", f))(m || {});
|
|
7
7
|
const Y = { key: 0 }, ee = {
|
|
8
8
|
key: 1,
|
|
@@ -24,7 +24,7 @@ const Y = { key: 0 }, ee = {
|
|
|
24
24
|
setup(f, { expose: S }) {
|
|
25
25
|
const u = f, d = z(f, "rawData"), l = D([]), U = () => {
|
|
26
26
|
if (d.value.length === u.maxRowLength) {
|
|
27
|
-
|
|
27
|
+
b({
|
|
28
28
|
message: `最多添加${u.maxRowLength}行`,
|
|
29
29
|
type: "warning"
|
|
30
30
|
});
|
|
@@ -34,7 +34,7 @@ const Y = { key: 0 }, ee = {
|
|
|
34
34
|
u.beforeAddRow && (a = u.beforeAddRow(d.value)), d.value.push(a);
|
|
35
35
|
}, I = () => {
|
|
36
36
|
if (l.value.filter((e) => e.isAdd).length >= u.maxColLength) {
|
|
37
|
-
|
|
37
|
+
b({
|
|
38
38
|
message: `最多添加${u.maxColLength}列`,
|
|
39
39
|
type: "warning"
|
|
40
40
|
});
|
|
@@ -124,7 +124,7 @@ const Y = { key: 0 }, ee = {
|
|
|
124
124
|
const e = l.value[t];
|
|
125
125
|
for (const o of l.value)
|
|
126
126
|
if (e.prop !== o.prop && e.label === o.label) {
|
|
127
|
-
|
|
127
|
+
b({
|
|
128
128
|
message: "所有列的表头不可重复",
|
|
129
129
|
type: "warning"
|
|
130
130
|
});
|
|
@@ -179,13 +179,13 @@ const Y = { key: 0 }, ee = {
|
|
|
179
179
|
default: p(() => [
|
|
180
180
|
g(s(K), { data: d.value }, {
|
|
181
181
|
default: p(() => [
|
|
182
|
-
g(s(
|
|
182
|
+
g(s(E), {
|
|
183
183
|
type: "index",
|
|
184
184
|
label: "序号",
|
|
185
185
|
width: "132",
|
|
186
186
|
fixed: "left"
|
|
187
187
|
}),
|
|
188
|
-
(n(!0), h(C, null, P(l.value, (e, o) => (n(), v(s(
|
|
188
|
+
(n(!0), h(C, null, P(l.value, (e, o) => (n(), v(s(E), {
|
|
189
189
|
key: e.key || o,
|
|
190
190
|
prop: e.prop,
|
|
191
191
|
label: e.label,
|
|
@@ -261,7 +261,7 @@ const Y = { key: 0 }, ee = {
|
|
|
261
261
|
]),
|
|
262
262
|
_: 2
|
|
263
263
|
}, 1032, ["prop", "label", "width", "min-width", "fixed"]))), 128)),
|
|
264
|
-
u.isEdit ? (n(), v(s(
|
|
264
|
+
u.isEdit ? (n(), v(s(E), {
|
|
265
265
|
key: 0,
|
|
266
266
|
width: "150",
|
|
267
267
|
fixed: "right"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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 "./
|
|
3
|
-
import { _ } from "./Button-
|
|
4
|
-
import { w as u } from "./utils-
|
|
2
|
+
import { D as f } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { _ } from "./Button-D-R-2Fix.js";
|
|
4
|
+
import { w as u } from "./utils-BbWQLYZL.js";
|
|
5
5
|
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, E = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "info-pair--title--tip"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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 "./
|
|
3
|
-
import {
|
|
4
|
-
import { _ as h } from "./Button-
|
|
5
|
-
import { w as v } from "./utils-
|
|
2
|
+
import { D as w } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { E as y } from "./vendor-Cq716b5Q.js";
|
|
4
|
+
import { _ as h } from "./Button-D-R-2Fix.js";
|
|
5
|
+
import { w as v } from "./utils-BbWQLYZL.js";
|
|
6
6
|
const k = { class: "file_wrapper" }, x = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "header"
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { defineComponent as W, onBeforeMount as Z, useSlots as j, ref as u, computed as I, onMounted as S, onActivated as H, onUnmounted as U, onDeactivated as N, provide as g, watch as $, onBeforeUpdate as T, onUpdated as O, openBlock as L, createElementBlock as k, normalizeStyle as z, renderSlot as M, useAttrs as q, inject as v, watchEffect as F, withDirectives as J, vShow as K, reactive as Q } from "vue";
|
|
2
|
+
import { g as V } from "./Table-D7YUOcI0.js";
|
|
3
|
+
import { w as D } from "./utils-BbWQLYZL.js";
|
|
4
|
+
const X = /* @__PURE__ */ W({
|
|
5
|
+
name: "Grid",
|
|
6
|
+
__name: "Grid",
|
|
7
|
+
props: {
|
|
8
|
+
cols: { default: () => ({ xs: 1, sm: 2, md: 2, lg: 4, xl: 4 }) },
|
|
9
|
+
collapsed: { type: Boolean, default: !1 },
|
|
10
|
+
collapsedRows: { default: 1 },
|
|
11
|
+
gap: { default: 16 },
|
|
12
|
+
enableSameLabelWidthInCol: { type: Boolean, default: !0 }
|
|
13
|
+
},
|
|
14
|
+
setup(i, { expose: d }) {
|
|
15
|
+
const t = i;
|
|
16
|
+
Z(() => t.collapsed && y()), S(() => {
|
|
17
|
+
a({ target: { innerWidth: window.innerWidth } }), window.addEventListener("resize", a);
|
|
18
|
+
}), H(() => {
|
|
19
|
+
a({ target: { innerWidth: window.innerWidth } }), window.addEventListener("resize", a);
|
|
20
|
+
}), U(() => {
|
|
21
|
+
window.removeEventListener("resize", a);
|
|
22
|
+
}), N(() => {
|
|
23
|
+
window.removeEventListener("resize", a);
|
|
24
|
+
});
|
|
25
|
+
const a = (o) => {
|
|
26
|
+
let r = o.target.innerWidth;
|
|
27
|
+
switch (!!r) {
|
|
28
|
+
case r < 768:
|
|
29
|
+
e.value = "xs";
|
|
30
|
+
break;
|
|
31
|
+
case (r >= 768 && r < 992):
|
|
32
|
+
e.value = "sm";
|
|
33
|
+
break;
|
|
34
|
+
case (r >= 992 && r < 1200):
|
|
35
|
+
e.value = "md";
|
|
36
|
+
break;
|
|
37
|
+
case (r >= 1200 && r < 1920):
|
|
38
|
+
e.value = "lg";
|
|
39
|
+
break;
|
|
40
|
+
case r >= 1920:
|
|
41
|
+
e.value = "xl";
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
g("gap", Array.isArray(t.gap) ? t.gap[0] : t.gap);
|
|
46
|
+
let e = u("xl");
|
|
47
|
+
g("breakPoint", e);
|
|
48
|
+
const c = u(-1);
|
|
49
|
+
g("shouldHiddenIndex", c);
|
|
50
|
+
const f = I(() => typeof t.cols == "object" ? t.cols[e.value] ?? t.cols : t.cols);
|
|
51
|
+
g("cols", f);
|
|
52
|
+
const m = j().default(), y = () => {
|
|
53
|
+
var b, G, s, l;
|
|
54
|
+
let o = [], r = null;
|
|
55
|
+
m.forEach((n) => {
|
|
56
|
+
var p;
|
|
57
|
+
typeof n.type == "object" && n.type.name === "GridItem" && ((p = n.props) == null ? void 0 : p.suffix) !== void 0 && (r = n), typeof n.type == "symbol" && Array.isArray(n.children) && o.push(...n.children);
|
|
58
|
+
});
|
|
59
|
+
let w = 0;
|
|
60
|
+
r && (w = (((b = r.props[e.value]) == null ? void 0 : b.span) ?? ((G = r.props) == null ? void 0 : G.span) ?? 1) + (((s = r.props[e.value]) == null ? void 0 : s.offset) ?? ((l = r.props) == null ? void 0 : l.offset) ?? 0));
|
|
61
|
+
try {
|
|
62
|
+
let n = !1;
|
|
63
|
+
o.reduce((p = 0, C, P) => {
|
|
64
|
+
var E, A, B, R;
|
|
65
|
+
if (p += (((E = C.props[e.value]) == null ? void 0 : E.span) ?? ((A = C.props) == null ? void 0 : A.span) ?? 1) + (((B = C.props[e.value]) == null ? void 0 : B.offset) ?? ((R = C.props) == null ? void 0 : R.offset) ?? 0), Number(p) > t.collapsedRows * f.value - w)
|
|
66
|
+
throw c.value = P, n = !0, "find it";
|
|
67
|
+
return p;
|
|
68
|
+
}, 0), n || (c.value = -1);
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
$(
|
|
73
|
+
() => e.value,
|
|
74
|
+
() => {
|
|
75
|
+
t.collapsed && y();
|
|
76
|
+
}
|
|
77
|
+
), $(
|
|
78
|
+
() => t.collapsed,
|
|
79
|
+
(o) => {
|
|
80
|
+
if (o) return y();
|
|
81
|
+
c.value = -1;
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
const _ = I(() => typeof t.gap == "number" ? `${t.gap}px` : Array.isArray(t.gap) ? `${t.gap[1]}px ${t.gap[0]}px` : "unset"), h = I(() => ({
|
|
85
|
+
display: "grid",
|
|
86
|
+
gridGap: _.value,
|
|
87
|
+
gridTemplateColumns: `repeat(${f.value}, minmax(0, 1fr))`
|
|
88
|
+
})), x = u(!1);
|
|
89
|
+
return S(() => {
|
|
90
|
+
x.value = !0;
|
|
91
|
+
}), T(() => {
|
|
92
|
+
x.value = !1;
|
|
93
|
+
}), O(() => {
|
|
94
|
+
x.value = !0;
|
|
95
|
+
}), g("isRegistrationComplete", x), d({ breakPoint: e }), (o, r) => (L(), k("div", {
|
|
96
|
+
style: z(h.value)
|
|
97
|
+
}, [
|
|
98
|
+
M(o.$slots, "default")
|
|
99
|
+
], 4));
|
|
100
|
+
}
|
|
101
|
+
}), Y = /* @__PURE__ */ W({
|
|
102
|
+
name: "GridItem",
|
|
103
|
+
__name: "GridItem",
|
|
104
|
+
props: {
|
|
105
|
+
offset: { default: 0 },
|
|
106
|
+
span: { default: 1 },
|
|
107
|
+
suffix: { type: Boolean, default: !1 },
|
|
108
|
+
xs: { default: void 0 },
|
|
109
|
+
sm: { default: void 0 },
|
|
110
|
+
md: { default: void 0 },
|
|
111
|
+
lg: { default: void 0 },
|
|
112
|
+
xl: { default: void 0 },
|
|
113
|
+
label: {}
|
|
114
|
+
},
|
|
115
|
+
setup(i) {
|
|
116
|
+
const d = i, t = q(), a = u(!0), e = v("breakPoint", u("xl")), c = v("shouldHiddenIndex", u(-1));
|
|
117
|
+
$(
|
|
118
|
+
() => [c.value, e.value],
|
|
119
|
+
(s) => {
|
|
120
|
+
t.index && (a.value = !(s[0] !== -1 && parseInt(t.index) >= Number(s[0])));
|
|
121
|
+
},
|
|
122
|
+
{ immediate: !0 }
|
|
123
|
+
);
|
|
124
|
+
const f = v("gap", 0), m = v("cols", u(4)), y = I(() => {
|
|
125
|
+
var n, p;
|
|
126
|
+
let s = ((n = d[e.value]) == null ? void 0 : n.span) ?? d.span, l = ((p = d[e.value]) == null ? void 0 : p.offset) ?? d.offset;
|
|
127
|
+
return d.suffix ? {
|
|
128
|
+
gridColumnStart: m.value - s - l + 1,
|
|
129
|
+
gridColumnEnd: `span ${s + l}`,
|
|
130
|
+
marginLeft: l !== 0 ? `calc(((100% + ${f}px) / ${s + l}) * ${l})` : "unset"
|
|
131
|
+
} : {
|
|
132
|
+
gridColumn: `span ${s + l > m.value ? m.value : s + l}/span ${s + l > m.value ? m.value : s + l}`,
|
|
133
|
+
marginLeft: l !== 0 ? `calc(((100% + ${f}px) / ${s + l}) * ${l})` : "unset"
|
|
134
|
+
};
|
|
135
|
+
}), _ = v("isMultiGrid", u(!1)), h = u(null), x = u(0), o = u(0), r = v("registerGridItem", null), w = v(
|
|
136
|
+
"getColumnData",
|
|
137
|
+
null
|
|
138
|
+
), b = v("isRegistrationComplete", u(!1)), G = () => {
|
|
139
|
+
if (h.value && r) {
|
|
140
|
+
const s = h.value.parentElement;
|
|
141
|
+
if (s) {
|
|
142
|
+
const l = h.value.offsetLeft, n = s.offsetWidth / m.value;
|
|
143
|
+
o.value = Math.floor(l / n) + 1, r(o.value, d.label || "");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
return F(() => {
|
|
148
|
+
if (_.value && b.value && d.label && h.value && (G(), w)) {
|
|
149
|
+
const s = w(o.value);
|
|
150
|
+
x.value = s.maxWidth || 0;
|
|
151
|
+
}
|
|
152
|
+
}), (s, l) => J((L(), k("div", {
|
|
153
|
+
style: z(y.value),
|
|
154
|
+
ref_key: "gridItemRef",
|
|
155
|
+
ref: h
|
|
156
|
+
}, [
|
|
157
|
+
M(s.$slots, "default", {
|
|
158
|
+
maxLabelWidthInCol: x.value,
|
|
159
|
+
columnIndex: o.value
|
|
160
|
+
})
|
|
161
|
+
], 4)), [
|
|
162
|
+
[K, a.value]
|
|
163
|
+
]);
|
|
164
|
+
}
|
|
165
|
+
}), ee = () => {
|
|
166
|
+
const i = Q({});
|
|
167
|
+
return {
|
|
168
|
+
gridItemData: i,
|
|
169
|
+
registerGridItem: (a, e) => {
|
|
170
|
+
var f;
|
|
171
|
+
if (!e) return;
|
|
172
|
+
i[a] || (i[a] = { labels: [], maxLength: 0, maxWidth: 0 }), (f = i[a]) == null || f.labels.push(e), i[a].maxLength = Math.max(
|
|
173
|
+
e.length,
|
|
174
|
+
i[a].maxLength
|
|
175
|
+
);
|
|
176
|
+
const c = Math.ceil(V(e, 14));
|
|
177
|
+
i[a].maxWidth = Math.max(
|
|
178
|
+
c || 0,
|
|
179
|
+
i[a].maxWidth
|
|
180
|
+
);
|
|
181
|
+
},
|
|
182
|
+
getColumnData: (a) => i[a] || {}
|
|
183
|
+
};
|
|
184
|
+
}, te = { class: "multi-grid" }, ae = /* @__PURE__ */ W({
|
|
185
|
+
name: "MultiGrid",
|
|
186
|
+
__name: "MultiGrid",
|
|
187
|
+
setup(i) {
|
|
188
|
+
const { getColumnData: d, registerGridItem: t } = ee();
|
|
189
|
+
return g("registerGridItem", t), g("getColumnData", d), g("isMultiGrid", u(!0)), (a, e) => (L(), k("div", te, [
|
|
190
|
+
M(a.$slots, "default")
|
|
191
|
+
]));
|
|
192
|
+
}
|
|
193
|
+
}), ne = D(X), ie = D(Y), oe = D(ae);
|
|
194
|
+
export {
|
|
195
|
+
ie as Z,
|
|
196
|
+
ne as a,
|
|
197
|
+
oe as b
|
|
198
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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 "./
|
|
3
|
-
import { _ } from "./Button-
|
|
4
|
-
import { w as u } from "./utils-
|
|
2
|
+
import { D as d } from "./BaseItem-CQzBP1WX.js";
|
|
3
|
+
import { _ } from "./Button-D-R-2Fix.js";
|
|
4
|
+
import { w as u } from "./utils-BbWQLYZL.js";
|
|
5
5
|
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, I = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "info-pair--title--tip"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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 {
|
|
3
|
-
import { _ as U } from "./Button-
|
|
4
|
-
import { w as Z } from "./utils-
|
|
2
|
+
import { n as P } from "./vendor-Cq716b5Q.js";
|
|
3
|
+
import { _ as U } from "./Button-D-R-2Fix.js";
|
|
4
|
+
import { w as Z } from "./utils-BbWQLYZL.js";
|
|
5
5
|
const A = /* @__PURE__ */ b({
|
|
6
6
|
name: "zh-input",
|
|
7
7
|
__name: "Input",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, openBlock as a, createElementBlock as s, createElementVNode as o } from "vue";
|
|
2
|
-
import { _ as e } from "./Button-
|
|
3
|
-
import { w as i } from "./utils-
|
|
2
|
+
import { _ as e } from "./Button-D-R-2Fix.js";
|
|
3
|
+
import { w as i } from "./utils-BbWQLYZL.js";
|
|
4
4
|
const r = { class: "loading-box" }, c = /* @__PURE__ */ t({
|
|
5
5
|
name: "zh-loading",
|
|
6
6
|
__name: "Loading",
|