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.
Files changed (121) hide show
  1. package/config/resolver.js +1 -1
  2. package/dist/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.js +23 -23
  3. package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.js +2 -2
  4. package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue2.js +27 -27
  5. package/dist/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.js +38 -38
  6. package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.js +2 -2
  7. package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue2.js +80 -80
  8. package/dist/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.js +23 -23
  9. package/dist/components/HuiCountDownButton/HuiCountDownButton.vue.js +14 -14
  10. package/dist/components/HuiDataView/HuiDataView.vue2.js +37 -37
  11. package/dist/components/HuiGridForm/HuiGridForm.vue.js +2 -2
  12. package/dist/components/HuiGridForm/HuiGridForm.vue2.js +103 -103
  13. package/dist/components/HuiGridForm/HuiGridFormHooks.js +1 -1
  14. package/dist/components/HuiLineEditDialog/HuiLineEditDialog.vue2.js +69 -69
  15. package/dist/components/HuiLineEditPopover/HuiLineEditPopover.vue2.js +47 -47
  16. package/dist/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.js +21 -21
  17. package/dist/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.js +49 -49
  18. package/dist/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue2.js +2 -2
  19. package/dist/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.js +14 -14
  20. package/dist/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.js +18 -18
  21. package/dist/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.js +50 -50
  22. package/dist/components/HuiTags/HuiTags.vue2.js +9 -9
  23. package/dist/components/HuiTagsMore/HuiTagsMore.vue.js +12 -16
  24. package/dist/components/HuiTinymce/HuiTinymce.vue.js +10 -10
  25. package/dist/components/HuiTinymceDialog/HuiTinymceDialog.vue.js +43 -43
  26. package/dist/components/HuiTip/HuiTip.vue.js +15 -15
  27. package/dist/hooks/useHuiFormDialog/useHuiFormDialog.js +1 -1
  28. package/dist/index.d.ts +2116 -0
  29. package/dist/style.css +1 -1
  30. package/dist/utils/hui-rules.js +1 -1
  31. package/dist/utils/hui-tool/message-box/index.js +3 -3
  32. package/dist/utils/hui-tool/message-box/message-box.vue2.js +112 -0
  33. package/dist/utils/hui-tool/message-box/message-box.vue3.js +2 -2
  34. package/global.d.ts +21 -21
  35. package/package.json +1 -1
  36. package/types/index.d.ts +2115 -12
  37. package/dist/utils/hui-tool/message-box/message-box.vue.js +0 -112
  38. package/types/components/AMapConfig.d.ts +0 -2
  39. package/types/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.d.ts +0 -105
  40. package/types/components/HuiAMapMassMarkers/index.d.ts +0 -107
  41. package/types/components/HuiAMapMassMarkers/type.d.ts +0 -58
  42. package/types/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.d.ts +0 -76
  43. package/types/components/HuiAMapSearchAddress/index.d.ts +0 -77
  44. package/types/components/HuiAMapSearchAddress/type.d.ts +0 -19
  45. package/types/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.d.ts +0 -38
  46. package/types/components/HuiAMapSearchAddressDialog/index.d.ts +0 -71
  47. package/types/components/HuiAMapSearchAddressDialog/type.d.ts +0 -17
  48. package/types/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.d.ts +0 -76
  49. package/types/components/HuiAMapSelectAddress/index.d.ts +0 -77
  50. package/types/components/HuiAMapSelectAddress/type.d.ts +0 -19
  51. package/types/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.d.ts +0 -38
  52. package/types/components/HuiAMapSelectAddressDialog/index.d.ts +0 -71
  53. package/types/components/HuiAMapSelectAddressDialog/type.d.ts +0 -17
  54. package/types/components/HuiCountDownButton/HuiCountDownButton.vue.d.ts +0 -44
  55. package/types/components/HuiCountDownButton/index.d.ts +0 -76
  56. package/types/components/HuiCountDownButton/type.d.ts +0 -20
  57. package/types/components/HuiDataView/HuiDataView.vue.d.ts +0 -60
  58. package/types/components/HuiDataView/index.d.ts +0 -109
  59. package/types/components/HuiDataView/type.d.ts +0 -49
  60. package/types/components/HuiGridForm/HuiGridForm.vue.d.ts +0 -77
  61. package/types/components/HuiGridForm/HuiGridFormHooks.d.ts +0 -4
  62. package/types/components/HuiGridForm/index.d.ts +0 -175
  63. package/types/components/HuiGridForm/type.d.ts +0 -67
  64. package/types/components/HuiLineEditDialog/HuiLineEditDialog.vue.d.ts +0 -75
  65. package/types/components/HuiLineEditDialog/index.d.ts +0 -173
  66. package/types/components/HuiLineEditDialog/type.d.ts +0 -86
  67. package/types/components/HuiLineEditPopover/HuiLineEditPopover.vue.d.ts +0 -74
  68. package/types/components/HuiLineEditPopover/index.d.ts +0 -133
  69. package/types/components/HuiLineEditPopover/type.d.ts +0 -23
  70. package/types/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.d.ts +0 -31
  71. package/types/components/HuiPreviewRichTextDialog/index.d.ts +0 -22
  72. package/types/components/HuiPreviewRichTextDialog/type.d.ts +0 -4
  73. package/types/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.d.ts +0 -53
  74. package/types/components/HuiRegionTreeDialog/index.d.ts +0 -68
  75. package/types/components/HuiRegionTreeDialog/type.d.ts +0 -24
  76. package/types/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue.d.ts +0 -25
  77. package/types/components/HuiRegionTreeSelect/index.d.ts +0 -29
  78. package/types/components/HuiRegionTreeSelect/type.d.ts +0 -6
  79. package/types/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.d.ts +0 -14
  80. package/types/components/HuiSelectLoadStatus/index.d.ts +0 -33
  81. package/types/components/HuiSelectLoadStatus/type.d.ts +0 -11
  82. package/types/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.d.ts +0 -37
  83. package/types/components/HuiShowUrlDialog/index.d.ts +0 -40
  84. package/types/components/HuiShowUrlDialog/type.d.ts +0 -11
  85. package/types/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.d.ts +0 -44
  86. package/types/components/HuiStringArrayInputDialog/index.d.ts +0 -67
  87. package/types/components/HuiStringArrayInputDialog/type.d.ts +0 -33
  88. package/types/components/HuiTags/HuiTags.vue.d.ts +0 -37
  89. package/types/components/HuiTags/index.d.ts +0 -36
  90. package/types/components/HuiTagsMore/HuiTagsMore.vue.d.ts +0 -93
  91. package/types/components/HuiTagsMore/index.d.ts +0 -92
  92. package/types/components/HuiTinymce/HuiTinymce.vue.d.ts +0 -62
  93. package/types/components/HuiTinymce/HuiTinymceLinkHooks.d.ts +0 -3
  94. package/types/components/HuiTinymce/HuiTinymceSettingHooks.d.ts +0 -3
  95. package/types/components/HuiTinymce/index.d.ts +0 -66
  96. package/types/components/HuiTinymce/type.d.ts +0 -51
  97. package/types/components/HuiTinymceDialog/HuiTinymceDialog.vue.d.ts +0 -53
  98. package/types/components/HuiTinymceDialog/index.d.ts +0 -78
  99. package/types/components/HuiTinymceDialog/type.d.ts +0 -12
  100. package/types/components/HuiTip/HuiTip.vue.d.ts +0 -22
  101. package/types/components/HuiTip/index.d.ts +0 -99
  102. package/types/components/HuiTip/type.d.ts +0 -14
  103. package/types/components-install-list.d.ts +0 -3328
  104. package/types/components.d.ts +0 -21
  105. package/types/delegate.d.ts +0 -41
  106. package/types/directives/index.d.ts +0 -4
  107. package/types/directives/install-loadmore.d.ts +0 -7
  108. package/types/directives/select-loadmore.d.ts +0 -7
  109. package/types/hooks/index.d.ts +0 -3
  110. package/types/hooks/useHuiDialog/useHuiDialog.d.ts +0 -18
  111. package/types/hooks/useHuiFormDialog/formDialogPropsDef.d.ts +0 -3
  112. package/types/hooks/useHuiFormDialog/type.d.ts +0 -90
  113. package/types/hooks/useHuiFormDialog/useHuiFormDialog.d.ts +0 -32
  114. package/types/install-helper/install.d.ts +0 -18
  115. package/types/install-helper/typescript.d.ts +0 -14
  116. package/types/utils/hui-rules.d.ts +0 -80
  117. package/types/utils/hui-tool/index.d.ts +0 -8
  118. package/types/utils/hui-tool/message-box/index.d.ts +0 -18
  119. package/types/utils/hui-tool/message-box/message-box.vue.d.ts +0 -36
  120. package/types/utils/hui-tool/msg-tool.d.ts +0 -26
  121. package/types/utils/index.d.ts +0 -2
@@ -1,10 +1,10 @@
1
- import { defineComponent as C, ref as r, openBlock as S, createBlock as h, unref as o, isRef as k, withCtx as l, createVNode as s, createTextVNode as p, toValue as H } from "vue";
2
- import { useHuiDialog as M } from "../../hooks/useHuiDialog/useHuiDialog.js";
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 "@hua5/hua5-utils";
5
- /* empty css */
4
+ import "zjh-utils";
5
+ /* empty css */
6
6
  import D from "../HuiAMapSelectAddress/HuiAMapSelectAddress.vue.js";
7
- const _ = /* @__PURE__ */ C({
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(x, { expose: f, emit: c }) {
22
- const b = c, n = r(null), { show: a, open: v, close: i, payload: w, confirmLoading: y } = M(), t = r(null);
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 = H(w) || "";
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
- }), (u, e) => (S(), h(o(B), {
35
+ }), (C, e) => (k(), h(o(B), {
36
36
  modelValue: o(a),
37
- "onUpdate:modelValue": e[1] || (e[1] = (d) => k(a) ? a.value = d : null),
38
- title: u.title,
39
- width: u.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
- s(o(m), { onClick: o(i) }, {
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
- s(o(m), {
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
- s(D, {
67
+ d(D, {
68
68
  ref_key: "HuiAMapSelectAddressRef",
69
69
  ref: n,
70
70
  modelValue: t.value,
71
- "onUpdate:modelValue": e[0] || (e[0] = (d) => t.value = d),
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
- _ as default
82
+ L as default
83
83
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, ref as i, onUnmounted as y, openBlock as o, createElementBlock as r, normalizeClass as n, createElementVNode as B, toDisplayString as c, createCommentVNode as d, createBlock as D, unref as N, withCtx as h, createTextVNode as g } from "vue";
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(m, { expose: v, emit: f }) {
16
- const u = m, C = f, t = i(!1), l = i(0);
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", p);
19
+ C("click", k);
20
20
  }
21
- function p(e = !0) {
22
- e && k();
21
+ function k(o = !0) {
22
+ o && x();
23
23
  }
24
- function k() {
25
- a || (l.value = Number(u.timeCount), t.value = !0, a = setInterval(() => {
26
- l.value > 0 && l.value <= Number(u.timeCount) ? l.value-- : s();
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
- }), (e, V) => (o(), r("div", {
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" ? (o(), r("div", {
43
+ e.type === "text" ? (u(), r("div", {
44
44
  key: 0,
45
45
  class: n([t.value ? e.disableClass : e.enableClass, e.baseClass])
46
- }, c(t.value ? l.value + "s" : e.title), 3)) : d("", !0),
47
- e.type === "button" ? (o(), D(N(E), {
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(c(t.value ? l.value + "s" : e.title), 1)
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 k, watch as _, computed as x, openBlock as l, createElementBlock as n, Fragment as d, renderList as h, normalizeStyle as v, createElementVNode as t, normalizeClass as i, unref as g, renderSlot as u, mergeProps as c, toDisplayString as f, createBlock as C } from "vue";
2
- import { webUtils as B, addUnit as V } from "zjh-web-lib";
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__ */ k({
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(b) {
17
- const a = b;
18
- _(
19
- () => a.data,
20
- (r, y) => {
21
- if (!a.data) return;
22
- const e = r || {};
23
- for (const o of a.config)
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 w = x(() => 100 / (B.isMobile() ? 1 : a.lineCount) + "%");
29
- return (r, y) => (l(), n("div", D, [
30
- (l(!0), n(d, null, h(r.config, (e, o) => (l(), n("div", {
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: v({ width: w.value })
33
+ style: g({ width: x.value })
34
34
  }, [
35
- t("div", {
36
- class: i(["text-center bg-normal flex-center flex-shrink-0 text-14 b-1px b-solid b-lighter lh-32 text-regular !c-info noBorderTop", [
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: v({ width: g(V)(r.titleWidth) })
40
+ style: g({ width: b(V)(r.titleWidth) })
41
41
  }, [
42
- u(r.$slots, e.prop + "-title", c({ ref_for: !0 }, e), () => [
43
- t("div", null, f(e.title), 1)
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
- t("div", {
47
- class: i(["flex-1 b-1px b-solid b-lighter noBorderLeft text-regular", o + 1 > r.lineCount ? "noBorderTop" : ""])
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
- t("div", E, [
50
- (e == null ? void 0 : e.type) === "img" ? (l(), n("div", L, [
51
- (l(!0), n(d, null, h(e.value, (p, s) => (l(), C(g($), {
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: i([s !== e.value.length ? "mr-10" : "", "w-43 h-43 m-y-5"]),
54
- src: p,
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
- ])) : (l(), n(d, { key: 1 }, [
59
- u(r.$slots, e.prop + "-left", c({ ref_for: !0 }, e), () => [
60
- t("div", {
61
- class: i(e.class)
62
- }, f(e.value), 3)
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
- t("div", S, [
65
- u(r.$slots, e.prop + "-right", c({ ref_for: !0 }, e), () => [
66
- t("div", {
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: (p) => {
68
+ onClick: (h) => {
69
69
  var s;
70
70
  return (s = e.handler) == null ? void 0 : s.call(e, e);
71
71
  }
72
- }, f(e.rightText), 9, T)
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 i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e377cee2"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-05fadfdc"]]);
5
5
  export {
6
- i as default
6
+ a as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as W, ref as w, watch as $, onMounted as X, openBlock as l, createElementBlock as s, Fragment as m, createElementVNode as I, normalizeClass as _, renderList as k, normalizeStyle as B, toDisplayString as C, renderSlot as T, mergeProps as E, createBlock as b, unref as v, withCtx as y, withDirectives as Y, vShow as Z, createCommentVNode as p, createSlots as ee, createTextVNode as F } from "vue";
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 g, testUtils as f } from "@hua5/hua5-utils";
3
+ import { objectUtils as D, testUtils as m } from "zjh-utils";
4
4
  import { useDynamicList as ae } from "./HuiGridFormHooks.js";
5
- const se = {
5
+ const ie = {
6
6
  key: 0,
7
7
  class: "flex"
8
- }, re = { key: 1 }, ie = {
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(x, { expose: N, emit: R }) {
32
- const q = R, { moveItem: A, removeItem: H } = ae(), i = x, S = w(!1), V = {}, u = w(g.deepClone(i.listData)), d = w(g.deepClone(i.config));
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
- () => i.listData,
35
- (t, o) => {
36
- u.value = t, h();
34
+ () => r.listData,
35
+ (o, t) => {
36
+ u.value = o, k();
37
37
  },
38
38
  { immediate: !0 }
39
39
  ), $(
40
- () => i.config,
41
- (t) => {
42
- d.value = g.deepClone(t), h();
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 t in d.value) {
49
- const o = d.value[t];
50
- V[o.prop] = "";
48
+ for (const o in c.value) {
49
+ const t = c.value[o];
50
+ U[t.prop] = "";
51
51
  }
52
- f.isEmpty(i.listData) && i.isCanAppend && U();
52
+ m.isEmpty(r.listData) && r.isCanAppend && j();
53
53
  });
54
- function U() {
55
- u.value.push(g.deepClone(V));
54
+ function j() {
55
+ u.value.push(D.deepClone(U));
56
56
  }
57
- function j(t, o, n) {
58
- n && A(u.value, t, o);
57
+ function L(o, t, n) {
58
+ n && A(u.value, o, t);
59
59
  }
60
- async function O(t) {
61
- const o = u.value[t];
60
+ async function O(o) {
61
+ const t = u.value[o];
62
62
  let n = !0;
63
- i.isCanDeleteItem && (n = await i.isCanDeleteItem(o, t)), !(!n || !await H(u.value, t)) && (q("onRemoveItem", o), h());
63
+ r.isCanDeleteItem && (n = await r.isCanDeleteItem(t, o)), !(!n || !await H(u.value, o)) && (q("onRemoveItem", t), k());
64
64
  }
65
- function M(t = !0) {
66
- const o = u.value.filter((n) => !L(n));
67
- return t ? (S.value = !0, z(o) ? o : null) : o;
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(t) {
70
- for (const o of t)
71
- for (const n of d.value)
72
- if ((n.required ?? !0) && f.isEmpty(o[n.prop]))
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 L(t) {
77
- return Object.values(t).every((o) => f.isEmpty(o));
76
+ function _(o) {
77
+ return Object.values(o).every((t) => m.isEmpty(t));
78
78
  }
79
- function G(t, o) {
80
- return S.value && f.isEmpty(o[t.prop]) && !L(o) && (t.required ?? !0);
79
+ function G(o, t) {
80
+ return x.value && m.isEmpty(t[o.prop]) && !_(t) && (o.required ?? !0);
81
81
  }
82
- function h() {
83
- const t = {};
84
- for (const o of d.value)
85
- o.type === "select" && (o.reselected || (t[o.prop] = {
86
- configItem: o,
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 o of u.value)
90
- for (const n in o) {
91
- const a = o[n];
92
- if (f.isEmpty(a)) continue;
93
- const e = t[n];
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 o in t) {
97
- const n = t[o], a = n.valueList, e = n.configItem.dict, r = i.config.find((c) => c.prop == o), K = (r == null ? void 0 : r.dict) || [];
98
- for (const c of e) {
99
- const J = a.includes(c.value), D = K.find((Q) => Q.value == c.value);
100
- c.disabled = D == null ? void 0 : D.disabled, c.isUsed = J && !c.disabled;
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(t) {
105
- return !t.some((o) => o.disabled || !o.isUsed);
104
+ function P(o) {
105
+ return !o.some((t) => t.disabled || !t.isUsed);
106
106
  }
107
- return N({ getData: M }), (t, o) => (l(), s(m, null, [
108
- I("div", {
109
- class: _(["flex w-100% hui-grid-form-title", t.gridFromClass]),
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), s(m, null, k(d.value, (n, a) => (l(), s("div", {
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
- }, C(n.title), 5))), 128))
116
+ }, g(n.title), 5))), 128))
117
117
  ], 2),
118
- (l(!0), s(m, null, k(u.value, (n, a) => (l(), s("div", {
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), s(m, null, k(d.value, (e) => (l(), s("div", {
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
- t.$slots[e.prop] ? (l(), s("div", se, [
128
- T(t.$slots, e.prop, E({ ref_for: !0 }, { dataItem: n, el: e, prop: e.prop }), void 0, !0)
129
- ])) : (l(), s("div", re, [
130
- e.type === "select" ? (l(), b(v(te), E({
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": (r) => n[e.prop] = r,
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: h
139
+ onChange: k
140
140
  }), {
141
- default: y(() => [
142
- (l(!0), s(m, null, k(e.dict, (r) => Y((l(), b(v(oe), {
143
- key: r.value,
144
- label: r.label,
145
- value: r.value,
146
- disabled: r.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: y(() => [
149
- T(t.$slots, `${e.prop}-option`, {
150
- option: r,
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, !r.isUsed]
157
+ [Z, !s.isUsed]
158
158
  ])), 128)),
159
- P(e.dict) ? (l(), s("div", ie, o[0] || (o[0] = [
160
- I("div", null, "暂无数据", -1)
161
- ]))) : p("", !0)
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(), b(v(ne), E({
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": (r) => n[e.prop] = r,
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
- v(f).isNotEmpty(e.append) ? {
176
+ y(m).isNotEmpty(e.append) ? {
177
177
  name: "append",
178
- fn: y(() => [
179
- F(C(e.append), 1)
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(), s("div", ue, C(e.errMsg || `请输入${e.title}`), 1)) : p("", !0)
185
+ G(e, n) ? (l(), i("div", ue, g(e.errMsg || `请输入${e.title}`), 1)) : f("", !0)
186
186
  ], 4))), 128)),
187
- t.handSort || t.handDelete ? (l(), s("div", de, [
188
- t.handSort ? (l(), s("i", {
187
+ d.handSort || d.handDelete ? (l(), i("div", de, [
188
+ d.handSort ? (l(), i("i", {
189
189
  key: 0,
190
- class: _([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) => j(a, "down", a !== u.value.length - 1)
192
- }, null, 10, ce)) : p("", !0),
193
- t.handSort ? (l(), s("i", {
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: _([a === 0 ? "!text-[theme(backgroundColor.normal)]" : "", "icon-com i-com-jiantou-shang-shixin text-disabled ml-5 !text-13"]),
196
- onClick: (e) => j(a, "up", a !== 0)
197
- }, null, 10, pe)) : p("", !0),
198
- t.handDelete ? (l(), s("i", {
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)) : p("", !0)
203
- ])) : p("", !0)
202
+ }, null, 8, fe)) : f("", !0)
203
+ ])) : f("", !0)
204
204
  ]))), 128)),
205
- t.isCanAppend ? (l(), b(v(le), {
205
+ d.isCanAppend ? (l(), C(y(le), {
206
206
  key: 0,
207
207
  class: "mt-10",
208
- onClick: U
208
+ onClick: j
209
209
  }, {
210
- icon: y(() => o[1] || (o[1] = [
211
- I("i", { class: "icon-com i-com-jiahao" }, null, -1)
212
- ])),
213
- default: y(() => [
214
- F(C(i.btnText) + " ", 1)
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
- })) : p("", !0)
217
+ })) : f("", !0)
218
218
  ], 64));
219
219
  }
220
220
  });
@@ -1,5 +1,5 @@
1
1
  import { HuiTool as m } from "../../utils/hui-tool/index.js";
2
- import "@hua5/hua5-utils";
2
+ import "zjh-utils";
3
3
  const f = () => {
4
4
  function s(t, e, o) {
5
5
  const n = o === "up" ? e - 1 : e + 1;