@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40

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 (189) 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/base.css +1 -0
  6. package/chunks/B1MSrc6f.mjs +8 -0
  7. package/chunks/B3ajWLh3.mjs +198 -0
  8. package/chunks/BH_JJ8Xh.mjs +106 -0
  9. package/chunks/BWBHzD5N.mjs +89 -0
  10. package/chunks/Bd1UFJic.mjs +660 -0
  11. package/chunks/Bm5eiSmT.mjs +79 -0
  12. package/chunks/BsCS7SB5.mjs +141 -0
  13. package/chunks/BufIRDd0.mjs +185 -0
  14. package/chunks/C1AgOUe_.mjs +172 -0
  15. package/chunks/C3Uo82-I.mjs +35 -0
  16. package/chunks/C9dGL28n.mjs +56 -0
  17. package/chunks/CFOGMFgo.mjs +150 -0
  18. package/chunks/CLPSCSsy.mjs +603 -0
  19. package/chunks/CSyJ-vEx.mjs +17 -0
  20. package/chunks/CTKmEf2M.mjs +93 -0
  21. package/chunks/CWfUPCtS.mjs +1360 -0
  22. package/chunks/CXvGoZKJ.mjs +198 -0
  23. package/chunks/Cab-ZjRx.mjs +164 -0
  24. package/chunks/ChmDDqoZ2.mjs +478 -0
  25. package/chunks/Cj59E77g.mjs +230 -0
  26. package/chunks/CqTcEefA.mjs +93 -0
  27. package/chunks/Ct5bDJ50.mjs +38 -0
  28. package/chunks/CuG2Q-PM.mjs +100 -0
  29. package/chunks/D8UVq1t1.mjs +176 -0
  30. package/chunks/DDmQcNm6.mjs +93 -0
  31. package/chunks/DF9fJMQS.mjs +105 -0
  32. package/chunks/DJe97Fgi.mjs +107 -0
  33. package/chunks/DXYgAmil.mjs +317 -0
  34. package/chunks/DhtHh0jk.mjs +87 -0
  35. package/chunks/DiJyms_r.mjs +100 -0
  36. package/chunks/Ds_Tpa_M.mjs +83 -0
  37. package/chunks/TvNHGVAP.mjs +25 -0
  38. package/chunks/XCGWTz41.mjs +25 -0
  39. package/chunks/XqRTtFfp.mjs +166 -0
  40. package/chunks/cmuHpsX6.mjs +109 -0
  41. package/chunks/o6VhYAN52.mjs +207 -0
  42. package/chunks/pdwFQpA8.mjs +57 -0
  43. package/chunks/taicx2sd.mjs +25 -0
  44. package/confirm-button/index.d.ts +113 -0
  45. package/confirm-button/index.mjs +35 -0
  46. package/confirmable/index.d.ts +84 -0
  47. package/confirmable/index.mjs +8 -0
  48. package/constants/index.d.ts +53 -0
  49. package/constants/index.mjs +4 -0
  50. package/editable-tree/index.d.ts +254 -0
  51. package/editable-tree/index.mjs +2 -0
  52. package/editable-tree/style.css +1 -0
  53. package/element-dialog/index.d.ts +337 -16
  54. package/element-dialog/index.mjs +2 -91
  55. package/empty-view/index.d.ts +2 -2
  56. package/empty-view/index.mjs +1 -1
  57. package/flex-scroll-area/index.d.ts +1 -1
  58. package/flex-scroll-area/index.mjs +1 -1
  59. package/form-advice/index.mjs +13 -12
  60. package/form-button/index.d.ts +114 -0
  61. package/form-button/index.mjs +36 -0
  62. package/form-card/index.d.ts +14 -0
  63. package/form-card/index.mjs +18 -0
  64. package/form-cascader/index.d.ts +472 -0
  65. package/form-cascader/index.mjs +2 -0
  66. package/form-check-box-group/index.d.ts +289 -18
  67. package/form-check-box-group/index.mjs +1 -1
  68. package/form-check-box-group/style.css +1 -0
  69. package/form-checkbox/index.d.ts +236 -16
  70. package/form-checkbox/index.mjs +1 -1
  71. package/form-date-picker/index.d.ts +390 -19
  72. package/form-date-picker/index.mjs +1 -1
  73. package/form-holder/index.d.ts +87 -20
  74. package/form-holder/index.mjs +1 -1
  75. package/form-holder/style.css +1 -1
  76. package/form-image/index.d.ts +145 -13
  77. package/form-image/index.mjs +1 -1
  78. package/form-input/index.d.ts +301 -20
  79. package/form-input/index.mjs +1 -1
  80. package/form-input/style.css +1 -0
  81. package/form-input-cron-expression/index.d.ts +217 -0
  82. package/form-input-cron-expression/index.mjs +2 -0
  83. package/form-input-cron-expression/style.css +1 -0
  84. package/form-input-email/index.d.ts +307 -16
  85. package/form-input-email/index.mjs +1 -1
  86. package/form-input-id-card/index.d.ts +307 -16
  87. package/form-input-id-card/index.mjs +1 -1
  88. package/form-input-number/index.d.ts +246 -18
  89. package/form-input-number/index.mjs +1 -1
  90. package/form-input-phone-number/index.d.ts +307 -16
  91. package/form-input-phone-number/index.mjs +1 -1
  92. package/form-input-tag/index.d.ts +263 -1
  93. package/form-input-tag/index.mjs +1 -3
  94. package/form-input-time/index.d.ts +434 -1
  95. package/form-input-time/index.mjs +1 -3
  96. package/form-item-config-provider/index.d.ts +22 -0
  97. package/form-item-config-provider/index.mjs +24 -0
  98. package/form-item-group/index.d.ts +91 -17
  99. package/form-item-group/index.mjs +2 -78
  100. package/form-item-group/style.css +1 -1
  101. package/form-item-x/index.d.ts +141 -11
  102. package/form-item-x/index.mjs +1 -1
  103. package/form-item-x/style.css +1 -0
  104. package/form-radio-group/index.d.ts +303 -16
  105. package/form-radio-group/index.mjs +1 -1
  106. package/form-rate/index.d.ts +254 -14
  107. package/form-rate/index.mjs +1 -1
  108. package/form-red-table/index.mjs +27 -26
  109. package/form-row/index.d.ts +2 -2
  110. package/form-row/index.mjs +1 -1
  111. package/form-select/index.d.ts +537 -18
  112. package/form-select/index.mjs +1 -1
  113. package/form-slider/index.d.ts +283 -16
  114. package/form-slider/index.mjs +1 -1
  115. package/form-switch/index.d.ts +272 -14
  116. package/form-switch/index.mjs +1 -1
  117. package/form-text/index.d.ts +165 -13
  118. package/form-text/index.mjs +1 -1
  119. package/form-textarea/index.d.ts +351 -0
  120. package/form-textarea/index.mjs +2 -0
  121. package/form-time-select/index.d.ts +319 -0
  122. package/form-time-select/index.mjs +2 -0
  123. package/form-view/index.mjs +1 -1
  124. package/helper/dictionary.d.ts +15 -0
  125. package/helper/dictionary.mjs +97 -0
  126. package/hook/useDictionary.d.ts +60 -0
  127. package/hook/useDictionary.mjs +15 -0
  128. package/hook/useVisibilityChange.d.ts +4 -0
  129. package/hook/useVisibilityChange.mjs +14 -0
  130. package/iframe-window/index.d.ts +9 -0
  131. package/iframe-window/index.mjs +37 -0
  132. package/iframe-window/style.css +1 -0
  133. package/index.d.ts +52 -36
  134. package/index.mjs +54 -61
  135. package/package.json +10 -5
  136. package/pageable-table/index.d.ts +398 -0
  137. package/pageable-table/index.mjs +2 -0
  138. package/pageable-table/style.css +1 -0
  139. package/resize-observer/index.d.ts +8 -0
  140. package/resize-observer/index.mjs +40 -0
  141. package/resize-observer/style.css +1 -0
  142. package/resolver/index.mjs +29 -0
  143. package/table-column/index.d.ts +160 -0
  144. package/table-column/index.mjs +2 -0
  145. package/table-column/style.css +1 -0
  146. package/table-column-def/index.d.ts +85 -0
  147. package/table-column-def/index.mjs +11 -0
  148. package/table-view/index.d.ts +340 -1
  149. package/table-view/index.mjs +453 -6
  150. package/table-view/style.css +1 -0
  151. package/toolbar/index.d.ts +128 -1
  152. package/toolbar/index.mjs +1 -8
  153. package/toolbar/style.css +1 -0
  154. package/toolbar-button/index.d.ts +188 -1
  155. package/toolbar-button/index.mjs +1 -8
  156. package/vue-cron/index.d.ts +191 -0
  157. package/vue-cron/index.mjs +2 -0
  158. package/vue-cron/style.css +1 -0
  159. package/web-types.json +1 -1
  160. package/x-input-tag/index.d.ts +2 -0
  161. package/x-input-tag/index.mjs +227 -0
  162. package/x-input-tag/style.css +1 -0
  163. package/year-calendar/index.d.ts +99 -0
  164. package/year-calendar/index.mjs +2 -0
  165. package/year-calendar/style.css +1 -0
  166. package/chunks/B4M_TFeR.mjs +0 -152
  167. package/chunks/B5BIQCcK.mjs +0 -149
  168. package/chunks/BHNKrW1j.mjs +0 -61
  169. package/chunks/BO9jWhBl.mjs +0 -46
  170. package/chunks/BZ8aOa78.mjs +0 -35
  171. package/chunks/Bsz7y4Xp.mjs +0 -73
  172. package/chunks/Bxj372sF.mjs +0 -53
  173. package/chunks/C33EmJN8.mjs +0 -32
  174. package/chunks/C6Li3-l7.mjs +0 -28
  175. package/chunks/CBcdalMX.mjs +0 -35
  176. package/chunks/CdRsyF0n.mjs +0 -43
  177. package/chunks/ClNahmiU.mjs +0 -23
  178. package/chunks/CstztYMu.mjs +0 -28
  179. package/chunks/DC9b53M6.mjs +0 -32
  180. package/chunks/DDVAgRED.mjs +0 -36
  181. package/chunks/DpJQABVD.mjs +0 -91
  182. package/chunks/ZsLNWI9x.mjs +0 -46
  183. package/chunks/jn_iQrVZ.mjs +0 -28
  184. package/constants.d.ts +0 -1
  185. package/constants.mjs +0 -4
  186. package/input/style.css +0 -1
  187. package/resolver.mjs +0 -79
  188. package/utils/style.css +0 -1
  189. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,93 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElSlider as o } from "element-plus/es";
5
+ //#region src/components/form/props/slide.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: [Number, Array],
9
+ min: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ max: {
14
+ type: Number,
15
+ default: 100
16
+ },
17
+ step: [Number, String],
18
+ showInput: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ showInputControls: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ size: {
27
+ type: String,
28
+ default: "default"
29
+ },
30
+ inputSize: {
31
+ type: String,
32
+ default: "default"
33
+ },
34
+ showStops: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ showTooltip: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ formatTooltip: Function,
43
+ range: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ vertical: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ height: String,
52
+ ariaLabel: String,
53
+ rangeStartLabel: String,
54
+ rangeEndLabel: String,
55
+ formatValueText: Function,
56
+ tooltipClass: String,
57
+ placement: {
58
+ type: String,
59
+ default: "top"
60
+ },
61
+ marks: Object,
62
+ validateEvent: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ persistent: {
67
+ type: Boolean,
68
+ default: !0
69
+ }
70
+ }, c = {
71
+ modelValue: !0,
72
+ disabled: !0
73
+ }, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
74
+ name: "FormSlider",
75
+ inheritAttrs: !1,
76
+ props: { ...s },
77
+ emits: { ...t },
78
+ setup(t, { emit: n, slots: s, attrs: c }) {
79
+ let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
80
+ emit: n,
81
+ slots: s,
82
+ predicate: l,
83
+ attrs: c
84
+ });
85
+ return () => d({ vNodes: r(o, i(p.value, m.value, {
86
+ modelValue: u.value,
87
+ "onUpdate:modelValue": (e) => u.value = e,
88
+ disabled: f.value
89
+ }), null) });
90
+ }
91
+ };
92
+ //#endregion
93
+ export { u as t };
@@ -0,0 +1,38 @@
1
+ import { d as e } from "./cmuHpsX6.mjs";
2
+ import { o as t, r as n } from "./Cj59E77g.mjs";
3
+ import { n as r } from "./CSyJ-vEx.mjs";
4
+ import { createVNode as i, mergeProps as a } from "vue";
5
+ import { ElText as o } from "element-plus/es";
6
+ //#region src/components/form/props/text.ts
7
+ var s = {
8
+ ...r,
9
+ type: String,
10
+ size: {
11
+ type: String,
12
+ default: "default"
13
+ },
14
+ truncated: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ lineClamp: [String, Number],
19
+ tag: {
20
+ type: String,
21
+ default: "span"
22
+ },
23
+ text: String
24
+ }, c = { modelValue: !0 }, l = (e) => r[e] === void 0 && c[e] !== !0, u = {
25
+ name: "FormText",
26
+ inheritAttrs: !1,
27
+ props: { ...s },
28
+ setup(r, { slots: s, attrs: c }) {
29
+ let u = t(r, { attrs: c }), d = e(r, l);
30
+ return () => n(r, {
31
+ vNodes: i(o, a(d.value, c), { default: s.default || (() => r.text) }),
32
+ formItemProps: u,
33
+ slots: s
34
+ });
35
+ }
36
+ };
37
+ //#endregion
38
+ export { u as t };
@@ -0,0 +1,100 @@
1
+ import { i as e } from "./cmuHpsX6.mjs";
2
+ import { getDictLabel as t } from "../helper/dictionary.mjs";
3
+ import { tableViewContextKey as n } from "../constants/index.mjs";
4
+ import { t as r } from "./Ds_Tpa_M.mjs";
5
+ import { computed as i, createVNode as a, inject as o, mergeProps as s, ref as c, watchEffect as l } from "vue";
6
+ import { ElTableColumn as u } from "element-plus/es";
7
+ //#endregion
8
+ //#region src/components/table/components/DictRender.vue
9
+ var d = {
10
+ name: "DictRender",
11
+ inheritAttrs: !1,
12
+ props: {
13
+ row: Object,
14
+ column: Object,
15
+ dictType: String,
16
+ options: Array,
17
+ treeDict: Boolean,
18
+ idAsValue: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ labelAsValue: Boolean
23
+ },
24
+ setup(e, { attrs: n }) {
25
+ let r = c(null), o = i(() => e.row[e.column.property]);
26
+ return l(async () => {
27
+ if (e.dictType) r.value = await t(e.dictType, o.value, !0, {
28
+ options: !0,
29
+ treeDict: e.treeDict,
30
+ idAsValue: e.idAsValue,
31
+ labelAsValue: e.labelAsValue
32
+ });
33
+ else {
34
+ var n;
35
+ r.value = ((n = e.options) == null || (n = n.find((e) => `${e.modelValue}` == `${e.value}`)) == null ? void 0 : n.label) ?? `${o.value}`;
36
+ }
37
+ }), () => a("span", n, [r.value]);
38
+ }
39
+ }, f = {
40
+ selection: !0,
41
+ "single-selection": !0,
42
+ index: !0,
43
+ expand: !0
44
+ }, p = (e, t, n, r, i) => {
45
+ var a;
46
+ let o = (e == null || (a = e.$parent) == null ? void 0 : a.rowDbClick) || (e == null ? void 0 : e.rowDbClick);
47
+ o == null || o(t, n, r, i);
48
+ }, m = (e) => {
49
+ let t = e.target;
50
+ for (; t && t.tagName.toUpperCase() !== "HTML";) {
51
+ if (t.tagName.toUpperCase() === "TD") return t;
52
+ t = t.parentNode;
53
+ }
54
+ return null;
55
+ }, h = () => {}, g = (t) => !e(t).length, _ = {
56
+ name: "TableColumn",
57
+ props: { ...r },
58
+ setup(e, { slots: t, attrs: r }) {
59
+ let i = o(n, null);
60
+ return () => {
61
+ let { clickable: n, cellClick: o, ...c } = e, l, _ = f[e.type];
62
+ if (!_) {
63
+ let s = n || r.onClick || o;
64
+ (s || e.dictType || e.options) && (l = (n) => {
65
+ var c;
66
+ let { row: l, column: u } = n, f = s ? (e) => {
67
+ let t = m(e);
68
+ if (r.onClick || o) {
69
+ var n;
70
+ (n = r.onClick) == null || n.call(r, l, u, l, u, t, e), o == null || o(l, u, l, u, t, e);
71
+ } else p(i, l, u, t, e);
72
+ } : h, _ = t == null || (c = t.default) == null ? void 0 : c.call(t, n);
73
+ return g(_) && (_ = null), (e.dictType || e.options) && !_ ? a(d, {
74
+ class: { "is-clickable": s },
75
+ onClick: f,
76
+ row: l,
77
+ column: u,
78
+ dictType: e.dictType,
79
+ treeDict: e.treeDict,
80
+ idAsValue: e.idAsValue,
81
+ labelAsValue: e.labelAsValue,
82
+ options: e.options
83
+ }, null) : s ? a("span", {
84
+ class: "is-clickable",
85
+ onClick: f
86
+ }, [_ || (l == null ? void 0 : l[u == null ? void 0 : u.property])]) : _;
87
+ });
88
+ }
89
+ return a(u, s(c, {
90
+ key: r.filterable,
91
+ showOverflowTooltip: _ ? !1 : c.showOverflowTooltip
92
+ }), {
93
+ ...t,
94
+ default: l || t.default
95
+ });
96
+ };
97
+ }
98
+ };
99
+ //#endregion
100
+ export { _ as t };
@@ -0,0 +1,176 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.mjs";
3
+ import { useDictionary as r } from "../hook/useDictionary.mjs";
4
+ import { t as i } from "./CFOGMFgo.mjs";
5
+ import { computed as a, createVNode as o, defineComponent as s, isVNode as c, mergeProps as l, useModel as u } from "vue";
6
+ import { ElCheckbox as d, ElCheckboxButton as f, ElCheckboxGroup as p } from "element-plus/es";
7
+ //#region src/components/form/props/checkbox-group.ts
8
+ var m = {
9
+ ...n,
10
+ modelValue: {
11
+ type: [Array, String],
12
+ default: () => []
13
+ },
14
+ size: String,
15
+ min: Number,
16
+ max: Number,
17
+ ariaLabel: String,
18
+ textColor: {
19
+ type: String,
20
+ default: "#ffffff"
21
+ },
22
+ fill: {
23
+ type: String,
24
+ default: "#409eff"
25
+ },
26
+ tag: {
27
+ type: String,
28
+ default: "div"
29
+ },
30
+ validateEvent: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ options: {
35
+ type: Array,
36
+ default: () => []
37
+ },
38
+ props: {
39
+ type: Object,
40
+ default: () => ({
41
+ value: "value",
42
+ label: "label",
43
+ disabled: "disabled"
44
+ })
45
+ },
46
+ type: {
47
+ type: String,
48
+ default: "checkbox"
49
+ },
50
+ stringMode: Boolean,
51
+ delimiter: {
52
+ type: String,
53
+ default: ","
54
+ },
55
+ other: [String],
56
+ otherVal: [String],
57
+ otherProp: String,
58
+ otherPlaceholder: String,
59
+ otherLabel: String,
60
+ otherWidth: {
61
+ type: String,
62
+ default: "200px"
63
+ },
64
+ otherMaxLength: String,
65
+ gender: Boolean,
66
+ confirm: Boolean,
67
+ labelProp: {
68
+ type: String,
69
+ default: "name"
70
+ },
71
+ valueProp: {
72
+ type: String,
73
+ default: "code"
74
+ },
75
+ split: Boolean,
76
+ sort: Boolean,
77
+ classic: Boolean,
78
+ fillRow: Boolean,
79
+ ellipsis: Boolean,
80
+ dictType: String
81
+ }, h = {
82
+ modelValue: !0,
83
+ type: !0,
84
+ disabled: !0,
85
+ options: !0
86
+ }, g = (e) => n[e] === void 0 && h[e] !== !0;
87
+ //#endregion
88
+ //#region src/components/form/FormCheckBoxGroup.vue?vue&type=script&lang.jsx
89
+ function _(e) {
90
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
91
+ }
92
+ //#endregion
93
+ //#region src/components/form/FormCheckBoxGroup.vue
94
+ var v = /* @__PURE__ */ s({
95
+ name: "FormCheckBoxGroup",
96
+ inheritAttrs: !1,
97
+ props: { ...m },
98
+ emits: {
99
+ ...t,
100
+ "update:other": null
101
+ },
102
+ setup(t, { emit: n, slots: s, attrs: c }) {
103
+ let m = u(t, "other"), { emitInput: h, render: v, disabled: y, listeners: b, inputProps: x } = e(t, {
104
+ emit: n,
105
+ slots: s,
106
+ attrs: c,
107
+ predicate: g,
108
+ messagePrefix: "请选择",
109
+ class: a(() => ["form-checkbox-group", {
110
+ "form-checkbox-group-row": t.fillRow,
111
+ "form-checkbox-group-row-break-word": t.fillRow,
112
+ "form-checkbox-group-row-ellipsis": t.ellipsis
113
+ }])
114
+ }), S = (e) => {
115
+ let n = e;
116
+ t.sort && (n = e.sort()), t.stringMode || t.split ? h(n.join(",")) : h(n);
117
+ }, C = a(() => {
118
+ if (t.stringMode || t.split) {
119
+ var e;
120
+ return Array.isArray(t.modelValue) ? t.modelValue.filter((e) => e) : ((e = t.modelValue) == null ? void 0 : e.split(t.delimiter).filter((e) => e)) ?? [];
121
+ }
122
+ return t.modelValue || [];
123
+ }), w = a(() => t.classic ? "label" : t.labelProp), T = a(() => t.classic ? "value" : t.valueProp), { dictItems: E } = r(t), D = a(() => t.dictType ? E.value : t.gender ? [{
124
+ [w.value]: "男",
125
+ [T.value]: "男"
126
+ }, {
127
+ [w.value]: "女",
128
+ [T.value]: "女"
129
+ }] : t.confirm ? [{
130
+ [w.value]: "是",
131
+ [T.value]: "是"
132
+ }, {
133
+ [w.value]: "否",
134
+ [T.value]: "否"
135
+ }] : t.options);
136
+ return () => v({ vNodes: [o(p, l(b.value, x.value, {
137
+ modelValue: C.value,
138
+ disabled: y.value,
139
+ "onUpdate:modelValue": S
140
+ }), {
141
+ ...s,
142
+ default: s.default || (() => {
143
+ var e;
144
+ return (e = D.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" ? o(f, {
145
+ key: e,
146
+ value: e,
147
+ disabled: r
148
+ }, _(n) ? n : { default: () => [n] }) : o(d, {
149
+ key: e,
150
+ value: e,
151
+ disabled: r
152
+ }, _(n) ? n : { default: () => [n] }));
153
+ })
154
+ }), C.value.includes(t.otherVal) ? o(i, {
155
+ "wrap-col": !1,
156
+ class: "form-checkbox-group-other",
157
+ "hide-label": !0,
158
+ "label-width": "0",
159
+ prop: t.otherProp,
160
+ disabled: y.value,
161
+ required: !!t.otherProp,
162
+ placeholder: t.otherPlaceholder,
163
+ label: t.otherLabel,
164
+ "show-message": !!t.otherLabel,
165
+ style: t.otherLabel ? { width: t.otherWidth } : {
166
+ marginBottom: 0,
167
+ width: t.otherWidth
168
+ },
169
+ modelValue: m.value,
170
+ "onUpdate:modelValue": (e) => m.value = e,
171
+ "max-length": t.otherMaxLength
172
+ }, null) : null] });
173
+ }
174
+ });
175
+ //#endregion
176
+ export { v as t };
@@ -0,0 +1,93 @@
1
+ import { columnSizeContextKey as e, setColumnSizeContextKey as t } from "../constants/index.mjs";
2
+ import n from "../form-cell/index.mjs";
3
+ import { camelize as r, isDef as i, isString as a } from "@web-utils/core";
4
+ import { Comment as o, Fragment as s, Text as c, createVNode as l, inject as u, isVNode as d } from "vue";
5
+ import { ElTooltip as f } from "element-plus/es";
6
+ //#region src/components/red-form/FormRow.vue?vue&type=script&lang.jsx
7
+ function p(e) {
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
9
+ }
10
+ var m = (e) => {
11
+ let t = Object.keys({});
12
+ for (let n in e) t[r(n)] = e[n];
13
+ return t;
14
+ }, h = (e, { columnSize: t }) => {
15
+ if (!e || !e.length) return null;
16
+ e = e.filter((e) => e.type !== o);
17
+ let n = [], r = e.length === 1;
18
+ for (let o = 0; o < e.length; o++) {
19
+ let v = e[o], { name: y } = v.type;
20
+ if (v.type === c) n.push({
21
+ tag: y,
22
+ type: "text",
23
+ content: v,
24
+ colspan: r ? t : 0
25
+ });
26
+ else if (v.type === s) n.push(...h(v.children, { columnSize: t }));
27
+ else if (a(v.type) && v.type === "td") n.push({
28
+ tag: v.type,
29
+ type: "td",
30
+ content: v
31
+ });
32
+ else if (y === "FormCell") n.push({
33
+ tag: y,
34
+ type: "FormCell",
35
+ content: v
36
+ });
37
+ else if (typeof v.type == "object") {
38
+ var u, d;
39
+ let { label: e, hideLabel: a, labelColspan: o, inputColspan: s, labelRowspan: c, inputRowspan: h, tipsAfterLabel: b, tips: x } = m(v.props);
40
+ if (!i(a)) {
41
+ var p, g, _;
42
+ let t = (p = v.children) == null ? void 0 : p.tips, r = t || x ? l(f, {
43
+ effect: "light",
44
+ content: x,
45
+ offset: 4
46
+ }, {
47
+ default: () => l("i", { class: "el-icon-info form-item-input-info" }, null),
48
+ content: t || null
49
+ }) : null;
50
+ n.push({
51
+ tag: y,
52
+ type: "label",
53
+ colspan: o,
54
+ rowspan: c,
55
+ content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? r : null]
56
+ });
57
+ }
58
+ let S;
59
+ S = r && i(a) ? t : i(s) ? s : r ? t - 1 : 0, n.push({
60
+ tag: y,
61
+ type: "input",
62
+ colspan: S,
63
+ rowspan: h,
64
+ content: [v, (u = v.children) == null || (d = u.below) == null ? void 0 : d.call(u)]
65
+ });
66
+ } else console.error("未知节点");
67
+ }
68
+ return n;
69
+ }, g = {
70
+ name: "FormRow",
71
+ props: {
72
+ isLabel: Boolean,
73
+ alignCenter: Boolean
74
+ },
75
+ setup(r, { slots: i }) {
76
+ let a = u(t, null), o = u(e, null);
77
+ return () => {
78
+ var e;
79
+ let t = (e = i.default) == null ? void 0 : e.call(i), s = [];
80
+ return s.push(...h(t, { columnSize: (o == null ? void 0 : o.value) ?? 0 })), ((o == null ? void 0 : o.value) ?? 0) < s.length && (a == null || a(s.length)), l("tr", null, [s.map(({ tag: e, type: t, colspan: i, rowspan: a, content: o }) => e === "td" || t === "FormCell" ? o : t === "text" ? l(n, {
81
+ isLabel: r.isLabel,
82
+ alignCenter: r.alignCenter,
83
+ colspan: i
84
+ }, p(o) ? o : { default: () => [o] }) : l("td", {
85
+ class: t,
86
+ colspan: i,
87
+ rowspan: a
88
+ }, [o]))]);
89
+ };
90
+ }
91
+ };
92
+ //#endregion
93
+ export { g as t };
@@ -0,0 +1,105 @@
1
+ import { n as e } from "./Cj59E77g.mjs";
2
+ import { n as t, t as n } from "./CSyJ-vEx.mjs";
3
+ import { t as r } from "./CFOGMFgo.mjs";
4
+ import { createVNode as i, isVNode as a, mergeProps as o, useModel as s } from "vue";
5
+ //#region src/components/form/props/textarea.ts
6
+ var c = {
7
+ ...t,
8
+ ...n,
9
+ modelValue: [String, Number],
10
+ modelModifiers: Object,
11
+ maxlength: {
12
+ type: [String, Number],
13
+ default: 800
14
+ },
15
+ minlength: [String, Number],
16
+ showWordLimit: {
17
+ type: Boolean,
18
+ default: !0
19
+ },
20
+ wordLimitPosition: {
21
+ type: String,
22
+ default: "inside"
23
+ },
24
+ placeholder: String,
25
+ clearIcon: [String, Object],
26
+ formatter: Function,
27
+ parser: Function,
28
+ showPassword: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ prefixIcon: [String, Object],
33
+ suffixIcon: [String, Object],
34
+ rows: {
35
+ type: Number,
36
+ default: 4
37
+ },
38
+ autosize: [Boolean, Object],
39
+ autocomplete: {
40
+ type: String,
41
+ default: "off"
42
+ },
43
+ name: String,
44
+ readonly: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ max: [String, Number],
49
+ min: [String, Number],
50
+ step: [String, Number],
51
+ resize: String,
52
+ autofocus: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ form: String,
57
+ ariaLabel: String,
58
+ tabindex: [String, Number],
59
+ validateEvent: {
60
+ type: Boolean,
61
+ default: !0
62
+ },
63
+ inputStyle: [String, Object],
64
+ inputmode: String,
65
+ countGraphemes: Function,
66
+ readonlyGrey: {
67
+ type: Boolean,
68
+ default: !0
69
+ }
70
+ };
71
+ //#endregion
72
+ //#region src/components/form/FormTextarea.vue?vue&type=script&lang.jsx
73
+ function l(e) {
74
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
75
+ }
76
+ //#endregion
77
+ //#region src/components/form/FormTextarea.vue
78
+ var u = {
79
+ name: "FormTextarea",
80
+ inheritAttrs: !1,
81
+ props: {
82
+ ...c,
83
+ maxlength: {
84
+ type: [String, Number],
85
+ default: 800
86
+ },
87
+ block: {
88
+ type: Boolean,
89
+ default: !0
90
+ }
91
+ },
92
+ emits: { ...e },
93
+ setup(e, { slots: t, attrs: n }) {
94
+ let a = s(e, "modelValue");
95
+ return () => i(r, o(e, n, {
96
+ maxlength: e.maxlength,
97
+ block: e.block,
98
+ modelValue: a.value,
99
+ "onUpdate:modelValue": (e) => a.value = e,
100
+ type: "textarea"
101
+ }), l(t) ? t : { default: () => [t] });
102
+ }
103
+ };
104
+ //#endregion
105
+ export { u as t };
@@ -0,0 +1,107 @@
1
+ import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants/index.mjs";
2
+ import n from "../empty-view/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, toRefs as g, useTemplateRef as _, vShow as v, watchEffect as y, withDirectives as b } from "vue";
4
+ import { ElCol as x, ElCollapseTransition as S } from "element-plus";
5
+ import { ElRow as C } from "element-plus/es";
6
+ //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
+ function w(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 T = {
13
+ name: "FormItemGroup",
14
+ props: {
15
+ blockTitle: String,
16
+ tips: String,
17
+ active: Boolean,
18
+ enabled: {
19
+ type: Boolean,
20
+ default: void 0
21
+ },
22
+ disabled: {
23
+ type: Boolean,
24
+ default: void 0
25
+ },
26
+ tag: {
27
+ type: String,
28
+ default: "ElCol"
29
+ },
30
+ span: {
31
+ type: Number,
32
+ default: 24
33
+ },
34
+ block: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ wrapRow: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ gutter: {
43
+ type: Number,
44
+ default: 20
45
+ },
46
+ collapse: Boolean,
47
+ showTitle: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ notDispatch: Boolean
52
+ },
53
+ setup(l, { expose: T, slots: E }) {
54
+ let D = c(t, null), O = _("root"), k = m(!0), A = h(() => l.enabled), j = h(() => l.disabled), M = i(() => l.enabled === !0 ? !1 : l.disabled === !0), N = i(() => l.tag === "ElCol"), P = () => k.value = !k.value, F = p({
55
+ el: h(() => N.value ? O.value.$el : O.value),
56
+ disabled: j,
57
+ enabled: A,
58
+ isDisabled: M,
59
+ open: () => {
60
+ k.value = !0;
61
+ },
62
+ expand: k,
63
+ ...g(l)
64
+ });
65
+ return y(() => {
66
+ k.value = !l.collapse;
67
+ }), f(e, F), d(() => {
68
+ l.notDispatch || D == null || D.addGroup(F);
69
+ }), u(() => {
70
+ l.notDispatch || D == null || D.removeGroup(F);
71
+ }), T(F), () => {
72
+ let e = () => {
73
+ var e;
74
+ return o(r, null, [b(o("div", {
75
+ class: "form-item-group-title",
76
+ onClick: P
77
+ }, [o("span", {
78
+ class: "flex-item",
79
+ style: "flex: 1"
80
+ }, [
81
+ E.title ? E.title() : l.blockTitle,
82
+ E.tips || l.tips ? o("span", { style: "color: #ff0000; font-size: 14px" }, [
83
+ a("("),
84
+ E.tips ? E.tips() : l.tips,
85
+ a(")")
86
+ ]) : null,
87
+ (e = E["title-right"]) == null ? void 0 : e.call(E)
88
+ ]), o("i", { class: k.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[v, l.showTitle]]), o(S, null, { default: () => {
89
+ let e;
90
+ return E.default ? l.wrapRow ? b(o(C, { gutter: l.gutter }, w(e = E.default()) ? e : { default: () => [e] }), [[v, k.value]]) : b(o("div", null, [E.default()]), [[v, k.value]]) : b(o(n, {
91
+ "font-size": "14px",
92
+ "empty-tips": "暂无信息"
93
+ }, null), [[v, k.value]]);
94
+ } })]);
95
+ }, t = {
96
+ ref: "root",
97
+ class: ["form-item-group", {
98
+ "default-active": l.active,
99
+ "is-disabled": M.value
100
+ }]
101
+ };
102
+ return N.value && (t.span = l.block ? 24 : l.span), s(N.value ? x : "div", t, N.value ? e : e());
103
+ };
104
+ }
105
+ };
106
+ //#endregion
107
+ export { T as t };