zhihao-ui 1.2.19 → 1.2.21
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-Dr298ctb.js → BaseInfo-DCB7xgRw.js} +1 -1
- package/dist/es/{Button-CDKNl8Xy.js → Button-Va8xfPJd.js} +11 -8
- package/dist/es/{DatePicker-vGQGWrmB.js → DatePicker-BrD1XS6-.js} +2 -2
- package/dist/es/DetailHeader-B9ttfBlv.js +59 -0
- package/dist/es/{DetailSubTitle-Cgs5HrKC.js → DetailSubTitle-BgbefcLD.js} +2 -2
- package/dist/es/{Dialog-cXRhcAJo.js → Dialog-CnqJMaPI.js} +31 -34
- package/dist/es/{DiyDataTable-DnUtQ2uX.js → DiyDataTable-uIkGrO_i.js} +80 -78
- package/dist/es/{EditInfoPair-B5_ufxbs.js → EditInfoPair-XiseN2F2.js} +3 -3
- package/dist/es/{FileWrapper-D7yKH6Y4.js → FileWrapper-CAwHicjK.js} +4 -4
- package/dist/es/{Grid-CIMCXeIw.js → Grid-CshEwvAH.js} +1 -1
- package/dist/es/{InfoPair-65CeKiUv.js → InfoPair-DhVT8u-f.js} +3 -3
- package/dist/es/{Input-Bg2G2kBm.js → Input-CeiPnMtt.js} +3 -3
- package/dist/es/{Loading-CBGHPT0Z.js → Loading-bv2DpqBO.js} +2 -2
- package/dist/es/Map-DhceUygQ.js +2020 -0
- package/dist/es/{MessageBox-d6upGeyX.js → MessageBox-2Vpy3Mva.js} +2 -2
- package/dist/es/{MoneyInput-CQBBD25d.js → MoneyInput-Deg1aj66.js} +7 -7
- package/dist/es/{PageHeadPanel-C1mqeOzI.js → PageHeadPanel-BWjWkx8n.js} +2 -2
- package/dist/es/{Table-BxjxzoXm.js → Table-KSl_JT2q.js} +182 -182
- package/dist/es/{ToolTips-C5Cm96bx.js → ToolTips-Bw2lHQxC.js} +3 -3
- package/dist/es/index.js +21 -21
- package/dist/es/{utils-CbI5IWJJ.js → utils-D-zYpBSZ.js} +3 -3
- package/dist/es/{vendor-AIl6iHcE.js → vendor-gTOtiVzA.js} +6895 -6495
- package/dist/index.css +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +15 -2
- package/dist/types/components/Button/index.d.ts +15 -3
- package/dist/types/components/DetailHeader/index.d.ts +9 -0
- package/dist/types/components/DetailHeader/types.d.ts +1 -0
- package/dist/types/components/Dialog/Dialog.vue.d.ts +2 -4
- package/dist/types/components/Dialog/index.d.ts +5 -10
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +2 -1
- package/dist/types/components/DiyDataTable/index.d.ts +3 -0
- package/dist/types/components/DiyDataTable/type.d.ts +3 -1
- package/dist/types/components/Map/Map.vue.d.ts +60 -5
- package/dist/types/components/Map/components/scaleLine.vue.d.ts +3 -1
- package/dist/types/components/Map/components/toolPanel.vue.d.ts +4 -0
- package/dist/types/components/Map/config.d.ts +2 -0
- package/dist/types/components/Map/index.d.ts +174 -9
- package/dist/types/components/Map/interface/entity/render.d.ts +12 -0
- package/dist/types/components/Map/interface/entity/shipInfoVo.d.ts +21 -3
- package/dist/types/components/Map/interface/entity/shipMapData.d.ts +2 -1
- package/dist/types/components/Map/render/canvasRender/canvasRender.d.ts +2 -1
- package/dist/types/components/Map/render/canvasRender/geometry.d.ts +3 -0
- package/dist/types/components/Map/render/canvasRender/renderCustomOverlay.d.ts +3 -1
- package/dist/types/components/Map/render/canvasRender/renderShipStyle.d.ts +3 -1
- package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +5 -1
- package/dist/types/components/Map/render/drawPolygon.d.ts +4 -0
- package/dist/types/components/Map/render/renderDashboard.d.ts +3 -0
- package/dist/types/components/Map/render/renderMarker.d.ts +4 -3
- package/dist/types/components/Map/render/renderShip.d.ts +5 -2
- package/dist/types/components/Map/render/renderTrack.d.ts +3 -4
- package/dist/types/components/Map/render/renderTruck.d.ts +3 -1
- package/dist/types/components/Map/utils/common.d.ts +4 -8
- package/dist/types/components/Map/utils/format.d.ts +6 -14
- package/dist/types/components/Map/utils/store.d.ts +7 -1
- package/dist/types/components/Map/utils/transform.d.ts +13 -5
- package/dist/types/components/Table/types.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +23 -23
- package/package.json +1 -1
- package/dist/es/DetailHeader-AxeEUXrE.js +0 -58
- package/dist/es/Map-BRt4EWtt.js +0 -1803
|
@@ -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-D-zYpBSZ.js";
|
|
3
3
|
const C = /* @__PURE__ */ h({
|
|
4
4
|
name: "ZhBaseInfo",
|
|
5
5
|
__name: "BaseInfo",
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { defineComponent as r, openBlock as a, createBlock as
|
|
2
|
-
import { E as m, a as d } from "./vendor-
|
|
3
|
-
import { w as _ } from "./utils-
|
|
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 { E as m, a as d } from "./vendor-gTOtiVzA.js";
|
|
3
|
+
import { w as _ } from "./utils-D-zYpBSZ.js";
|
|
4
4
|
const h = /* @__PURE__ */ r({
|
|
5
5
|
name: "ZhButton",
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "Button",
|
|
8
|
+
props: {
|
|
9
|
+
p20: { type: Boolean }
|
|
10
|
+
},
|
|
8
11
|
emits: ["click"],
|
|
9
12
|
setup(n, { emit: t }) {
|
|
10
13
|
const e = t, s = (o) => {
|
|
11
14
|
e("click", o);
|
|
12
15
|
};
|
|
13
|
-
return (o, Z) => (a(), u(
|
|
14
|
-
class: "zh-button",
|
|
16
|
+
return (o, Z) => (a(), p(u(m), c(o.$attrs, {
|
|
17
|
+
class: ["zh-button", { "plr-20": o.p20 }],
|
|
15
18
|
onClick: s
|
|
16
19
|
}), {
|
|
17
20
|
default: l(() => [
|
|
18
21
|
i(o.$slots, "default", {}, void 0, !0)
|
|
19
22
|
]),
|
|
20
23
|
_: 3
|
|
21
|
-
}, 16));
|
|
24
|
+
}, 16, ["class"]));
|
|
22
25
|
}
|
|
23
26
|
}), f = (n, t) => {
|
|
24
27
|
const e = n.__vccOpts || n;
|
|
25
28
|
for (const [s, o] of t)
|
|
26
29
|
e[s] = o;
|
|
27
30
|
return e;
|
|
28
|
-
}, B = /* @__PURE__ */ f(h, [["__scopeId", "data-v-
|
|
31
|
+
}, B = /* @__PURE__ */ f(h, [["__scopeId", "data-v-ce0229f5"]]), C = _(B), k = /* @__PURE__ */ r({
|
|
29
32
|
name: "ZhButtonGroup",
|
|
30
33
|
inheritAttrs: !1,
|
|
31
34
|
__name: "ButtonGroup",
|
|
@@ -33,7 +36,7 @@ const h = /* @__PURE__ */ r({
|
|
|
33
36
|
template: { default: "" }
|
|
34
37
|
},
|
|
35
38
|
setup(n) {
|
|
36
|
-
return (t, e) => (a(), u(
|
|
39
|
+
return (t, e) => (a(), p(u(d), c(t.$attrs, {
|
|
37
40
|
class: ["zh-button-group", { "operation-fix-button": t.template === "operation-fix-button" }]
|
|
38
41
|
}), {
|
|
39
42
|
default: l(() => [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, openBlock as u, createElementBlock as h, normalizeClass as f, createVNode as D, unref as M, mergeProps as _ } from "vue";
|
|
2
|
-
import { h as g, b as Y } from "./vendor-
|
|
3
|
-
import { w as A } from "./utils-
|
|
2
|
+
import { h as g, b as Y } from "./vendor-gTOtiVzA.js";
|
|
3
|
+
import { w as A } from "./utils-D-zYpBSZ.js";
|
|
4
4
|
const p = "--", m = "YYYY-MM-DDTHH:mm:ss", T = "YYYY-MM-DDT23:59:59", E = "YYYY-MM-DD", C = "https://static.zhihaoscm.cn/", i = (e, l = E) => e ? g(e).format(l).replace("Invalid date", p) : p, N = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
|
|
5
5
|
function U(e) {
|
|
6
6
|
const l = ["角", "分"], c = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
|
|
@@ -0,0 +1,59 @@
|
|
|
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 "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { _ as k } from "./Button-Va8xfPJd.js";
|
|
4
|
+
import { w as y } from "./utils-D-zYpBSZ.js";
|
|
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
|
+
key: 1,
|
|
7
|
+
class: "detail-header--right"
|
|
8
|
+
}, L = { class: "info-pair--label" }, S = { class: "info-pair--value" }, V = /* @__PURE__ */ p({
|
|
9
|
+
name: "ZhDetailHeader",
|
|
10
|
+
__name: "DetailHeader",
|
|
11
|
+
props: {
|
|
12
|
+
title: {},
|
|
13
|
+
leftInfos: {},
|
|
14
|
+
rightInfos: {},
|
|
15
|
+
stateMeta: {},
|
|
16
|
+
stateDesc: {}
|
|
17
|
+
},
|
|
18
|
+
setup(f) {
|
|
19
|
+
const h = _(), r = f;
|
|
20
|
+
return (e, w) => {
|
|
21
|
+
var d, c;
|
|
22
|
+
return a(), o("div", I, [
|
|
23
|
+
t("div", null, [
|
|
24
|
+
l(e.$slots, "menu", {}, void 0, !0)
|
|
25
|
+
]),
|
|
26
|
+
t("div", b, [
|
|
27
|
+
t("div", E, [
|
|
28
|
+
t("div", H, i(r.title), 1),
|
|
29
|
+
l(e.$slots, "extra-info", {}, void 0, !0),
|
|
30
|
+
(a(!0), o(m, null, u(r.leftInfos, (s) => (a(), o("div", {
|
|
31
|
+
class: "info-pair",
|
|
32
|
+
key: s.value
|
|
33
|
+
}, [
|
|
34
|
+
t("div", M, i(s.label), 1),
|
|
35
|
+
t("div", $, i(s.value ?? n(v)), 1)
|
|
36
|
+
]))), 128))
|
|
37
|
+
]),
|
|
38
|
+
l(e.$slots, "default", {}, void 0, !0),
|
|
39
|
+
n(h)["right-infos"] ? l(e.$slots, "right-infos", { key: 0 }, void 0, !0) : (a(), o("div", C, [
|
|
40
|
+
(a(!0), o(m, null, u(r.rightInfos, (s) => (a(), o("div", {
|
|
41
|
+
class: "info-pair",
|
|
42
|
+
key: s.value
|
|
43
|
+
}, [
|
|
44
|
+
t("div", L, i(s.label), 1),
|
|
45
|
+
t("div", S, i(s.value ?? n(v)), 1)
|
|
46
|
+
]))), 128)),
|
|
47
|
+
e.stateDesc || e.stateMeta ? (a(), o("div", {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: D(["state common-title", (d = e.stateMeta) == null ? void 0 : d.state])
|
|
50
|
+
}, i(e.stateDesc || ((c = e.stateMeta) == null ? void 0 : c.intro)), 3)) : g("", !0)
|
|
51
|
+
]))
|
|
52
|
+
])
|
|
53
|
+
]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}), Z = /* @__PURE__ */ k(V, [["__scopeId", "data-v-e58ec09d"]]), U = y(Z);
|
|
57
|
+
export {
|
|
58
|
+
U as Z
|
|
59
|
+
};
|
|
@@ -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 "./DatePicker-
|
|
3
|
-
import { w as f } from "./utils-
|
|
2
|
+
import { D as u } from "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { w as f } from "./utils-D-zYpBSZ.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,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Z as f } from "./Button-
|
|
3
|
-
import { c as
|
|
4
|
-
import { w as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as V, useModel as k, computed as w, openBlock as r, createBlock as T, unref as v, mergeProps as D, withCtx as o, renderSlot as a, createElementVNode as c, createVNode as u, createTextVNode as p, toDisplayString as l, createElementBlock as M, createCommentVNode as z, mergeModels as m } from "vue";
|
|
2
|
+
import { Z as f } from "./Button-Va8xfPJd.js";
|
|
3
|
+
import { c as E } from "./vendor-gTOtiVzA.js";
|
|
4
|
+
import { w as Z } from "./utils-D-zYpBSZ.js";
|
|
5
|
+
const I = { class: "title" }, N = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "sub-title"
|
|
8
|
-
},
|
|
8
|
+
}, O = { class: "zh-dialog__footer" }, S = /* @__PURE__ */ V({
|
|
9
9
|
__name: "Dialog",
|
|
10
10
|
props: /* @__PURE__ */ m({
|
|
11
11
|
title: {},
|
|
@@ -43,54 +43,51 @@ const N = { class: "title" }, O = {
|
|
|
43
43
|
modelValue: { type: Boolean, default: !0 },
|
|
44
44
|
modelModifiers: {}
|
|
45
45
|
}),
|
|
46
|
-
emits: /* @__PURE__ */ m(["
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
49
|
-
|
|
46
|
+
emits: /* @__PURE__ */ m(["submit", "close"], ["update:modelValue"]),
|
|
47
|
+
setup(n, { emit: B }) {
|
|
48
|
+
const t = n, s = k(n, "modelValue"), d = B, y = () => {
|
|
49
|
+
d("close");
|
|
50
50
|
}, h = () => {
|
|
51
|
-
|
|
52
|
-
}, C =
|
|
53
|
-
l.value = !1, n("confirm");
|
|
54
|
-
}, g = {
|
|
51
|
+
d("submit");
|
|
52
|
+
}, C = {
|
|
55
53
|
small: "400px",
|
|
56
54
|
middle: "600px",
|
|
57
55
|
large: "800px",
|
|
58
56
|
extraLarge: "920px"
|
|
59
|
-
},
|
|
60
|
-
return (e, i) => (r(), T(
|
|
61
|
-
modelValue:
|
|
62
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
57
|
+
}, g = w(() => t.width ? t.width : C[t.size]);
|
|
58
|
+
return (e, i) => (r(), T(v(E), D({
|
|
59
|
+
modelValue: s.value,
|
|
60
|
+
"onUpdate:modelValue": i[0] || (i[0] = (b) => s.value = b),
|
|
63
61
|
class: "zh-dialog"
|
|
64
62
|
}, e.$attrs, {
|
|
65
|
-
width:
|
|
66
|
-
"close-on-click-modal": e.closeOnClickModal
|
|
67
|
-
onClose: y
|
|
63
|
+
width: g.value,
|
|
64
|
+
"close-on-click-modal": e.closeOnClickModal
|
|
68
65
|
}), {
|
|
69
66
|
header: o(() => [
|
|
70
|
-
|
|
71
|
-
c("div",
|
|
72
|
-
e.subTitle ? (r(),
|
|
67
|
+
a(e.$slots, "header", {}, () => [
|
|
68
|
+
c("div", I, l(e.title), 1),
|
|
69
|
+
e.subTitle ? (r(), M("div", N, l(e.subTitle), 1)) : z("", !0)
|
|
73
70
|
])
|
|
74
71
|
]),
|
|
75
72
|
footer: o(() => [
|
|
76
|
-
|
|
77
|
-
c("div",
|
|
73
|
+
a(e.$slots, "footer", {}, () => [
|
|
74
|
+
c("div", O, [
|
|
78
75
|
u(f, {
|
|
79
76
|
plain: "",
|
|
80
|
-
onClick:
|
|
77
|
+
onClick: y
|
|
81
78
|
}, {
|
|
82
79
|
default: o(() => [
|
|
83
|
-
p(
|
|
80
|
+
p(l(e.cancelButtonText), 1)
|
|
84
81
|
]),
|
|
85
82
|
_: 1
|
|
86
83
|
}),
|
|
87
84
|
u(f, {
|
|
88
85
|
type: "primary",
|
|
89
86
|
disabled: e.confirmButtonDisabled,
|
|
90
|
-
onClick:
|
|
87
|
+
onClick: h
|
|
91
88
|
}, {
|
|
92
89
|
default: o(() => [
|
|
93
|
-
p(
|
|
90
|
+
p(l(e.confirmButtonText), 1)
|
|
94
91
|
]),
|
|
95
92
|
_: 1
|
|
96
93
|
}, 8, ["disabled"])
|
|
@@ -98,13 +95,13 @@ const N = { class: "title" }, O = {
|
|
|
98
95
|
])
|
|
99
96
|
]),
|
|
100
97
|
default: o(() => [
|
|
101
|
-
|
|
98
|
+
a(e.$slots, "default")
|
|
102
99
|
]),
|
|
103
100
|
_: 3
|
|
104
101
|
}, 16, ["modelValue", "width", "close-on-click-modal"]));
|
|
105
102
|
}
|
|
106
|
-
}),
|
|
103
|
+
}), P = Z(S);
|
|
107
104
|
export {
|
|
108
|
-
|
|
109
|
-
_
|
|
105
|
+
P as Z,
|
|
106
|
+
S as _
|
|
110
107
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as H, useModel as N, ref as b, openBlock as d, createBlock as g, unref as s, withCtx as p, createVNode as v, createElementBlock as f, Fragment as W, renderList as Z, normalizeClass as D, toDisplayString as
|
|
2
|
-
import { D as P } from "./DatePicker-
|
|
3
|
-
import { d as
|
|
4
|
-
import { _ as G } from "./Button-
|
|
5
|
-
import { w as J } from "./utils-
|
|
6
|
-
var
|
|
1
|
+
import { defineComponent as H, useModel as N, ref as b, openBlock as d, createBlock as g, unref as s, withCtx as p, createVNode as v, createElementBlock as f, Fragment as W, renderList as Z, normalizeClass as D, toDisplayString as c, renderSlot as C, createCommentVNode as k, createElementVNode as y, createTextVNode as V, mergeModels as z } from "vue";
|
|
2
|
+
import { D as P } from "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { d as w, e as $, f as X, g as j, i as E, j as T, k as K, l as M, E as A } from "./vendor-gTOtiVzA.js";
|
|
4
|
+
import { _ as G } from "./Button-Va8xfPJd.js";
|
|
5
|
+
import { w as J } from "./utils-D-zYpBSZ.js";
|
|
6
|
+
var m = /* @__PURE__ */ ((u) => (u.AUTOCOMPLETE = "autocomplete", u.FORMAT = "format", u.TEXT = "text", u))(m || {});
|
|
7
7
|
const Q = { key: 0 }, Y = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "col-edit-header"
|
|
10
|
-
}, ee = ["onClick"], te = { key: 0 }, ae = { key: 2 },
|
|
10
|
+
}, ee = ["onClick"], te = { key: 0 }, ae = { key: 2 }, re = { class: "header-operation-container" }, le = { class: "operation-container" }, oe = ["onClick"], L = "$ZH_DIV$", ie = /* @__PURE__ */ H({
|
|
11
11
|
name: "zh-diy-data-table",
|
|
12
12
|
__name: "DiyDataTable",
|
|
13
13
|
props: /* @__PURE__ */ z({
|
|
@@ -21,26 +21,26 @@ const Q = { key: 0 }, Y = {
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:rawData"],
|
|
23
23
|
setup(u, { expose: R }) {
|
|
24
|
-
const h = u, n = N(u, "rawData"), o = b([]),
|
|
24
|
+
const h = u, n = N(u, "rawData"), o = b([]), F = () => {
|
|
25
25
|
if (n.value.length === h.maxRowLength) {
|
|
26
|
-
|
|
26
|
+
w({
|
|
27
27
|
message: `最多添加${h.maxRowLength}行`,
|
|
28
28
|
type: "warning"
|
|
29
29
|
});
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
n.value.push({});
|
|
33
|
-
},
|
|
33
|
+
}, U = () => {
|
|
34
34
|
if (o.value.filter((e) => e.isAdd).length >= h.maxColLength) {
|
|
35
|
-
|
|
35
|
+
w({
|
|
36
36
|
message: `最多添加${h.maxColLength}列`,
|
|
37
37
|
type: "warning"
|
|
38
38
|
});
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const r = String(Date.now());
|
|
42
42
|
o.value.push({
|
|
43
|
-
prop:
|
|
43
|
+
prop: r,
|
|
44
44
|
label: "",
|
|
45
45
|
isEditHeader: !0,
|
|
46
46
|
isAdd: !0,
|
|
@@ -48,76 +48,76 @@ const Q = { key: 0 }, Y = {
|
|
|
48
48
|
minWidth: 150,
|
|
49
49
|
headerMaxlength: 15
|
|
50
50
|
});
|
|
51
|
-
}, S = (a,
|
|
51
|
+
}, S = (a, r) => {
|
|
52
52
|
o.value.splice(a, 1), n.value.forEach((e) => {
|
|
53
|
-
delete e[
|
|
53
|
+
delete e[r.prop];
|
|
54
54
|
});
|
|
55
55
|
}, I = (a) => {
|
|
56
56
|
n.value.splice(a, 1);
|
|
57
|
-
}, O = (a,
|
|
58
|
-
|
|
59
|
-
e.completeList.filter((
|
|
57
|
+
}, O = (a, r, e) => {
|
|
58
|
+
r(
|
|
59
|
+
e.completeList.filter((l) => l.includes(a)).map((l) => ({ value: l }))
|
|
60
60
|
);
|
|
61
61
|
}, q = (a) => [
|
|
62
62
|
{
|
|
63
|
-
validator: (
|
|
63
|
+
validator: (r, e, l) => {
|
|
64
64
|
if (!o.value[a].label) {
|
|
65
|
-
|
|
65
|
+
l(new Error("请输入表头"));
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
l();
|
|
69
69
|
},
|
|
70
70
|
message: "请输入表头",
|
|
71
71
|
trigger: ["blur", "change"]
|
|
72
72
|
}
|
|
73
73
|
], B = (a) => {
|
|
74
|
-
const
|
|
75
|
-
return a.required &&
|
|
74
|
+
const r = [];
|
|
75
|
+
return a.required && r.push({
|
|
76
76
|
required: !0,
|
|
77
77
|
message: "请输入" + a.label,
|
|
78
78
|
trigger: a.slot ? void 0 : "blur"
|
|
79
|
-
}), a.varidate &&
|
|
80
|
-
validator: (e,
|
|
81
|
-
const i = a.varidate(
|
|
79
|
+
}), a.varidate && r.push({
|
|
80
|
+
validator: (e, l, t) => {
|
|
81
|
+
const i = a.varidate(l);
|
|
82
82
|
i !== !0 ? t(new Error(i)) : t();
|
|
83
83
|
},
|
|
84
84
|
trigger: a.slot ? void 0 : "blur"
|
|
85
|
-
}),
|
|
86
|
-
},
|
|
85
|
+
}), r;
|
|
86
|
+
}, _ = b();
|
|
87
87
|
return R({
|
|
88
88
|
/** 初始化数据 */
|
|
89
|
-
initData: (a,
|
|
90
|
-
console.log("initData", a,
|
|
89
|
+
initData: (a, r) => {
|
|
90
|
+
console.log("initData", a, r), a = $(a) || [], a.length === 0 && a.push({}), r = [...r];
|
|
91
91
|
for (const e in a[0])
|
|
92
|
-
if (!
|
|
93
|
-
(
|
|
92
|
+
if (!r.some(
|
|
93
|
+
(l) => l.prop === e
|
|
94
94
|
)) {
|
|
95
|
-
const
|
|
95
|
+
const l = Date.now() + e, t = e.split(L);
|
|
96
96
|
if (t.length !== 2) {
|
|
97
97
|
console.log("keySplit 失败", e);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
100
|
const i = Number(t[1]);
|
|
101
|
-
|
|
101
|
+
r[i] = {
|
|
102
102
|
prop: e,
|
|
103
103
|
isEditHeader: !0,
|
|
104
104
|
label: t[0],
|
|
105
|
-
key:
|
|
105
|
+
key: l,
|
|
106
106
|
isAdd: !0,
|
|
107
107
|
maxlength: 15,
|
|
108
108
|
headerMaxlength: 15
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
n.value = a, o.value =
|
|
111
|
+
n.value = a, o.value = r;
|
|
112
112
|
},
|
|
113
113
|
/** 获取数据 */
|
|
114
114
|
getData: async () => {
|
|
115
|
-
await
|
|
116
|
-
for (const
|
|
117
|
-
const e = o.value[
|
|
118
|
-
for (const
|
|
119
|
-
if (e.prop !==
|
|
120
|
-
|
|
115
|
+
await _.value.validate();
|
|
116
|
+
for (const r in o.value) {
|
|
117
|
+
const e = o.value[r];
|
|
118
|
+
for (const l of o.value)
|
|
119
|
+
if (e.prop !== l.prop && e.label === l.label) {
|
|
120
|
+
w({
|
|
121
121
|
message: "所有列的表头不可重复",
|
|
122
122
|
type: "warning"
|
|
123
123
|
});
|
|
@@ -125,17 +125,17 @@ const Q = { key: 0 }, Y = {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
const a = $(n.value);
|
|
128
|
-
for (const
|
|
129
|
-
const e = a[
|
|
130
|
-
for (const
|
|
131
|
-
const t = o.value[
|
|
132
|
-
if (t.isSameData &&
|
|
128
|
+
for (const r in a) {
|
|
129
|
+
const e = a[r];
|
|
130
|
+
for (const l in o.value) {
|
|
131
|
+
const t = o.value[l];
|
|
132
|
+
if (t.isSameData && r !== "0" && (e[t.prop] = a[0][t.prop]), t.varidate && !t.varidate(e[t.prop]))
|
|
133
133
|
return;
|
|
134
134
|
if (t.isAdd) {
|
|
135
|
-
const i = t.label + L +
|
|
135
|
+
const i = t.label + L + l;
|
|
136
136
|
e[i] = e[t.prop], delete e[t.prop];
|
|
137
137
|
}
|
|
138
|
-
t.formatter && t.type ===
|
|
138
|
+
t.formatter && t.type === m.FORMAT && (e[t.prop] = t.formatter(e));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
return console.log("DiyDataTable 获取数据", a, o.value), {
|
|
@@ -144,13 +144,13 @@ const Q = { key: 0 }, Y = {
|
|
|
144
144
|
};
|
|
145
145
|
},
|
|
146
146
|
/** 更新列配置数据 */
|
|
147
|
-
updateColumn: (a,
|
|
147
|
+
updateColumn: (a, r) => {
|
|
148
148
|
const e = o.value[a].prop;
|
|
149
|
-
if (o.value[a] =
|
|
150
|
-
for (const
|
|
151
|
-
r
|
|
149
|
+
if (o.value[a] = r, e !== r.prop)
|
|
150
|
+
for (const l of n.value)
|
|
151
|
+
l[r.prop] = l[e], delete l[e];
|
|
152
152
|
},
|
|
153
|
-
/**
|
|
153
|
+
/** 重置默认列配置数据 */
|
|
154
154
|
resetColumns: (a) => {
|
|
155
155
|
const e = o.value.filter((t) => !t.isAdd).reduce((t, i) => (a.some((x) => x.prop === i.prop) || t.push(i.prop), t), []);
|
|
156
156
|
n.value.forEach((t) => {
|
|
@@ -158,26 +158,26 @@ const Q = { key: 0 }, Y = {
|
|
|
158
158
|
delete t[i];
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
-
const
|
|
162
|
-
o.value = [...a, ...
|
|
161
|
+
const l = a.filter((t) => t.isAdd);
|
|
162
|
+
o.value = [...a, ...l];
|
|
163
163
|
}
|
|
164
|
-
}), (a,
|
|
164
|
+
}), (a, r) => (d(), g(s(X), {
|
|
165
165
|
class: "diy-data-table",
|
|
166
166
|
model: u.rawData,
|
|
167
167
|
ref_key: "formRef",
|
|
168
|
-
ref:
|
|
168
|
+
ref: _
|
|
169
169
|
}, {
|
|
170
170
|
default: p(() => [
|
|
171
171
|
v(s(j), { data: n.value }, {
|
|
172
172
|
default: p(() => [
|
|
173
|
-
v(s(
|
|
173
|
+
v(s(E), {
|
|
174
174
|
type: "index",
|
|
175
175
|
label: "序号",
|
|
176
176
|
width: "132",
|
|
177
177
|
fixed: "left"
|
|
178
178
|
}),
|
|
179
|
-
(d(!0), f(W, null, Z(o.value, (e,
|
|
180
|
-
key: e.key ||
|
|
179
|
+
(d(!0), f(W, null, Z(o.value, (e, l) => (d(), g(s(E), {
|
|
180
|
+
key: e.key || l,
|
|
181
181
|
prop: e.prop,
|
|
182
182
|
label: e.label,
|
|
183
183
|
width: e.width,
|
|
@@ -187,8 +187,8 @@ const Q = { key: 0 }, Y = {
|
|
|
187
187
|
header: p(() => [
|
|
188
188
|
a.isEdit ? e.isEditHeader ? (d(), f("div", Y, [
|
|
189
189
|
v(s(T), {
|
|
190
|
-
prop: `columns.${
|
|
191
|
-
rules: q(
|
|
190
|
+
prop: `columns.${l}`,
|
|
191
|
+
rules: q(l)
|
|
192
192
|
}, {
|
|
193
193
|
default: p(() => [
|
|
194
194
|
v(s(M), {
|
|
@@ -203,22 +203,24 @@ const Q = { key: 0 }, Y = {
|
|
|
203
203
|
e.isAdd ? (d(), f("i", {
|
|
204
204
|
key: 0,
|
|
205
205
|
class: "iconfont icon-close",
|
|
206
|
-
onClick: (t) => S(
|
|
206
|
+
onClick: (t) => S(l, e)
|
|
207
207
|
}, null, 8, ee)) : k("", !0)
|
|
208
208
|
])) : (d(), f("div", {
|
|
209
209
|
key: 2,
|
|
210
210
|
class: D({ "is-required-label": e.required })
|
|
211
|
-
},
|
|
211
|
+
}, c(e.label), 3)) : (d(), f("div", Q, c(e.label), 1))
|
|
212
212
|
]),
|
|
213
213
|
default: p((t) => [
|
|
214
|
-
h.isEdit && (!e.isSameData || t.$index === 0) && e.type !== s(
|
|
214
|
+
h.isEdit && (!e.isSameData || t.$index === 0) && e.type !== s(m).TEXT ? (d(), g(s(T), {
|
|
215
215
|
key: 0,
|
|
216
216
|
prop: `${t.$index}.${e.prop}`,
|
|
217
217
|
rules: B(e),
|
|
218
218
|
class: D(["col-edit-container", { "close-padding": e.isAdd }])
|
|
219
219
|
}, {
|
|
220
220
|
default: p(() => [
|
|
221
|
-
e.type === s(
|
|
221
|
+
e.type === s(m).FORMAT && e.formatter ? (d(), f("div", te, c(e.showFormatter ? e.showFormatter(
|
|
222
|
+
e.formatter(t.row)
|
|
223
|
+
) : e.formatter(t.row)), 1)) : e.type === s(m).AUTOCOMPLETE ? (d(), g(s(K), {
|
|
222
224
|
key: 1,
|
|
223
225
|
modelValue: t.row[e.prop],
|
|
224
226
|
"onUpdate:modelValue": (i) => t.row[e.prop] = i,
|
|
@@ -244,23 +246,23 @@ const Q = { key: 0 }, Y = {
|
|
|
244
246
|
key: 1,
|
|
245
247
|
row: t.row,
|
|
246
248
|
$index: t.$index
|
|
247
|
-
}, void 0, !0) : (d(), f("div", ae,
|
|
249
|
+
}, void 0, !0) : (d(), f("div", ae, c((e.isSameData ? n.value[0][e.prop] : t.row[e.prop]) || s(P)), 1))
|
|
248
250
|
]),
|
|
249
251
|
_: 2
|
|
250
252
|
}, 1032, ["prop", "label", "width", "min-width", "fixed"]))), 128)),
|
|
251
|
-
h.isEdit ? (d(), g(s(
|
|
253
|
+
h.isEdit ? (d(), g(s(E), {
|
|
252
254
|
key: 0,
|
|
253
255
|
width: "150",
|
|
254
256
|
fixed: "right"
|
|
255
257
|
}, {
|
|
256
258
|
header: p(() => [
|
|
257
|
-
y("div",
|
|
259
|
+
y("div", re, [
|
|
258
260
|
v(s(A), {
|
|
259
261
|
type: "primary",
|
|
260
262
|
link: "",
|
|
261
|
-
onClick:
|
|
263
|
+
onClick: F
|
|
262
264
|
}, {
|
|
263
|
-
default: p(() =>
|
|
265
|
+
default: p(() => r[0] || (r[0] = [
|
|
264
266
|
y("i", { class: "iconfont icon-Frame1" }, null, -1),
|
|
265
267
|
V("增行")
|
|
266
268
|
])),
|
|
@@ -269,9 +271,9 @@ const Q = { key: 0 }, Y = {
|
|
|
269
271
|
v(s(A), {
|
|
270
272
|
type: "primary",
|
|
271
273
|
link: "",
|
|
272
|
-
onClick:
|
|
274
|
+
onClick: U
|
|
273
275
|
}, {
|
|
274
|
-
default: p(() =>
|
|
276
|
+
default: p(() => r[1] || (r[1] = [
|
|
275
277
|
y("i", { class: "iconfont icon-Frame-11" }, null, -1),
|
|
276
278
|
V("增列")
|
|
277
279
|
])),
|
|
@@ -280,11 +282,11 @@ const Q = { key: 0 }, Y = {
|
|
|
280
282
|
])
|
|
281
283
|
]),
|
|
282
284
|
default: p(({ $index: e }) => [
|
|
283
|
-
y("div",
|
|
285
|
+
y("div", le, [
|
|
284
286
|
n.value.length > 1 ? (d(), f("i", {
|
|
285
287
|
key: 0,
|
|
286
288
|
class: "iconfont icon-close",
|
|
287
|
-
onClick: (
|
|
289
|
+
onClick: (l) => I(e)
|
|
288
290
|
}, null, 8, oe)) : k("", !0)
|
|
289
291
|
])
|
|
290
292
|
]),
|
|
@@ -297,8 +299,8 @@ const Q = { key: 0 }, Y = {
|
|
|
297
299
|
_: 3
|
|
298
300
|
}, 8, ["model"]));
|
|
299
301
|
}
|
|
300
|
-
}), se = /* @__PURE__ */ G(ie, [["__scopeId", "data-v-
|
|
302
|
+
}), se = /* @__PURE__ */ G(ie, [["__scopeId", "data-v-74d07c51"]]), he = J(se);
|
|
301
303
|
export {
|
|
302
|
-
|
|
304
|
+
m as D,
|
|
303
305
|
he as Z
|
|
304
306
|
};
|
|
@@ -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 "./DatePicker-
|
|
3
|
-
import { _ } from "./Button-
|
|
4
|
-
import { w as u } from "./utils-
|
|
2
|
+
import { D as f } from "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { _ } from "./Button-Va8xfPJd.js";
|
|
4
|
+
import { w as u } from "./utils-D-zYpBSZ.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 "./DatePicker-
|
|
3
|
-
import { m as y } from "./vendor-
|
|
4
|
-
import { _ as h } from "./Button-
|
|
5
|
-
import { w as v } from "./utils-
|
|
2
|
+
import { D as w } from "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { m as y } from "./vendor-gTOtiVzA.js";
|
|
4
|
+
import { _ as h } from "./Button-Va8xfPJd.js";
|
|
5
|
+
import { w as v } from "./utils-D-zYpBSZ.js";
|
|
6
6
|
const k = { class: "file_wrapper" }, x = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "header"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { w as H } from "./utils-D-zYpBSZ.js";
|
|
3
3
|
const N = /* @__PURE__ */ $({
|
|
4
4
|
name: "zh-grid",
|
|
5
5
|
__name: "Grid",
|
|
@@ -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 "./DatePicker-
|
|
3
|
-
import { _ } from "./Button-
|
|
4
|
-
import { w as u } from "./utils-
|
|
2
|
+
import { D as d } from "./DatePicker-BrD1XS6-.js";
|
|
3
|
+
import { _ } from "./Button-Va8xfPJd.js";
|
|
4
|
+
import { w as u } from "./utils-D-zYpBSZ.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 { l as P } from "./vendor-
|
|
3
|
-
import { _ as U } from "./Button-
|
|
4
|
-
import { w as Z } from "./utils-
|
|
2
|
+
import { l as P } from "./vendor-gTOtiVzA.js";
|
|
3
|
+
import { _ as U } from "./Button-Va8xfPJd.js";
|
|
4
|
+
import { w as Z } from "./utils-D-zYpBSZ.js";
|
|
5
5
|
const A = /* @__PURE__ */ b({
|
|
6
6
|
name: "zh-input",
|
|
7
7
|
__name: "Input",
|