zjh-web-ui 1.0.10 → 1.0.11
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/config/resolver.js +1 -1
- package/dist/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.js +23 -23
- package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.js +2 -2
- package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue2.js +27 -27
- package/dist/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.js +38 -38
- package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.js +2 -2
- package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue2.js +80 -80
- package/dist/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.js +23 -23
- package/dist/components/HuiCountDownButton/HuiCountDownButton.vue.js +14 -14
- package/dist/components/HuiDataView/HuiDataView.vue2.js +37 -37
- package/dist/components/HuiGridForm/HuiGridForm.vue.js +2 -2
- package/dist/components/HuiGridForm/HuiGridForm.vue2.js +103 -103
- package/dist/components/HuiGridForm/HuiGridFormHooks.js +1 -1
- package/dist/components/HuiLineEditDialog/HuiLineEditDialog.vue2.js +69 -69
- package/dist/components/HuiLineEditPopover/HuiLineEditPopover.vue2.js +47 -47
- package/dist/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.js +21 -21
- package/dist/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.js +49 -49
- package/dist/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue2.js +2 -2
- package/dist/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.js +14 -14
- package/dist/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.js +18 -18
- package/dist/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.js +50 -50
- package/dist/components/HuiTags/HuiTags.vue2.js +9 -9
- package/dist/components/HuiTagsMore/HuiTagsMore.vue.js +12 -16
- package/dist/components/HuiTinymce/HuiTinymce.vue.js +10 -10
- package/dist/components/HuiTinymceDialog/HuiTinymceDialog.vue.js +43 -43
- package/dist/components/HuiTip/HuiTip.vue.js +15 -15
- package/dist/hooks/useHuiFormDialog/useHuiFormDialog.js +1 -1
- package/dist/index.d.ts +2116 -0
- package/dist/style.css +1 -1
- package/dist/utils/hui-rules.js +1 -1
- package/dist/utils/hui-tool/message-box/index.js +3 -3
- package/dist/utils/hui-tool/message-box/message-box.vue2.js +112 -0
- package/dist/utils/hui-tool/message-box/message-box.vue3.js +2 -2
- package/global.d.ts +21 -21
- package/package.json +1 -1
- package/types/index.d.ts +2115 -12
- package/dist/utils/hui-tool/message-box/message-box.vue.js +0 -112
- package/types/components/AMapConfig.d.ts +0 -2
- package/types/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.d.ts +0 -105
- package/types/components/HuiAMapMassMarkers/index.d.ts +0 -107
- package/types/components/HuiAMapMassMarkers/type.d.ts +0 -58
- package/types/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.d.ts +0 -76
- package/types/components/HuiAMapSearchAddress/index.d.ts +0 -77
- package/types/components/HuiAMapSearchAddress/type.d.ts +0 -19
- package/types/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.d.ts +0 -38
- package/types/components/HuiAMapSearchAddressDialog/index.d.ts +0 -71
- package/types/components/HuiAMapSearchAddressDialog/type.d.ts +0 -17
- package/types/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.d.ts +0 -76
- package/types/components/HuiAMapSelectAddress/index.d.ts +0 -77
- package/types/components/HuiAMapSelectAddress/type.d.ts +0 -19
- package/types/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.d.ts +0 -38
- package/types/components/HuiAMapSelectAddressDialog/index.d.ts +0 -71
- package/types/components/HuiAMapSelectAddressDialog/type.d.ts +0 -17
- package/types/components/HuiCountDownButton/HuiCountDownButton.vue.d.ts +0 -44
- package/types/components/HuiCountDownButton/index.d.ts +0 -76
- package/types/components/HuiCountDownButton/type.d.ts +0 -20
- package/types/components/HuiDataView/HuiDataView.vue.d.ts +0 -60
- package/types/components/HuiDataView/index.d.ts +0 -109
- package/types/components/HuiDataView/type.d.ts +0 -49
- package/types/components/HuiGridForm/HuiGridForm.vue.d.ts +0 -77
- package/types/components/HuiGridForm/HuiGridFormHooks.d.ts +0 -4
- package/types/components/HuiGridForm/index.d.ts +0 -175
- package/types/components/HuiGridForm/type.d.ts +0 -67
- package/types/components/HuiLineEditDialog/HuiLineEditDialog.vue.d.ts +0 -75
- package/types/components/HuiLineEditDialog/index.d.ts +0 -173
- package/types/components/HuiLineEditDialog/type.d.ts +0 -86
- package/types/components/HuiLineEditPopover/HuiLineEditPopover.vue.d.ts +0 -74
- package/types/components/HuiLineEditPopover/index.d.ts +0 -133
- package/types/components/HuiLineEditPopover/type.d.ts +0 -23
- package/types/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.d.ts +0 -31
- package/types/components/HuiPreviewRichTextDialog/index.d.ts +0 -22
- package/types/components/HuiPreviewRichTextDialog/type.d.ts +0 -4
- package/types/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.d.ts +0 -53
- package/types/components/HuiRegionTreeDialog/index.d.ts +0 -68
- package/types/components/HuiRegionTreeDialog/type.d.ts +0 -24
- package/types/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue.d.ts +0 -25
- package/types/components/HuiRegionTreeSelect/index.d.ts +0 -29
- package/types/components/HuiRegionTreeSelect/type.d.ts +0 -6
- package/types/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.d.ts +0 -14
- package/types/components/HuiSelectLoadStatus/index.d.ts +0 -33
- package/types/components/HuiSelectLoadStatus/type.d.ts +0 -11
- package/types/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.d.ts +0 -37
- package/types/components/HuiShowUrlDialog/index.d.ts +0 -40
- package/types/components/HuiShowUrlDialog/type.d.ts +0 -11
- package/types/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.d.ts +0 -44
- package/types/components/HuiStringArrayInputDialog/index.d.ts +0 -67
- package/types/components/HuiStringArrayInputDialog/type.d.ts +0 -33
- package/types/components/HuiTags/HuiTags.vue.d.ts +0 -37
- package/types/components/HuiTags/index.d.ts +0 -36
- package/types/components/HuiTagsMore/HuiTagsMore.vue.d.ts +0 -93
- package/types/components/HuiTagsMore/index.d.ts +0 -92
- package/types/components/HuiTinymce/HuiTinymce.vue.d.ts +0 -62
- package/types/components/HuiTinymce/HuiTinymceLinkHooks.d.ts +0 -3
- package/types/components/HuiTinymce/HuiTinymceSettingHooks.d.ts +0 -3
- package/types/components/HuiTinymce/index.d.ts +0 -66
- package/types/components/HuiTinymce/type.d.ts +0 -51
- package/types/components/HuiTinymceDialog/HuiTinymceDialog.vue.d.ts +0 -53
- package/types/components/HuiTinymceDialog/index.d.ts +0 -78
- package/types/components/HuiTinymceDialog/type.d.ts +0 -12
- package/types/components/HuiTip/HuiTip.vue.d.ts +0 -22
- package/types/components/HuiTip/index.d.ts +0 -99
- package/types/components/HuiTip/type.d.ts +0 -14
- package/types/components-install-list.d.ts +0 -3328
- package/types/components.d.ts +0 -21
- package/types/delegate.d.ts +0 -41
- package/types/directives/index.d.ts +0 -4
- package/types/directives/install-loadmore.d.ts +0 -7
- package/types/directives/select-loadmore.d.ts +0 -7
- package/types/hooks/index.d.ts +0 -3
- package/types/hooks/useHuiDialog/useHuiDialog.d.ts +0 -18
- package/types/hooks/useHuiFormDialog/formDialogPropsDef.d.ts +0 -3
- package/types/hooks/useHuiFormDialog/type.d.ts +0 -90
- package/types/hooks/useHuiFormDialog/useHuiFormDialog.d.ts +0 -32
- package/types/install-helper/install.d.ts +0 -18
- package/types/install-helper/typescript.d.ts +0 -14
- package/types/utils/hui-rules.d.ts +0 -80
- package/types/utils/hui-tool/index.d.ts +0 -8
- package/types/utils/hui-tool/message-box/index.d.ts +0 -18
- package/types/utils/hui-tool/message-box/message-box.vue.d.ts +0 -36
- package/types/utils/hui-tool/msg-tool.d.ts +0 -26
- package/types/utils/index.d.ts +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useHuiDialog as
|
|
1
|
+
import { defineComponent as S, ref as r, createBlock as h, openBlock as k, unref as o, isRef as H, withCtx as l, createVNode as d, createTextVNode as p, toValue as M } from "vue";
|
|
2
|
+
import { useHuiDialog as x } from "../../hooks/useHuiDialog/useHuiDialog.js";
|
|
3
3
|
import { ElDialog as B, ElButton as m } from "element-plus";
|
|
4
|
-
import "
|
|
5
|
-
/* empty css
|
|
4
|
+
import "zjh-utils";
|
|
5
|
+
/* empty css */
|
|
6
6
|
import D from "../HuiAMapSelectAddress/HuiAMapSelectAddress.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const L = /* @__PURE__ */ S({
|
|
8
8
|
name: "HuiAMapSelectAddressDialog",
|
|
9
9
|
__name: "HuiAMapSelectAddressDialog",
|
|
10
10
|
props: {
|
|
@@ -18,10 +18,10 @@ const _ = /* @__PURE__ */ C({
|
|
|
18
18
|
title: { default: "选择位置" }
|
|
19
19
|
},
|
|
20
20
|
emits: ["onSubmit"],
|
|
21
|
-
setup(
|
|
22
|
-
const b = c, n = r(null), { show: a, open: v, close: i, payload: w, confirmLoading: y } =
|
|
21
|
+
setup(s, { expose: f, emit: c }) {
|
|
22
|
+
const b = c, n = r(null), { show: a, open: v, close: i, payload: w, confirmLoading: y } = x(), t = r(null);
|
|
23
23
|
async function A() {
|
|
24
|
-
n.value.loadMap(), t.value =
|
|
24
|
+
n.value.loadMap(), t.value = M(w) || "";
|
|
25
25
|
}
|
|
26
26
|
function V() {
|
|
27
27
|
t.value = "";
|
|
@@ -32,11 +32,11 @@ const _ = /* @__PURE__ */ C({
|
|
|
32
32
|
return f({
|
|
33
33
|
open: v,
|
|
34
34
|
close: i
|
|
35
|
-
}), (
|
|
35
|
+
}), (C, e) => (k(), h(o(B), {
|
|
36
36
|
modelValue: o(a),
|
|
37
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
38
|
-
title:
|
|
39
|
-
width:
|
|
37
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => H(a) ? a.value = u : null),
|
|
38
|
+
title: s.title,
|
|
39
|
+
width: s.width,
|
|
40
40
|
top: "5vh",
|
|
41
41
|
"modal-append-to-body": !1,
|
|
42
42
|
"append-to-body": "",
|
|
@@ -45,30 +45,30 @@ const _ = /* @__PURE__ */ C({
|
|
|
45
45
|
onClose: V
|
|
46
46
|
}, {
|
|
47
47
|
footer: l(() => [
|
|
48
|
-
|
|
49
|
-
default: l(() => e[2] || (e[2] = [
|
|
50
|
-
p("取 消")
|
|
51
|
-
])),
|
|
48
|
+
d(o(m), { onClick: o(i) }, {
|
|
49
|
+
default: l(() => [...e[2] || (e[2] = [
|
|
50
|
+
p("取 消", -1)
|
|
51
|
+
])]),
|
|
52
52
|
_: 1
|
|
53
53
|
}, 8, ["onClick"]),
|
|
54
|
-
|
|
54
|
+
d(o(m), {
|
|
55
55
|
type: "primary",
|
|
56
56
|
class: "w-100",
|
|
57
57
|
loading: o(y),
|
|
58
58
|
onClick: g
|
|
59
59
|
}, {
|
|
60
|
-
default: l(() => e[3] || (e[3] = [
|
|
61
|
-
p("确定")
|
|
62
|
-
])),
|
|
60
|
+
default: l(() => [...e[3] || (e[3] = [
|
|
61
|
+
p("确定", -1)
|
|
62
|
+
])]),
|
|
63
63
|
_: 1
|
|
64
64
|
}, 8, ["loading"])
|
|
65
65
|
]),
|
|
66
66
|
default: l(() => [
|
|
67
|
-
|
|
67
|
+
d(D, {
|
|
68
68
|
ref_key: "HuiAMapSelectAddressRef",
|
|
69
69
|
ref: n,
|
|
70
70
|
modelValue: t.value,
|
|
71
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
71
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value = u),
|
|
72
72
|
class: "m-b-40",
|
|
73
73
|
"show-input": !0,
|
|
74
74
|
width: "100%"
|
|
@@ -79,5 +79,5 @@ const _ = /* @__PURE__ */ C({
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
L as default
|
|
83
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as w, ref as
|
|
1
|
+
import { defineComponent as w, ref as c, onUnmounted as y, createElementBlock as r, openBlock as u, normalizeClass as n, createElementVNode as B, createCommentVNode as d, createBlock as D, toDisplayString as m, unref as N, withCtx as h, createTextVNode as g } from "vue";
|
|
2
2
|
import { ElButton as E } from "element-plus";
|
|
3
3
|
const S = /* @__PURE__ */ w({
|
|
4
4
|
name: "HuiCountDownButton",
|
|
@@ -12,18 +12,18 @@ const S = /* @__PURE__ */ w({
|
|
|
12
12
|
type: { default: "text" }
|
|
13
13
|
},
|
|
14
14
|
emits: ["click"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
15
|
+
setup(e, { expose: v, emit: f }) {
|
|
16
|
+
const i = e, C = f, t = c(!1), l = c(0);
|
|
17
17
|
let a = null;
|
|
18
18
|
function b() {
|
|
19
|
-
C("click",
|
|
19
|
+
C("click", k);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function k(o = !0) {
|
|
22
|
+
o && x();
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
a || (l.value = Number(
|
|
26
|
-
l.value > 0 && l.value <= Number(
|
|
24
|
+
function x() {
|
|
25
|
+
a || (l.value = Number(i.timeCount), t.value = !0, a = setInterval(() => {
|
|
26
|
+
l.value > 0 && l.value <= Number(i.timeCount) ? l.value-- : s();
|
|
27
27
|
}, 1e3));
|
|
28
28
|
}
|
|
29
29
|
function s() {
|
|
@@ -33,24 +33,24 @@ const S = /* @__PURE__ */ w({
|
|
|
33
33
|
resetState: s
|
|
34
34
|
}), y(() => {
|
|
35
35
|
s();
|
|
36
|
-
}), (
|
|
36
|
+
}), (o, V) => (u(), r("div", {
|
|
37
37
|
class: n(["inline-block", { "cursor-not-allowed": t.value }])
|
|
38
38
|
}, [
|
|
39
39
|
B("div", {
|
|
40
40
|
class: n(["inline-block", t.value ? "pointer-events-none" : "cursor-pointer"]),
|
|
41
41
|
onClick: b
|
|
42
42
|
}, [
|
|
43
|
-
e.type === "text" ? (
|
|
43
|
+
e.type === "text" ? (u(), r("div", {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: n([t.value ? e.disableClass : e.enableClass, e.baseClass])
|
|
46
|
-
},
|
|
47
|
-
e.type === "button" ? (
|
|
46
|
+
}, m(t.value ? l.value + "s" : e.title), 3)) : d("", !0),
|
|
47
|
+
e.type === "button" ? (u(), D(N(E), {
|
|
48
48
|
key: 1,
|
|
49
49
|
disabled: t.value,
|
|
50
50
|
class: n([t.value ? e.disableClass : e.enableClass, e.baseClass])
|
|
51
51
|
}, {
|
|
52
52
|
default: h(() => [
|
|
53
|
-
g(
|
|
53
|
+
g(m(t.value ? l.value + "s" : e.title), 1)
|
|
54
54
|
]),
|
|
55
55
|
_: 1
|
|
56
56
|
}, 8, ["disabled", "class"])) : d("", !0)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { webUtils as
|
|
1
|
+
import { defineComponent as y, watch as k, computed as C, createElementBlock as n, openBlock as t, Fragment as d, renderList as v, normalizeStyle as g, createElementVNode as l, normalizeClass as c, unref as b, renderSlot as u, mergeProps as f, toDisplayString as p, createBlock as B } from "vue";
|
|
2
|
+
import { webUtils as _, addUnit as V } from "zjh-web-lib";
|
|
3
3
|
import { ElImage as $ } from "element-plus";
|
|
4
4
|
const D = { class: "flex flex-wrap" }, E = { class: "flex justify-between lh-32 p-x-10" }, L = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex flex-wrap"
|
|
7
|
-
}, S = { class: "flex-shrink-0" }, T = ["onClick"], z = /* @__PURE__ */
|
|
7
|
+
}, S = { class: "flex-shrink-0" }, T = ["onClick"], z = /* @__PURE__ */ y({
|
|
8
8
|
name: "HuiDataView",
|
|
9
9
|
__name: "HuiDataView",
|
|
10
10
|
props: {
|
|
@@ -13,63 +13,63 @@ const D = { class: "flex flex-wrap" }, E = { class: "flex justify-between lh-32
|
|
|
13
13
|
config: {},
|
|
14
14
|
data: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
() =>
|
|
20
|
-
(
|
|
21
|
-
if (!
|
|
22
|
-
const e =
|
|
23
|
-
for (const o of
|
|
16
|
+
setup(r) {
|
|
17
|
+
const i = r;
|
|
18
|
+
k(
|
|
19
|
+
() => i.data,
|
|
20
|
+
(a, w) => {
|
|
21
|
+
if (!i.data) return;
|
|
22
|
+
const e = a || {};
|
|
23
|
+
for (const o of i.config)
|
|
24
24
|
o.value = e[o.prop];
|
|
25
25
|
},
|
|
26
26
|
{ immediate: !0 }
|
|
27
27
|
);
|
|
28
|
-
const
|
|
29
|
-
return (
|
|
30
|
-
(
|
|
28
|
+
const x = C(() => 100 / (_.isMobile() ? 1 : i.lineCount) + "%");
|
|
29
|
+
return (a, w) => (t(), n("div", D, [
|
|
30
|
+
(t(!0), n(d, null, v(r.config, (e, o) => (t(), n("div", {
|
|
31
31
|
key: e.prop,
|
|
32
32
|
class: "flex",
|
|
33
|
-
style:
|
|
33
|
+
style: g({ width: x.value })
|
|
34
34
|
}, [
|
|
35
|
-
|
|
36
|
-
class:
|
|
35
|
+
l("div", {
|
|
36
|
+
class: c(["text-center bg-normal flex-center flex-shrink-0 text-14 b-1px b-solid b-lighter lh-32 text-regular !c-info noBorderTop", [
|
|
37
37
|
o + 1 <= r.lineCount ? "!b-t-1px !b-t-solid !b-t-lighter" : "",
|
|
38
38
|
o % r.lineCount != 0 ? "noBorderLeft" : ""
|
|
39
39
|
]]),
|
|
40
|
-
style:
|
|
40
|
+
style: g({ width: b(V)(r.titleWidth) })
|
|
41
41
|
}, [
|
|
42
|
-
u(
|
|
43
|
-
|
|
42
|
+
u(a.$slots, e.prop + "-title", f({ ref_for: !0 }, e), () => [
|
|
43
|
+
l("div", null, p(e.title), 1)
|
|
44
44
|
], !0)
|
|
45
45
|
], 6),
|
|
46
|
-
|
|
47
|
-
class:
|
|
46
|
+
l("div", {
|
|
47
|
+
class: c(["flex-1 b-1px b-solid b-lighter noBorderLeft text-regular", o + 1 > r.lineCount ? "noBorderTop" : ""])
|
|
48
48
|
}, [
|
|
49
|
-
|
|
50
|
-
(e == null ? void 0 : e.type) === "img" ? (
|
|
51
|
-
(
|
|
49
|
+
l("div", E, [
|
|
50
|
+
(e == null ? void 0 : e.type) === "img" ? (t(), n("div", L, [
|
|
51
|
+
(t(!0), n(d, null, v(e.value, (h, s) => (t(), B(b($), {
|
|
52
52
|
key: s,
|
|
53
|
-
class:
|
|
54
|
-
src:
|
|
53
|
+
class: c([s !== e.value.length ? "mr-10" : "", "w-43 h-43 m-y-5"]),
|
|
54
|
+
src: h,
|
|
55
55
|
"preview-src-list": [e.value[s]],
|
|
56
56
|
fit: "cover"
|
|
57
57
|
}, null, 8, ["class", "src", "preview-src-list"]))), 128))
|
|
58
|
-
])) : (
|
|
59
|
-
u(
|
|
60
|
-
|
|
61
|
-
class:
|
|
62
|
-
},
|
|
58
|
+
])) : (t(), n(d, { key: 1 }, [
|
|
59
|
+
u(a.$slots, e.prop + "-left", f({ ref_for: !0 }, e), () => [
|
|
60
|
+
l("div", {
|
|
61
|
+
class: c(e.class)
|
|
62
|
+
}, p(e.value), 3)
|
|
63
63
|
], !0),
|
|
64
|
-
|
|
65
|
-
u(
|
|
66
|
-
|
|
64
|
+
l("div", S, [
|
|
65
|
+
u(a.$slots, e.prop + "-right", f({ ref_for: !0 }, e), () => [
|
|
66
|
+
l("div", {
|
|
67
67
|
class: "c-primary hand",
|
|
68
|
-
onClick: (
|
|
68
|
+
onClick: (h) => {
|
|
69
69
|
var s;
|
|
70
70
|
return (s = e.handler) == null ? void 0 : s.call(e, e);
|
|
71
71
|
}
|
|
72
|
-
},
|
|
72
|
+
}, p(e.rightText), 9, T)
|
|
73
73
|
], !0)
|
|
74
74
|
])
|
|
75
75
|
], 64))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HuiGridForm.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-05fadfdc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
1
|
+
import { defineComponent as W, ref as I, watch as $, onMounted as X, createElementBlock as i, openBlock as l, Fragment as v, createElementVNode as E, createBlock as C, createCommentVNode as f, normalizeClass as S, renderList as b, normalizeStyle as B, toDisplayString as g, renderSlot as T, mergeProps as V, unref as y, withCtx as h, withDirectives as Y, vShow as Z, createSlots as ee, createTextVNode as F } from "vue";
|
|
2
2
|
import { ElSelect as te, ElOption as oe, ElInput as ne, ElButton as le } from "element-plus";
|
|
3
|
-
import { objectUtils as
|
|
3
|
+
import { objectUtils as D, testUtils as m } from "zjh-utils";
|
|
4
4
|
import { useDynamicList as ae } from "./HuiGridFormHooks.js";
|
|
5
|
-
const
|
|
5
|
+
const ie = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex"
|
|
8
|
-
},
|
|
8
|
+
}, se = { key: 1 }, re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "h-25 flex items-center justify-center c-disabled"
|
|
11
11
|
}, ue = {
|
|
@@ -28,193 +28,193 @@ const se = {
|
|
|
28
28
|
btnText: { default: "添加" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["onRemoveItem"],
|
|
31
|
-
setup(
|
|
32
|
-
const q = R, { moveItem: A, removeItem: H } = ae(),
|
|
31
|
+
setup(d, { expose: N, emit: R }) {
|
|
32
|
+
const q = R, { moveItem: A, removeItem: H } = ae(), r = d, x = I(!1), U = {}, u = I(D.deepClone(r.listData)), c = I(D.deepClone(r.config));
|
|
33
33
|
$(
|
|
34
|
-
() =>
|
|
35
|
-
(
|
|
36
|
-
u.value =
|
|
34
|
+
() => r.listData,
|
|
35
|
+
(o, t) => {
|
|
36
|
+
u.value = o, k();
|
|
37
37
|
},
|
|
38
38
|
{ immediate: !0 }
|
|
39
39
|
), $(
|
|
40
|
-
() =>
|
|
41
|
-
(
|
|
42
|
-
|
|
40
|
+
() => r.config,
|
|
41
|
+
(o) => {
|
|
42
|
+
c.value = D.deepClone(o), k();
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
immediate: !0
|
|
46
46
|
}
|
|
47
47
|
), X(() => {
|
|
48
|
-
for (const
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
for (const o in c.value) {
|
|
49
|
+
const t = c.value[o];
|
|
50
|
+
U[t.prop] = "";
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
m.isEmpty(r.listData) && r.isCanAppend && j();
|
|
53
53
|
});
|
|
54
|
-
function
|
|
55
|
-
u.value.push(
|
|
54
|
+
function j() {
|
|
55
|
+
u.value.push(D.deepClone(U));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
n && A(u.value,
|
|
57
|
+
function L(o, t, n) {
|
|
58
|
+
n && A(u.value, o, t);
|
|
59
59
|
}
|
|
60
|
-
async function O(
|
|
61
|
-
const
|
|
60
|
+
async function O(o) {
|
|
61
|
+
const t = u.value[o];
|
|
62
62
|
let n = !0;
|
|
63
|
-
|
|
63
|
+
r.isCanDeleteItem && (n = await r.isCanDeleteItem(t, o)), !(!n || !await H(u.value, o)) && (q("onRemoveItem", t), k());
|
|
64
64
|
}
|
|
65
|
-
function M(
|
|
66
|
-
const
|
|
67
|
-
return
|
|
65
|
+
function M(o = !0) {
|
|
66
|
+
const t = u.value.filter((n) => !_(n));
|
|
67
|
+
return o ? (x.value = !0, z(t) ? t : null) : t;
|
|
68
68
|
}
|
|
69
|
-
function z(
|
|
70
|
-
for (const
|
|
71
|
-
for (const n of
|
|
72
|
-
if ((n.required ?? !0) &&
|
|
69
|
+
function z(o) {
|
|
70
|
+
for (const t of o)
|
|
71
|
+
for (const n of c.value)
|
|
72
|
+
if ((n.required ?? !0) && m.isEmpty(t[n.prop]))
|
|
73
73
|
return !1;
|
|
74
74
|
return !0;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.values(
|
|
76
|
+
function _(o) {
|
|
77
|
+
return Object.values(o).every((t) => m.isEmpty(t));
|
|
78
78
|
}
|
|
79
|
-
function G(
|
|
80
|
-
return
|
|
79
|
+
function G(o, t) {
|
|
80
|
+
return x.value && m.isEmpty(t[o.prop]) && !_(t) && (o.required ?? !0);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
for (const
|
|
85
|
-
|
|
86
|
-
configItem:
|
|
82
|
+
function k() {
|
|
83
|
+
const o = {};
|
|
84
|
+
for (const t of c.value)
|
|
85
|
+
t.type === "select" && (t.reselected || (o[t.prop] = {
|
|
86
|
+
configItem: t,
|
|
87
87
|
valueList: []
|
|
88
88
|
}));
|
|
89
|
-
for (const
|
|
90
|
-
for (const n in
|
|
91
|
-
const a =
|
|
92
|
-
if (
|
|
93
|
-
const e =
|
|
89
|
+
for (const t of u.value)
|
|
90
|
+
for (const n in t) {
|
|
91
|
+
const a = t[n];
|
|
92
|
+
if (m.isEmpty(a)) continue;
|
|
93
|
+
const e = o[n];
|
|
94
94
|
e && e.valueList.push(a);
|
|
95
95
|
}
|
|
96
|
-
for (const
|
|
97
|
-
const n = t
|
|
98
|
-
for (const
|
|
99
|
-
const J = a.includes(
|
|
100
|
-
|
|
96
|
+
for (const t in o) {
|
|
97
|
+
const n = o[t], a = n.valueList, e = n.configItem.dict, s = r.config.find((p) => p.prop == t), K = (s == null ? void 0 : s.dict) || [];
|
|
98
|
+
for (const p of e) {
|
|
99
|
+
const J = a.includes(p.value), w = K.find((Q) => Q.value == p.value);
|
|
100
|
+
p.disabled = w == null ? void 0 : w.disabled, p.isUsed = J && !p.disabled;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function P(
|
|
105
|
-
return !
|
|
104
|
+
function P(o) {
|
|
105
|
+
return !o.some((t) => t.disabled || !t.isUsed);
|
|
106
106
|
}
|
|
107
|
-
return N({ getData: M }), (
|
|
108
|
-
|
|
109
|
-
class:
|
|
107
|
+
return N({ getData: M }), (o, t) => (l(), i(v, null, [
|
|
108
|
+
E("div", {
|
|
109
|
+
class: S(["flex w-100% hui-grid-form-title", d.gridFromClass]),
|
|
110
110
|
style: { width: "100%" }
|
|
111
111
|
}, [
|
|
112
|
-
(l(!0),
|
|
112
|
+
(l(!0), i(v, null, b(c.value, (n, a) => (l(), i("div", {
|
|
113
113
|
key: a,
|
|
114
114
|
class: "font-bold pr-10",
|
|
115
115
|
style: B({ width: n.width })
|
|
116
|
-
},
|
|
116
|
+
}, g(n.title), 5))), 128))
|
|
117
117
|
], 2),
|
|
118
|
-
(l(!0),
|
|
118
|
+
(l(!0), i(v, null, b(u.value, (n, a) => (l(), i("div", {
|
|
119
119
|
key: a,
|
|
120
120
|
class: "flex mt-10 w-100% hui-grid-form-content"
|
|
121
121
|
}, [
|
|
122
|
-
(l(!0),
|
|
122
|
+
(l(!0), i(v, null, b(c.value, (e) => (l(), i("div", {
|
|
123
123
|
key: e.prop,
|
|
124
124
|
class: "flex-y pr-10",
|
|
125
125
|
style: B({ width: e.width })
|
|
126
126
|
}, [
|
|
127
|
-
|
|
128
|
-
T(
|
|
129
|
-
])) : (l(),
|
|
130
|
-
e.type === "select" ? (l(),
|
|
127
|
+
o.$slots[e.prop] ? (l(), i("div", ie, [
|
|
128
|
+
T(o.$slots, e.prop, V({ ref_for: !0 }, { dataItem: n, el: e, prop: e.prop }), void 0, !0)
|
|
129
|
+
])) : (l(), i("div", se, [
|
|
130
|
+
e.type === "select" ? (l(), C(y(te), V({
|
|
131
131
|
key: 0,
|
|
132
132
|
ref_for: !0
|
|
133
133
|
}, e.attr, {
|
|
134
134
|
modelValue: n[e.prop],
|
|
135
|
-
"onUpdate:modelValue": (
|
|
135
|
+
"onUpdate:modelValue": (s) => n[e.prop] = s,
|
|
136
136
|
disabled: e.readonly,
|
|
137
137
|
clearable: e.clearable ?? !0,
|
|
138
138
|
placeholder: e.placeholder || "请选择",
|
|
139
|
-
onChange:
|
|
139
|
+
onChange: k
|
|
140
140
|
}), {
|
|
141
|
-
default:
|
|
142
|
-
(l(!0),
|
|
143
|
-
key:
|
|
144
|
-
label:
|
|
145
|
-
value:
|
|
146
|
-
disabled:
|
|
141
|
+
default: h(() => [
|
|
142
|
+
(l(!0), i(v, null, b(e.dict, (s) => Y((l(), C(y(oe), {
|
|
143
|
+
key: s.value,
|
|
144
|
+
label: s.label,
|
|
145
|
+
value: s.value,
|
|
146
|
+
disabled: s.disabled
|
|
147
147
|
}, {
|
|
148
|
-
default:
|
|
149
|
-
T(
|
|
150
|
-
option:
|
|
148
|
+
default: h(() => [
|
|
149
|
+
T(o.$slots, `${e.prop}-option`, {
|
|
150
|
+
option: s,
|
|
151
151
|
prop: e.prop,
|
|
152
152
|
propConfig: e
|
|
153
153
|
}, void 0, !0)
|
|
154
154
|
]),
|
|
155
155
|
_: 2
|
|
156
156
|
}, 1032, ["label", "value", "disabled"])), [
|
|
157
|
-
[Z, !
|
|
157
|
+
[Z, !s.isUsed]
|
|
158
158
|
])), 128)),
|
|
159
|
-
P(e.dict) ? (l(),
|
|
160
|
-
|
|
161
|
-
]))) :
|
|
159
|
+
P(e.dict) ? (l(), i("div", re, [...t[0] || (t[0] = [
|
|
160
|
+
E("div", null, "暂无数据", -1)
|
|
161
|
+
])])) : f("", !0)
|
|
162
162
|
]),
|
|
163
163
|
_: 2
|
|
164
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled", "clearable", "placeholder"])) : (l(),
|
|
164
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled", "clearable", "placeholder"])) : (l(), C(y(ne), V({
|
|
165
165
|
key: 1,
|
|
166
166
|
ref_for: !0
|
|
167
167
|
}, e.attr, {
|
|
168
168
|
modelValue: n[e.prop],
|
|
169
|
-
"onUpdate:modelValue": (
|
|
169
|
+
"onUpdate:modelValue": (s) => n[e.prop] = s,
|
|
170
170
|
type: e.dataType ? e.dataType : "number",
|
|
171
171
|
readonly: e.readonly,
|
|
172
172
|
placeholder: e.placeholder || "请输入",
|
|
173
173
|
class: "inputFund",
|
|
174
174
|
"input-style": e.style
|
|
175
175
|
}), ee({ _: 2 }, [
|
|
176
|
-
|
|
176
|
+
y(m).isNotEmpty(e.append) ? {
|
|
177
177
|
name: "append",
|
|
178
|
-
fn:
|
|
179
|
-
F(
|
|
178
|
+
fn: h(() => [
|
|
179
|
+
F(g(e.append), 1)
|
|
180
180
|
]),
|
|
181
181
|
key: "0"
|
|
182
182
|
} : void 0
|
|
183
183
|
]), 1040, ["modelValue", "onUpdate:modelValue", "type", "readonly", "placeholder", "input-style"]))
|
|
184
184
|
])),
|
|
185
|
-
G(e, n) ? (l(),
|
|
185
|
+
G(e, n) ? (l(), i("div", ue, g(e.errMsg || `请输入${e.title}`), 1)) : f("", !0)
|
|
186
186
|
], 4))), 128)),
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
d.handSort || d.handDelete ? (l(), i("div", de, [
|
|
188
|
+
d.handSort ? (l(), i("i", {
|
|
189
189
|
key: 0,
|
|
190
|
-
class:
|
|
191
|
-
onClick: (e) =>
|
|
192
|
-
}, null, 10, ce)) :
|
|
193
|
-
|
|
190
|
+
class: S([a === u.value.length - 1 ? "!text-[theme(backgroundColor.normal)]" : "", "icon-com i-com-jiantou-xia-shixin text-disabled ml-5 !text-13"]),
|
|
191
|
+
onClick: (e) => L(a, "down", a !== u.value.length - 1)
|
|
192
|
+
}, null, 10, ce)) : f("", !0),
|
|
193
|
+
d.handSort ? (l(), i("i", {
|
|
194
194
|
key: 1,
|
|
195
|
-
class:
|
|
196
|
-
onClick: (e) =>
|
|
197
|
-
}, null, 10, pe)) :
|
|
198
|
-
|
|
195
|
+
class: S([a === 0 ? "!text-[theme(backgroundColor.normal)]" : "", "icon-com i-com-jiantou-shang-shixin text-disabled ml-5 !text-13"]),
|
|
196
|
+
onClick: (e) => L(a, "up", a !== 0)
|
|
197
|
+
}, null, 10, pe)) : f("", !0),
|
|
198
|
+
d.handDelete ? (l(), i("i", {
|
|
199
199
|
key: 2,
|
|
200
200
|
class: "icon-com i-com-lajitong text-disabled ml-5 !text-13",
|
|
201
201
|
onClick: (e) => O(a)
|
|
202
|
-
}, null, 8, fe)) :
|
|
203
|
-
])) :
|
|
202
|
+
}, null, 8, fe)) : f("", !0)
|
|
203
|
+
])) : f("", !0)
|
|
204
204
|
]))), 128)),
|
|
205
|
-
|
|
205
|
+
d.isCanAppend ? (l(), C(y(le), {
|
|
206
206
|
key: 0,
|
|
207
207
|
class: "mt-10",
|
|
208
|
-
onClick:
|
|
208
|
+
onClick: j
|
|
209
209
|
}, {
|
|
210
|
-
icon:
|
|
211
|
-
|
|
212
|
-
])),
|
|
213
|
-
default:
|
|
214
|
-
F(
|
|
210
|
+
icon: h(() => [...t[1] || (t[1] = [
|
|
211
|
+
E("i", { class: "icon-com i-com-jiahao" }, null, -1)
|
|
212
|
+
])]),
|
|
213
|
+
default: h(() => [
|
|
214
|
+
F(g(r.btnText) + " ", 1)
|
|
215
215
|
]),
|
|
216
216
|
_: 1
|
|
217
|
-
})) :
|
|
217
|
+
})) : f("", !0)
|
|
218
218
|
], 64));
|
|
219
219
|
}
|
|
220
220
|
});
|