@web-utils/form-ui 1.0.0-beta21 → 1.0.0-beta23

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 (122) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/chunks/{Bv-Gn_Jd.mjs → 3VI058Yv.mjs} +6 -6
  6. package/chunks/{D4v0MyB_.mjs → B-Y8YSMp.mjs} +6 -6
  7. package/chunks/BIm5rmJm.mjs +222 -0
  8. package/chunks/{CI4RZnNc.mjs → BcMgzZyZ.mjs} +3 -3
  9. package/chunks/{iWlTrkaC.mjs → Bw1QPGNc.mjs} +6 -6
  10. package/chunks/{C4MTLHn4.mjs → BwuQhCIf.mjs} +3 -3
  11. package/chunks/BzMaCcUd.mjs +53 -0
  12. package/chunks/{wfL1FAwc.mjs → C2RhdxHB.mjs} +354 -354
  13. package/chunks/{BI2XOQW3.mjs → CH7m94ce.mjs} +7 -7
  14. package/chunks/{BNpqILFO.mjs → CJv6Sn_v.mjs} +6 -6
  15. package/chunks/{Dq3yxEPg.mjs → Cnmu4eY-.mjs} +1 -1
  16. package/chunks/{BbrVRWUo.mjs → CozfnlhM.mjs} +7 -7
  17. package/chunks/{CnsFNU2A.mjs → Cp9FIjnh.mjs} +1 -1
  18. package/chunks/{1chbbDUh.mjs → CwjQbaXJ.mjs} +15 -15
  19. package/chunks/Cxvr9Z1r.mjs +208 -0
  20. package/chunks/{Bd1I-R29.mjs → D4Pknq4r.mjs} +10 -10
  21. package/chunks/{DGhMkri0.mjs → DBL23JPA.mjs} +6 -6
  22. package/chunks/DETsVUo_.mjs +93 -0
  23. package/chunks/DOl--Hf9.mjs +107 -0
  24. package/chunks/{B5B9au3z.mjs → DP1YukLf.mjs} +25 -25
  25. package/chunks/{DRDj0e_k.mjs → DbBdLuvW.mjs} +8 -8
  26. package/chunks/DpH8CVbN.mjs +79 -0
  27. package/chunks/{5HLN3g1u.mjs → ENc67_lM.mjs} +9 -9
  28. package/chunks/{Dy5-h_Tx.mjs → INlqdzng.mjs} +15 -15
  29. package/chunks/{DOI7ju3i.mjs → dDAvzX4k.mjs} +6 -6
  30. package/chunks/eR-FlUht.mjs +110 -0
  31. package/chunks/{BLpnMrum.mjs → rkRnszQn.mjs} +18 -18
  32. package/chunks/{RcygoTkQ.mjs → tIzKZ11j.mjs} +3 -3
  33. package/chunks/y8u4cMEF.mjs +216 -0
  34. package/confirm-button/index.d.ts +71 -0
  35. package/confirm-button/index.mjs +35 -0
  36. package/confirmable/index.d.ts +42 -0
  37. package/confirmable/index.mjs +8 -0
  38. package/{constants.mjs → constants/index.mjs} +1 -1
  39. package/element-dialog/index.d.ts +5 -5
  40. package/element-dialog/index.mjs +1 -1
  41. package/empty-view/index.d.ts +2 -2
  42. package/empty-view/index.mjs +1 -1
  43. package/flex-scroll-area/index.d.ts +1 -1
  44. package/flex-scroll-area/index.mjs +1 -1
  45. package/form-advice/index.mjs +1 -1
  46. package/form-button/index.d.ts +72 -0
  47. package/form-button/index.mjs +36 -0
  48. package/form-cascader/index.d.ts +483 -1
  49. package/form-cascader/index.mjs +2 -10
  50. package/form-check-box-group/index.d.ts +17 -17
  51. package/form-check-box-group/index.mjs +1 -1
  52. package/form-checkbox/index.d.ts +22 -22
  53. package/form-checkbox/index.mjs +1 -1
  54. package/form-date-picker/index.d.ts +26 -26
  55. package/form-date-picker/index.mjs +1 -1
  56. package/form-holder/index.d.ts +3 -3
  57. package/form-holder/index.mjs +1 -1
  58. package/form-image/index.d.ts +14 -14
  59. package/form-image/index.mjs +1 -1
  60. package/form-input/index.d.ts +19 -19
  61. package/form-input/index.mjs +1 -1
  62. package/form-input-cron-expression/index.d.ts +14 -14
  63. package/form-input-cron-expression/index.mjs +1 -1
  64. package/form-input-email/index.d.ts +18 -18
  65. package/form-input-email/index.mjs +1 -1
  66. package/form-input-id-card/index.d.ts +18 -18
  67. package/form-input-id-card/index.mjs +1 -1
  68. package/form-input-number/index.d.ts +17 -17
  69. package/form-input-number/index.mjs +1 -1
  70. package/form-input-phone-number/index.d.ts +18 -18
  71. package/form-input-phone-number/index.mjs +1 -1
  72. package/form-item-config-provider/index.d.ts +3 -3
  73. package/form-item-config-provider/index.mjs +1 -1
  74. package/form-item-group/index.d.ts +5 -3
  75. package/form-item-group/index.mjs +1 -1
  76. package/form-item-x/index.d.ts +12 -12
  77. package/form-item-x/index.mjs +1 -1
  78. package/form-radio-group/index.d.ts +19 -19
  79. package/form-radio-group/index.mjs +1 -1
  80. package/form-rate/index.d.ts +15 -15
  81. package/form-rate/index.mjs +1 -1
  82. package/form-red-table/index.mjs +13 -13
  83. package/form-row/index.d.ts +2 -2
  84. package/form-row/index.mjs +1 -1
  85. package/form-select/index.d.ts +33 -33
  86. package/form-select/index.mjs +1 -1
  87. package/form-slider/index.d.ts +17 -17
  88. package/form-slider/index.mjs +1 -1
  89. package/form-switch/index.d.ts +23 -23
  90. package/form-switch/index.mjs +1 -1
  91. package/form-text/index.d.ts +15 -15
  92. package/form-text/index.mjs +1 -1
  93. package/helper/dictionary.d.ts +15 -0
  94. package/helper/dictionary.mjs +97 -0
  95. package/hook/useDictionary.d.ts +60 -0
  96. package/hook/useDictionary.mjs +15 -0
  97. package/iframe-window/index.d.ts +9 -0
  98. package/iframe-window/index.mjs +37 -0
  99. package/iframe-window/style.css +1 -0
  100. package/index.d.ts +6 -1
  101. package/index.mjs +45 -40
  102. package/month-calendar/index.d.ts +2 -2
  103. package/month-calendar/index.mjs +1 -1
  104. package/package.json +1 -1
  105. package/{resolver.mjs → resolver/index.mjs} +2 -2
  106. package/toolbar/index.d.ts +128 -1
  107. package/toolbar/index.mjs +1 -8
  108. package/toolbar/style.css +1 -0
  109. package/toolbar-button/index.d.ts +76 -1
  110. package/toolbar-button/index.mjs +1 -8
  111. package/vue-cron/index.d.ts +2 -2
  112. package/vue-cron/index.mjs +1 -1
  113. package/web-types.json +1 -1
  114. package/year-calendar/index.d.ts +2 -2
  115. package/year-calendar/index.mjs +1 -1
  116. package/chunks/Bb43eI1f.mjs +0 -93
  117. package/chunks/Bh_CMUlo.mjs +0 -12
  118. package/chunks/Cw8pz9hK.mjs +0 -222
  119. package/chunks/lTFu0zgR.mjs +0 -106
  120. /package/chunks/{D9GcEl6r.mjs → DJNXk_Cv.mjs} +0 -0
  121. /package/{constants.d.ts → constants/index.d.ts} +0 -0
  122. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- import { n as e } from "./Bh_CMUlo.mjs";
2
- import { ElDialog as t } from "element-plus/es";
3
- import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, getCurrentInstance as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, useTemplateRef as v, withCtx as y, withModifiers as b } from "vue";
1
+ import { a as e } from "./BzMaCcUd.mjs";
2
+ import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, useTemplateRef as _, withCtx as v, withModifiers as y } from "vue";
3
+ import { ElDialog as b } from "element-plus/es";
4
4
  //#region src/components/dialog/props.js
5
5
  var x = {
6
6
  modelValue: {
@@ -110,14 +110,14 @@ var x = {
110
110
  "close-auto-focus"
111
111
  ], w = (e) => S[e] !== !0, T = { class: "dialog-title" }, E = { class: "dialog-header-buttons" }, D = {
112
112
  __name: "ElementDialog",
113
- props: /* @__PURE__ */ l({ ...x }, {
113
+ props: /* @__PURE__ */ c({ ...x }, {
114
114
  modelValue: {
115
115
  type: Boolean,
116
116
  default: !1
117
117
  },
118
118
  modelModifiers: {}
119
119
  }),
120
- emits: /* @__PURE__ */ l({
120
+ emits: /* @__PURE__ */ c({
121
121
  open: null,
122
122
  opened: null,
123
123
  close: null,
@@ -126,47 +126,47 @@ var x = {
126
126
  "close-auto-focus": null,
127
127
  "toggle-fullscreen": null
128
128
  }, ["update:modelValue"]),
129
- setup(l, { expose: x, emit: S }) {
130
- let D = _(l, "modelValue"), O = l, k = S, A = e(O, {
129
+ setup(c, { expose: x, emit: S }) {
130
+ let D = g(c, "modelValue"), O = c, k = S, A = e(O, {
131
131
  emit: k,
132
132
  events: C,
133
133
  predicate: w
134
- }), j = v("dialog"), M = p(O.fullscreen), N = () => {
134
+ }), j = _("dialog"), M = f(O.fullscreen), N = () => {
135
135
  M.value = !M.value, k("toggle-fullscreen", M.value);
136
- }, P = n(() => M.value ? "100%" : O.height), F = c(), I = () => {
136
+ }, P = t(() => M.value ? "100%" : O.height), F = s(), I = () => {
137
137
  O.embed ? (F.parent.emit("update:visible", !1), F.parent.emit("update:modelValue", !1)) : j.value.handleClose();
138
138
  };
139
139
  return x({
140
140
  close: I,
141
141
  hide: I
142
- }), (e, n) => {
143
- let c = t;
144
- return f(), r(c, u({
142
+ }), (e, t) => {
143
+ let s = b;
144
+ return d(), n(s, l({
145
145
  ref: "dialog",
146
146
  modelValue: D.value,
147
- "onUpdate:modelValue": n[0] || (n[0] = (e) => D.value = e)
148
- }, g(A), {
147
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => D.value = e)
148
+ }, h(A), {
149
149
  "show-close": !1,
150
- fullscreen: g(M),
151
- style: { "--dialog-body-height": g(P) }
152
- }), s({
153
- header: y(() => [i(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), m(e.$slots, "header", {}, () => [o("div", T, h(e.title), 1), o("div", E, [e.showFullscreen || e.showFullScreen ? (f(), a("i", {
150
+ fullscreen: h(M),
151
+ style: { "--dialog-body-height": h(P) }
152
+ }), o({
153
+ header: v(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
154
154
  key: 0,
155
- class: d(["dialog-header-button", {
155
+ class: u(["dialog-header-button", {
156
156
  "el-icon-full-screen": !e.fullscreen,
157
157
  "el-icon-copy-document": e.fullscreen
158
158
  }]),
159
- onClick: b(N, ["stop"])
160
- }, null, 2)) : i("v-if", !0), e.showClose ? (f(), a("i", {
159
+ onClick: y(N, ["stop"])
160
+ }, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
161
161
  key: 1,
162
162
  class: "dialog-header-button el-icon-close",
163
- onClick: b(I, ["stop"])
164
- })) : i("v-if", !0)])])]),
165
- default: y(() => [i(" @slot 对话框的默认内容 "), m(e.$slots, "default")]),
163
+ onClick: y(I, ["stop"])
164
+ })) : r("v-if", !0)])])]),
165
+ default: v(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
166
166
  _: 2
167
167
  }, [e.$slots.footer ? {
168
168
  name: "footer",
169
- fn: y(() => [i(" @slot Dialog 按钮操作区的内容 "), m(e.$slots, "footer", { close: I })]),
169
+ fn: v(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: I })]),
170
170
  key: "0"
171
171
  } : void 0]), 1040, [
172
172
  "modelValue",
@@ -1,7 +1,7 @@
1
- import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
- import { n } from "./CnsFNU2A.mjs";
3
- import { ElDatePicker as r } from "element-plus/es";
4
- import { computed as i, createVNode as a, mergeProps as o } from "vue";
1
+ import { i as e, n as t } from "./BIm5rmJm.mjs";
2
+ import { n } from "./Cp9FIjnh.mjs";
3
+ import { computed as r, createVNode as i, mergeProps as a } from "vue";
4
+ import { ElDatePicker as o } from "element-plus/es";
5
5
  //#region src/components/form/props/date.js
6
6
  var s = {
7
7
  ...n,
@@ -137,7 +137,7 @@ var s = {
137
137
  events: l,
138
138
  predicate: u,
139
139
  messagePrefix: "请选择"
140
- }), g = i(() => {
140
+ }), g = r(() => {
141
141
  switch (t.type) {
142
142
  case "date":
143
143
  case "daterange": return "YYYY-MM-DD";
@@ -145,12 +145,12 @@ var s = {
145
145
  case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
146
146
  default: return "";
147
147
  }
148
- }), _ = i(() => t.split && t.type.indexOf("range") > -1), v = (e, t) => {
148
+ }), _ = r(() => t.split && t.type.indexOf("range") > -1), v = (e, t) => {
149
149
  n("update:startDate", e), n("update:endDate", t);
150
150
  }, y = (e) => {
151
151
  _.value ? e ? v(e[0], e[1]) : v(null, null) : d(e);
152
- }, b = i(() => _.value ? [t.startDate, t.endDate] : t.modelValue);
153
- return () => f({ vNodes: a(r, o({ style: "width: 100%" }, h.value, {
152
+ }, b = r(() => _.value ? [t.startDate, t.endDate] : t.modelValue);
153
+ return () => f({ vNodes: i(o, a({ style: "width: 100%" }, h.value, {
154
154
  modelValue: b.value,
155
155
  disabled: m.value,
156
156
  placeholder: p.value,
@@ -0,0 +1,79 @@
1
+ import { isFunction as e } from "@web-utils/core";
2
+ import { h as t, resolveComponent as n } from "vue";
3
+ import { ElLoading as r, ElMessageBox as i } from "element-plus";
4
+ //#region src/components/button/confirmable-mixin.js
5
+ async function a(t, n, a) {
6
+ let { stop: o, prevent: s, message: c, loadable: l, loadingText: u, confirmable: d, confirmType: f, confirmText: p, confirmTitle: m } = n;
7
+ o && t.stopPropagation(), s && t.preventDefault();
8
+ let { onBefore: h, onClick: g, onCancel: _, onAfter: v } = a;
9
+ if (e(g)) try {
10
+ let n = !0;
11
+ if (e(h) && (n = await h(t)), n === !1) return;
12
+ d && await i.confirm(c || p, {
13
+ type: f,
14
+ title: m
15
+ });
16
+ let a;
17
+ l && (a = r.service({
18
+ background: "rgba(0,0,0,0.3)",
19
+ text: u
20
+ }));
21
+ let o;
22
+ try {
23
+ o = await g(t);
24
+ } catch {}
25
+ l && a.close(), e(v) && await v(t, o);
26
+ } catch (t) {
27
+ e(_) && await _(t);
28
+ }
29
+ }
30
+ var o = {
31
+ inheritAttrs: !1,
32
+ props: {
33
+ stop: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ prevent: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ text: {
42
+ type: String,
43
+ default: ""
44
+ },
45
+ message: String,
46
+ confirmable: {
47
+ type: Boolean,
48
+ default: !0
49
+ },
50
+ confirmText: {
51
+ type: String,
52
+ default: "你确定要删除该记录吗?"
53
+ },
54
+ confirmType: {
55
+ type: String,
56
+ default: "warning"
57
+ },
58
+ confirmTitle: String,
59
+ loadable: Boolean,
60
+ loadingText: {
61
+ type: String,
62
+ default: "正在处理中请稍候..."
63
+ },
64
+ tag: {
65
+ type: String,
66
+ default: "i"
67
+ }
68
+ },
69
+ render() {
70
+ let e = n(this.tag), { text: r, ...i } = this.$props, { onClick: o, ...s } = this.$attrs;
71
+ return t(e, {
72
+ ...s,
73
+ ...i,
74
+ onClick: (e) => a(e, this.$props, this.$attrs)
75
+ }, { default: this.$slots.default || (() => r) });
76
+ }
77
+ };
78
+ //#endregion
79
+ export { o as t };
@@ -1,8 +1,8 @@
1
- import { n as e } from "./Bh_CMUlo.mjs";
2
- import { o as t, r as n } from "./Cw8pz9hK.mjs";
3
- import { n as r } from "./CnsFNU2A.mjs";
4
- import { ElImage as i } from "element-plus/es";
5
- import { createVNode as a, isVNode as o, mergeProps as s } from "vue";
1
+ import { a as e } from "./BzMaCcUd.mjs";
2
+ import { o as t, r as n } from "./BIm5rmJm.mjs";
3
+ import { n as r } from "./Cp9FIjnh.mjs";
4
+ import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
+ import { ElImage as s } from "element-plus/es";
6
6
  //#region src/components/form/props/image.js
7
7
  var c = {
8
8
  ...r,
@@ -19,7 +19,7 @@ var c = {
19
19
  //#endregion
20
20
  //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
21
21
  function f(e) {
22
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
22
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
23
23
  }
24
24
  //#endregion
25
25
  //#region src/components/form/FormImage.vue
@@ -34,16 +34,16 @@ var p = {
34
34
  close: null,
35
35
  show: null
36
36
  },
37
- setup(r, { slots: o, attrs: c, emit: l }) {
37
+ setup(r, { slots: a, attrs: c, emit: l }) {
38
38
  let p = t(r, { attrs: c }), m = e(r, {
39
39
  events: u,
40
40
  predicate: d,
41
41
  emit: l
42
42
  });
43
43
  return () => n(r, {
44
- vNodes: a(i, s(m.value, c, { "preview-src-list": [r.src] }), f(o) ? o : { default: () => [o] }),
44
+ vNodes: i(s, o(m.value, c, { "preview-src-list": [r.src] }), f(a) ? a : { default: () => [a] }),
45
45
  formItemProps: p,
46
- slots: o
46
+ slots: a
47
47
  });
48
48
  }
49
49
  };
@@ -1,7 +1,7 @@
1
- import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
- import { n } from "./CnsFNU2A.mjs";
3
- import { ElCheckbox as r, ElCheckboxButton as i, ElCheckboxGroup as a } from "element-plus/es";
4
- import { computed as o, createVNode as s, isVNode as c, mergeProps as l } from "vue";
1
+ import { i as e, n as t } from "./BIm5rmJm.mjs";
2
+ import { n } from "./Cp9FIjnh.mjs";
3
+ import { computed as r, createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
+ import { ElCheckbox as s, ElCheckboxButton as c, ElCheckboxGroup as l } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox-group.js
6
6
  var u = {
7
7
  ...n,
@@ -56,7 +56,7 @@ var u = {
56
56
  //#endregion
57
57
  //#region src/components/form/FormCheckBoxGroup.vue?vue&type=script&lang.jsx
58
58
  function m(e) {
59
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
59
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
60
60
  }
61
61
  //#endregion
62
62
  //#region src/components/form/FormCheckBoxGroup.vue
@@ -68,37 +68,37 @@ var h = {
68
68
  ...t,
69
69
  change: null
70
70
  },
71
- setup(t, { emit: n, slots: c, attrs: u }) {
71
+ setup(t, { emit: n, slots: a, attrs: u }) {
72
72
  let { emitInput: d, render: h, disabled: g, autoBind: _ } = e(t, {
73
73
  emit: n,
74
- slots: c,
74
+ slots: a,
75
75
  attrs: u,
76
76
  events: f,
77
77
  predicate: p,
78
78
  messagePrefix: "请选择"
79
- }), v = (e) => d(t.stringMode ? e.join(t.delimiter) : e), y = o(() => {
79
+ }), v = (e) => d(t.stringMode ? e.join(t.delimiter) : e), y = r(() => {
80
80
  if (t.stringMode) {
81
81
  var e;
82
82
  return Array.isArray(t.modelValue) ? t.modelValue.filter((e) => e) : ((e = t.modelValue) == null ? void 0 : e.split(t.delimiter).filter((e) => e)) ?? [];
83
83
  }
84
84
  return t.modelValue || [];
85
85
  });
86
- return () => h({ vNodes: s(a, l(_.value, {
86
+ return () => h({ vNodes: i(l, o(_.value, {
87
87
  modelValue: y.value,
88
88
  disabled: g.value,
89
89
  "onUpdate:modelValue": v
90
90
  }), {
91
- ...c,
92
- default: c.default || (() => {
91
+ ...a,
92
+ default: a.default || (() => {
93
93
  var e;
94
- return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: a }) => t.type === "button" ? s(i, {
94
+ return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" ? i(c, {
95
95
  key: e,
96
96
  value: e,
97
- disabled: a
98
- }, m(n) ? n : { default: () => [n] }) : s(r, {
97
+ disabled: r
98
+ }, m(n) ? n : { default: () => [n] }) : i(s, {
99
99
  key: e,
100
100
  value: e,
101
- disabled: a
101
+ disabled: r
102
102
  }, m(n) ? n : { default: () => [n] }));
103
103
  })
104
104
  }) });
@@ -1,8 +1,8 @@
1
- import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
- import { n, t as r } from "./CnsFNU2A.mjs";
3
- import { ElInputNumber as i } from "element-plus/es";
1
+ import { i as e, n as t } from "./BIm5rmJm.mjs";
2
+ import { n, t as r } from "./Cp9FIjnh.mjs";
3
+ import { isString as i } from "@web-utils/core";
4
4
  import { computed as a, createVNode as o, mergeProps as s } from "vue";
5
- import { isString as c } from "@web-utils/core";
5
+ import { ElInputNumber as c } from "element-plus/es";
6
6
  //#region src/components/form/props/input-number.js
7
7
  var l = {
8
8
  ...n,
@@ -90,8 +90,8 @@ var l = {
90
90
  attrs: l,
91
91
  events: d,
92
92
  predicate: f
93
- }), _ = a(() => c(t.modelValue) ? Number(t.modelValue) : t.modelValue);
94
- return () => p({ vNodes: o(i, s({ style: "width: 100%" }, g.value, {
93
+ }), _ = a(() => i(t.modelValue) ? Number(t.modelValue) : t.modelValue);
94
+ return () => p({ vNodes: o(c, s({ style: "width: 100%" }, g.value, {
95
95
  modelValue: _.value,
96
96
  disabled: h.value,
97
97
  "onUpdate:modelValue": u,
@@ -0,0 +1,110 @@
1
+ import e from "../empty-view/index.mjs";
2
+ import { formItemGroupContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
3
+ import { Fragment as r, computed as i, createTextVNode as a, createVNode as o, h as s, inject as c, isVNode as l, onBeforeUnmount as u, onMounted as d, provide as f, reactive as p, ref as m, toRef as h, useTemplateRef as g, vShow as _, watchEffect as v, withDirectives as y } from "vue";
4
+ import { ElCol as b, ElCollapseTransition as x } from "element-plus";
5
+ import { ElRow as S } from "element-plus/es";
6
+ //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
+ function C(e) {
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
9
+ }
10
+ //#endregion
11
+ //#region src/components/form/FormItemGroup.vue
12
+ var w = {
13
+ name: "FormItemGroup",
14
+ props: {
15
+ blockTitle: String,
16
+ size: String,
17
+ tips: String,
18
+ active: Boolean,
19
+ enabled: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ tag: {
28
+ type: String,
29
+ default: "ElCol"
30
+ },
31
+ span: {
32
+ type: Number,
33
+ default: 24
34
+ },
35
+ block: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ wrapRow: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ gutter: {
44
+ type: Number,
45
+ default: 20
46
+ },
47
+ collapse: Boolean,
48
+ showTitle: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ notDispatch: Boolean
53
+ },
54
+ setup(l, { expose: w, slots: T }) {
55
+ let E = c(n, null), D = g("root"), O = m(!0), k = h(() => l.enabled), A = h(() => l.disabled), j = i(() => l.enabled === !0 ? !1 : l.disabled === !0), M = i(() => l.tag === "ElCol"), N = () => O.value = !O.value, P = p({
56
+ el: i(() => M.value ? D.value.$el : D.value),
57
+ disabled: A,
58
+ enabled: k,
59
+ isDisabled: j,
60
+ size: h(() => l.size)
61
+ });
62
+ return v(() => {
63
+ O.value = !l.collapse;
64
+ }), f(t, P), d(() => {
65
+ if (!l.notDispatch) {
66
+ var e;
67
+ E == null || (e = E.addGroup) == null || e.call(E, this);
68
+ }
69
+ }), u(() => {
70
+ if (!l.notDispatch) {
71
+ var e;
72
+ E == null || (e = E.removeGroup) == null || e.call(E, this);
73
+ }
74
+ }), w(P), () => {
75
+ let t = () => {
76
+ var t;
77
+ return o(r, null, [y(o("div", {
78
+ class: "form-item-group-title",
79
+ onClick: N
80
+ }, [o("span", {
81
+ class: "flex-item",
82
+ style: "flex: 1"
83
+ }, [
84
+ T.title ? T.title() : l.blockTitle,
85
+ T.tips || l.tips ? o("span", { style: "color: #ff0000; font-size: 14px" }, [
86
+ a("("),
87
+ T.tips ? T.tips() : l.tips,
88
+ a(")")
89
+ ]) : null,
90
+ (t = T["title-right"]) == null ? void 0 : t.call(T)
91
+ ]), o("i", { class: O.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[_, l.showTitle]]), o(x, null, { default: () => {
92
+ let t;
93
+ return T.default ? l.wrapRow ? y(o(S, { gutter: l.gutter }, C(t = T.default()) ? t : { default: () => [t] }), [[_, O.value]]) : y(o("div", null, [T.default()]), [[_, O.value]]) : y(o(e, {
94
+ "font-size": "14px",
95
+ "empty-tips": "暂无信息"
96
+ }, null), [[_, O.value]]);
97
+ } })]);
98
+ }, n = {
99
+ ref: "root",
100
+ class: ["form-item-group", {
101
+ "default-active": l.active,
102
+ "is-disabled": j.value
103
+ }]
104
+ };
105
+ return M.value && (n.span = l.block ? 24 : l.span), s(M.value ? b : "div", n, M.value ? t : t());
106
+ };
107
+ }
108
+ };
109
+ //#endregion
110
+ export { w as t };
@@ -1,10 +1,10 @@
1
- import { formHolderContextKey as e, formViewContextKey as t } from "../constants.mjs";
2
- import { n } from "./Bh_CMUlo.mjs";
1
+ import { a as e } from "./BzMaCcUd.mjs";
2
+ import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
3
3
  import r from "../form-advice/index.mjs";
4
4
  import i from "../form-red-table/index.mjs";
5
- import { ElForm as a, ElRow as o } from "element-plus/es";
6
- import { computed as s, createVNode as c, inject as l, mergeProps as u, nextTick as d, provide as f, reactive as p, toRef as m, useTemplateRef as h } from "vue";
7
- import { animate as g } from "@web-utils/core";
5
+ import { animate as a } from "@web-utils/core";
6
+ import { computed as o, createVNode as s, inject as c, mergeProps as l, nextTick as u, provide as d, reactive as f, toRef as p, useTemplateRef as m } from "vue";
7
+ import { ElForm as h, ElRow as g } from "element-plus/es";
8
8
  //#region src/components/form/props/form.js
9
9
  var _ = {
10
10
  model: Object,
@@ -97,34 +97,34 @@ var _ = {
97
97
  props: { ..._ },
98
98
  emits: { validate: null },
99
99
  setup(_, { slots: v, expose: x, emit: S }) {
100
- let C = n(_, {
100
+ let C = e(_, {
101
101
  emit: S,
102
102
  events: y,
103
103
  predicate: b
104
- }), w = l(t, null), T = h("form"), E = s(() => _.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !_.notTableForm), D = s(() => E.value ? !1 : _.showMessage), O = s(() => {
104
+ }), w = c(n, null), T = m("form"), E = o(() => _.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !_.notTableForm), D = o(() => E.value ? !1 : _.showMessage), O = o(() => {
105
105
  let e = {};
106
106
  return _.disabledFields && _.disabledFields.forEach((t) => {
107
107
  e[t] = !0;
108
108
  }), e;
109
- }), k = s(() => {
109
+ }), k = o(() => {
110
110
  let e = {};
111
111
  return _.enabledFields && _.enabledFields.length && _.enabledFields.forEach((t) => {
112
112
  e[t] = !0;
113
113
  }), e;
114
- }), A = s(() => {
114
+ }), A = o(() => {
115
115
  let e = {};
116
116
  return _.requiredFields && _.requiredFields.length && _.requiredFields.forEach((t) => {
117
117
  e[t] = !0;
118
118
  }), e;
119
- }), j = s(() => _.disabled === !0 ? !0 : _.disabled), M = m(() => _.enabledFields), N = m(() => _.requiredFields), P = m(() => _.disabledFields), F = async () => {
120
- await d();
119
+ }), j = o(() => _.disabled === !0 ? !0 : _.disabled), M = p(() => _.enabledFields), N = p(() => _.requiredFields), P = p(() => _.disabledFields), F = async () => {
120
+ await u();
121
121
  let e = T.value.$el.querySelector(".el-form-item.is-error");
122
122
  e && e.scrollIntoView({
123
123
  block: "center",
124
124
  inline: "center",
125
125
  behavior: "smooth"
126
126
  });
127
- }, I = p({
127
+ }, I = f({
128
128
  tableForm: E,
129
129
  disabled: j,
130
130
  enabledFields: M,
@@ -140,7 +140,7 @@ var _ = {
140
140
  return await T.value.validate();
141
141
  } catch {
142
142
  throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
143
- g(e, "breathe-animation");
143
+ a(e, "breathe-animation");
144
144
  }), Error("表单验证不通过!");
145
145
  }
146
146
  },
@@ -152,7 +152,7 @@ var _ = {
152
152
  setInitialValues: (e) => T.value.setInitialValues(e),
153
153
  getFields: () => T.value.fields
154
154
  });
155
- return f(e, I), x(I), () => c(a, u({
155
+ return d(t, I), x(I), () => s(h, l({
156
156
  ref: "form",
157
157
  class: "form-holder",
158
158
  "show-message": D.value
@@ -161,23 +161,23 @@ var _ = {
161
161
  var e, t, n;
162
162
  return [
163
163
  (e = v.top) == null ? void 0 : e.call(v),
164
- c(i, {
164
+ s(i, {
165
165
  class: { "hide-error-message": E.value },
166
166
  columns: _.columns,
167
167
  "col-count": _.colCount
168
168
  }, { default: () => {
169
169
  var e;
170
- return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ? c(r, {
170
+ return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ? s(r, {
171
171
  "label-colspan": _.commentLabelColspan,
172
172
  "value-colspan": _.commentValueColspan
173
173
  }, null) : null];
174
174
  } }),
175
175
  (t = v.bottom) == null ? void 0 : t.call(v),
176
- c("div", { class: "red-form-footer" }, [(n = v.footer) == null ? void 0 : n.call(v)])
176
+ s("div", { class: "red-form-footer" }, [(n = v.footer) == null ? void 0 : n.call(v)])
177
177
  ];
178
178
  } else {
179
179
  var a;
180
- return _.wrapRow ? c(o, null, { default: () => {
180
+ return _.wrapRow ? s(g, null, { default: () => {
181
181
  var e;
182
182
  return [(e = v.default) == null ? void 0 : e.call(v)];
183
183
  } }) : (a = v.default) == null ? void 0 : a.call(v);
@@ -1,6 +1,6 @@
1
- import { n as e } from "./Cw8pz9hK.mjs";
2
- import { t } from "./BbrVRWUo.mjs";
3
- import { t as n } from "./Dq3yxEPg.mjs";
1
+ import { n as e } from "./BIm5rmJm.mjs";
2
+ import { t } from "./CozfnlhM.mjs";
3
+ import { t as n } from "./Cnmu4eY-.mjs";
4
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
5
  //#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
6
6
  function s(e) {