@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
package/api/index.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ export interface DictItem {
2
+ id: string;
3
+ dictId: string;
4
+ label: string;
5
+ dictType: string;
6
+ description: string;
7
+ sortOrder: number;
8
+ createBy: string;
9
+ updateBy: string;
10
+ createTime: string;
11
+ updateTime: string;
12
+ remarks: null;
13
+ delFlag: string;
14
+ value: string;
15
+ }
16
+ export interface ConfigOptions {
17
+ privilege?: {
18
+ processButtons?: (buttons: Array<string | Record<string, string>>) => Array<string | Record<string, boolean>>;
19
+ hasAuthority?: (privilege: string) => boolean;
20
+ };
21
+ dict?: {
22
+ getDictTreeByType?: (type: string, options: {
23
+ idAsValue?: boolean;
24
+ labelAsValue?: boolean;
25
+ }) => Promise<{
26
+ data: {
27
+ data: DictItem[];
28
+ };
29
+ }>;
30
+ remote?: (type: string) => Promise<{
31
+ data: {
32
+ data: DictItem[];
33
+ };
34
+ }>;
35
+ };
36
+ tableView?: {
37
+ reload?: () => void;
38
+ };
39
+ toolbar?: {
40
+ goBack?: (path: string) => void;
41
+ };
42
+ }
43
+ export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
44
+ export declare const hasAuthority: (str: string) => boolean | undefined;
45
+ export declare const goBack: (path: string) => void | undefined;
46
+ export declare const reloadTable: () => void | undefined;
47
+ export declare const getDictTreeByType: (type: string, options: {
48
+ idAsValue?: boolean;
49
+ labelAsValue?: boolean;
50
+ }) => Promise<{
51
+ data: {
52
+ data: DictItem[];
53
+ };
54
+ }> | undefined;
55
+ export declare const remote: (type: string) => Promise<{
56
+ data: {
57
+ data: DictItem[];
58
+ };
59
+ }> | undefined;
60
+ export declare const configComponents: (options: ConfigOptions) => void;
package/api/index.mjs ADDED
@@ -0,0 +1,42 @@
1
+ import { isObject as e, isString as t } from "@web-utils/core";
2
+ import { mergeWith as n } from "@web-utils/integrations/lodash";
3
+ //#region src/api/index.ts
4
+ var r = { privilege: {
5
+ processButtons(n) {
6
+ return n.map((n) => {
7
+ if (e(n)) {
8
+ let e = n, r = {};
9
+ for (let n in e) t(e[n]) && (r[n] = a(e[n]) ?? !0);
10
+ return r;
11
+ }
12
+ return n;
13
+ });
14
+ },
15
+ hasAuthority(e) {
16
+ return !0;
17
+ }
18
+ } }, i = (e) => {
19
+ var t, n;
20
+ return (t = r.privilege) == null || (n = t.processButtons) == null ? void 0 : n.call(t, e);
21
+ }, a = (e) => {
22
+ var t, n;
23
+ return (t = r.privilege) == null || (n = t.hasAuthority) == null ? void 0 : n.call(t, e);
24
+ }, o = (e) => {
25
+ var t, n;
26
+ return (t = r.toolbar) == null || (n = t.goBack) == null ? void 0 : n.call(t, e);
27
+ }, s = () => {
28
+ var e, t;
29
+ return (e = r.tableView) == null || (t = e.reload) == null ? void 0 : t.call(e);
30
+ }, c = (e, t) => {
31
+ var n, i;
32
+ return (n = r.dict) == null || (i = n.getDictTreeByType) == null ? void 0 : i.call(n, e, t);
33
+ }, l = (e) => {
34
+ var t, n;
35
+ return (t = r.dict) == null || (n = t.remote) == null ? void 0 : n.call(t, e);
36
+ }, u = (e) => {
37
+ n(r, e, (e, t) => {
38
+ if (typeof t == "function") return t;
39
+ });
40
+ };
41
+ //#endregion
42
+ export { u as configComponents, c as getDictTreeByType, o as goBack, a as hasAuthority, i as processButtons, s as reloadTable, l as remote };
@@ -0,0 +1,60 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ type: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ size: StringConstructor;
7
+ icon: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ nativeType: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ loading: BooleanConstructor;
16
+ disabled: BooleanConstructor;
17
+ plain: BooleanConstructor;
18
+ autofocus: BooleanConstructor;
19
+ round: BooleanConstructor;
20
+ text: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
25
+ [key: string]: any;
26
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
27
+ type: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ size: StringConstructor;
32
+ icon: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ nativeType: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ loading: BooleanConstructor;
41
+ disabled: BooleanConstructor;
42
+ plain: BooleanConstructor;
43
+ autofocus: BooleanConstructor;
44
+ round: BooleanConstructor;
45
+ text: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ }>> & Readonly<{}>, {
50
+ loading: boolean;
51
+ disabled: boolean;
52
+ plain: boolean;
53
+ autofocus: boolean;
54
+ round: boolean;
55
+ type: string;
56
+ icon: string;
57
+ nativeType: string;
58
+ text: string;
59
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
60
+ export default _default;
@@ -0,0 +1,49 @@
1
+ import { isFunction as e } from "@web-utils/core";
2
+ import { h as t, ref as n, resolveComponent as r } from "vue";
3
+ //#region src/components/button/AwesomeButton.vue
4
+ var i = {
5
+ name: "AwesomeButton",
6
+ inheritAttrs: !1,
7
+ props: {
8
+ type: {
9
+ type: String,
10
+ default: "primary"
11
+ },
12
+ size: String,
13
+ icon: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ nativeType: {
18
+ type: String,
19
+ default: "button"
20
+ },
21
+ loading: Boolean,
22
+ disabled: Boolean,
23
+ plain: Boolean,
24
+ autofocus: Boolean,
25
+ round: Boolean,
26
+ text: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ setup(i, { attrs: a, slots: o }) {
32
+ let s = r("ElButton"), { text: c, ...l } = i, { onClick: u, ...d } = a, f = n(!1), p = async (t) => {
33
+ if (f.value = !0, e(u)) try {
34
+ await u(t);
35
+ } catch (e) {
36
+ console.error(e);
37
+ }
38
+ f.value = !1;
39
+ };
40
+ return () => t(s, {
41
+ ...d,
42
+ ...l,
43
+ disabled: f.value,
44
+ onClick: p
45
+ }, { default: o.default || (() => c) });
46
+ }
47
+ };
48
+ //#endregion
49
+ export { i as default };
@@ -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 { ElText as i } from "element-plus/es";
5
- import { createVNode as a, mergeProps as o } 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, mergeProps as a } from "vue";
5
+ import { ElText as o } from "element-plus/es";
6
6
  //#region src/components/form/props/text.js
7
7
  var s = {
8
8
  ...r,
@@ -32,7 +32,7 @@ var s = {
32
32
  emit: c
33
33
  });
34
34
  return () => n(r, {
35
- vNodes: a(i, o(p.value, d), { default: s.default || (() => r.text) }),
35
+ vNodes: i(o, a(p.value, d), { default: s.default || (() => r.text) }),
36
36
  formItemProps: f,
37
37
  slots: s
38
38
  });
@@ -1,7 +1,7 @@
1
- import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
- import { n } from "./CnsFNU2A.mjs";
3
- import { ElSwitch as r } from "element-plus/es";
4
- import { createVNode as i, mergeProps as a, useModel as o } from "vue";
1
+ import { i as e, n as t } from "./BIm5rmJm.mjs";
2
+ import { n } from "./Cp9FIjnh.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElSwitch as o } from "element-plus/es";
5
5
  //#region src/components/form/props/switch.js
6
6
  var s = {
7
7
  ...n,
@@ -84,13 +84,13 @@ var s = {
84
84
  change: null
85
85
  },
86
86
  setup(t, { emit: n, slots: s, attrs: c }) {
87
- let d = o(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
87
+ let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
88
88
  emit: n,
89
89
  slots: s,
90
90
  events: l,
91
91
  predicate: u
92
92
  });
93
- return () => f({ vNodes: i(r, a(m.value, c, {
93
+ return () => f({ vNodes: r(o, i(m.value, c, {
94
94
  modelValue: d.value,
95
95
  "onUpdate:modelValue": (e) => d.value = e,
96
96
  disabled: p.value
@@ -0,0 +1,222 @@
1
+ import { t as e } from "./BzMaCcUd.mjs";
2
+ import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
3
+ import { computed as i, createVNode as a, h as o, inject as s, mergeProps as c, nextTick as l, unref as u, useTemplateRef as d } from "vue";
4
+ import { ElCol as f, rowContextKey as p } from "element-plus";
5
+ import { ElCol as m, ElFormItem as h, ElTooltip as g } from "element-plus/es";
6
+ //#region src/components/form/props/form-item.js
7
+ var _ = {
8
+ prop: [String, Array],
9
+ label: String,
10
+ labelPosition: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ labelWidth: [String, Number],
15
+ required: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ rules: Object,
20
+ error: String,
21
+ showMessage: {
22
+ type: Boolean,
23
+ default: !0
24
+ },
25
+ inlineMessage: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ size: String,
30
+ for: String,
31
+ validateStatus: String,
32
+ messagePrefix: String,
33
+ message: String,
34
+ wrapCol: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ fixedSpan: Number,
39
+ block: Boolean,
40
+ unwrap: Boolean,
41
+ half: Boolean,
42
+ formItemClass: String,
43
+ hideLabel: Boolean,
44
+ tips: { type: String },
45
+ tipsAfterLabel: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ labelColspan: [Number, String],
50
+ inputColspan: [Number, String],
51
+ labelRowspan: [Number, String],
52
+ inputRowspan: [Number, String]
53
+ }, v = {
54
+ required: !0,
55
+ rules: !0,
56
+ messagePrefix: !0,
57
+ message: !0,
58
+ wrapCol: !0,
59
+ fixedSpan: !0,
60
+ block: !0,
61
+ unwrap: !0,
62
+ half: !0,
63
+ formItemClass: !0,
64
+ hideLabel: !0,
65
+ tips: !0,
66
+ tipsAfterLabel: !0,
67
+ labelColspan: !0,
68
+ inputColspan: !0,
69
+ labelRowspan: !0,
70
+ inputRowspan: !0
71
+ }, y = (e) => _[e] !== void 0 && v[e] !== !0, b = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), x = {
72
+ span: {
73
+ type: Number,
74
+ default: 12
75
+ },
76
+ offset: {
77
+ type: Number,
78
+ default: 0
79
+ },
80
+ push: {
81
+ type: Number,
82
+ default: 0
83
+ },
84
+ pull: {
85
+ type: Number,
86
+ default: 0
87
+ },
88
+ xs: { type: [Number, Object] },
89
+ sm: { type: [Number, Object] },
90
+ md: { type: [Number, Object] },
91
+ lg: { type: [Number, Object] },
92
+ xl: { type: [Number, Object] },
93
+ tag: {
94
+ type: String,
95
+ default: "div"
96
+ }
97
+ }, S = { span: !0 }, C = (e) => x[e] !== void 0 && S[e] !== !0, w = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), T = (e) => {
98
+ let n = s(t, null);
99
+ return i(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
100
+ }, E = (e, { rules: t, attrs: n, messagePrefix: r, message: a } = {}) => {
101
+ let o = T(e);
102
+ return i(() => {
103
+ let i = { message: a }, s = u(t);
104
+ return Object.keys({
105
+ ..._,
106
+ ...x
107
+ }).forEach((t) => {
108
+ t === "rules" ? e[t] && s ? i[t] = [...e[t], ...s] : e[t] ? i[t] = e[t] : s && (i[t] = s) : t === "messagePrefix" ? i[t] = e.messagePrefix || r : i[t] = e[t];
109
+ }), i.required = o.value, i.class = n == null ? void 0 : n.class, i.style = n == null ? void 0 : n.style, i;
110
+ });
111
+ }, D = {
112
+ name: "FormItemX",
113
+ inheritAttrs: !1,
114
+ props: {
115
+ ..._,
116
+ ...x
117
+ },
118
+ setup(e, { attrs: r, slots: o, expose: u }) {
119
+ let f = s(p, null), _ = s(n, null), v = s(t, null), x = r.embed ? i(() => r.disabled) : k(e), S = b(e, { predicate: y }), E = w(e, { predicate: C }), D = i(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && e.fixedSpan === void 0 && !e.half), O = T(e), A = d("formItem"), j = i(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!f && e.wrapCol), M = i(() => v != null && v.tableForm ? "" : _ != null && _.block ? "100%" : e.half && j.value ? `calc(50% - ${f.gutter.value / 2}px)` : ""), N = i(() => (_ == null ? void 0 : _.block) === !0 || e.block || e.half ? 24 : e.span), P = i(() => {
120
+ if (x.value) return [];
121
+ if (O.value) {
122
+ let t = {
123
+ required: !0,
124
+ message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
125
+ };
126
+ return e.rules ? [...e.rules, t] : [t];
127
+ }
128
+ return e.rules;
129
+ });
130
+ return u({
131
+ clearValidate: async () => {
132
+ var e;
133
+ await l(), (e = A.value) == null || e.clearValidate();
134
+ },
135
+ validate: async () => {
136
+ var e;
137
+ await l(), (e = A.value) == null || e.validate();
138
+ }
139
+ }), () => {
140
+ var t;
141
+ let n = o.tips || e.tips, r = n ? a(g, {
142
+ effect: "light",
143
+ content: e.tips,
144
+ offset: 4
145
+ }, {
146
+ default: () => a("i", { class: "el-icon-info form-item-input-info" }, null),
147
+ content: o.tips ? o.tips : null
148
+ }) : null, i = a(h, c(S.value, {
149
+ ref: "formItem",
150
+ style: { width: M.value },
151
+ class: [
152
+ "form-item",
153
+ e.formItemClass,
154
+ {
155
+ "form-item-hide-label": e.hideLabel,
156
+ "with-tips": !e.tipsAfterLabel && n,
157
+ required: x.value === !1 && O.value
158
+ }
159
+ ],
160
+ rules: P.value
161
+ }), {
162
+ ...o,
163
+ default: () => {
164
+ var t;
165
+ return [(t = o.default) == null ? void 0 : t.call(o, {
166
+ disabled: x.value,
167
+ required: O.value
168
+ }), n && !e.tipsAfterLabel ? r : null];
169
+ },
170
+ label: () => [o.label ? o.label() : e.label, e.tipsAfterLabel ? r : null]
171
+ }), s = [i, (t = o.below) == null ? void 0 : t.call(o)];
172
+ return e.unwrap ? s : j.value ? a(m, c(E.value, D.value ? {
173
+ xs: 24,
174
+ sm: 12,
175
+ md: 12,
176
+ lg: 8,
177
+ xl: 6
178
+ } : {}, { span: N.value }), { default: () => s }) : i;
179
+ };
180
+ }
181
+ }, O = "update:modelValue", k = (e) => {
182
+ let n = s(t, null), a = s(r, null);
183
+ return i(() => {
184
+ if (e.disabled !== void 0) return e.disabled;
185
+ if (n) {
186
+ if (n.requiredFieldsMap[e.prop] === !0 || n.enabledFieldsMap[e.prop] === !0) return !1;
187
+ if (n.disabledFieldsMap[e.prop] === !0) return !0;
188
+ }
189
+ return (a == null ? void 0 : a.enabled) === !0 ? !1 : (a == null ? void 0 : a.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
190
+ });
191
+ }, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? o(D, {
192
+ ...n.value,
193
+ embed: !0,
194
+ disabled: i == null ? void 0 : i.value
195
+ }, {
196
+ default: () => t,
197
+ label: r.label,
198
+ error: r.error,
199
+ tips: r.tips,
200
+ below: r.below
201
+ }) : t, N = (t, { emit: n, slots: r, attrs: a, rules: s, events: c, predicate: l, messagePrefix: u = "请输入" }) => {
202
+ let d = k(t), p = i(() => d.value ? "" : `${u}${t.label}`), m = E(t, {
203
+ rules: s,
204
+ attrs: a,
205
+ message: p.value
206
+ }), h = (e) => j(n, e), g = (e) => t.col ? o(f, { span: t.block ? 24 : t.span }, { default: () => e }) : e;
207
+ return {
208
+ emitInput: h,
209
+ render: ({ vNodes: e }) => M(t, {
210
+ vNodes: g(e),
211
+ formItemProps: m,
212
+ slots: r,
213
+ disabled: d
214
+ }),
215
+ placeholder: p,
216
+ disabled: d,
217
+ formItemProps: m,
218
+ autoBind: i(() => e(t, l, c, n))
219
+ };
220
+ }, P = (e) => e.icon ? o("i", { class: e.icon }) : null;
221
+ //#endregion
222
+ export { D as a, _ as c, N as i, A as n, E as o, M as r, x as s, P as t };
@@ -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/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
6
6
  function s(e) {
@@ -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 } from "element-plus/es";
4
- import { createVNode as i, mergeProps as a, useModel as o } from "vue";
1
+ import { i as e, n as t } from "./BIm5rmJm.mjs";
2
+ import { n } from "./Cp9FIjnh.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElCheckbox as o } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox.js
6
6
  var s = {
7
7
  ...n,
@@ -58,14 +58,14 @@ var s = {
58
58
  change: null
59
59
  },
60
60
  setup(t, { emit: n, slots: s, attrs: c }) {
61
- let d = o(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
61
+ let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
62
62
  emit: n,
63
63
  slots: s,
64
64
  attrs: c,
65
65
  events: l,
66
66
  predicate: u
67
67
  });
68
- return () => f({ vNodes: i(r, a(m.value, {
68
+ return () => f({ vNodes: r(o, i(m.value, {
69
69
  modelValue: d.value,
70
70
  "onUpdate:modelValue": (e) => d.value = e,
71
71
  disabled: p.value
@@ -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/FormInputEmail.vue?vue&type=script&lang.jsx
6
6
  function s(e) {
@@ -0,0 +1,53 @@
1
+ import { capitalize as e, uncapitalize as t } from "@web-utils/core";
2
+ import { computed as n } from "vue";
3
+ //#region src/utils/index.js
4
+ var r = (t, n, r, i) => {
5
+ let a = {};
6
+ if (n) for (let e in t) n(e) && (a[e] = t[e]);
7
+ return r && r.forEach((t) => {
8
+ a[`on${e(t)}`] = (...e) => i(t, ...e);
9
+ }), a;
10
+ }, i = (e, { emit: t, events: i, predicate: a }) => n(() => r(e, a, i, t)), a = (e, { withOn: n = !1 } = {}) => {
11
+ let r = {};
12
+ for (let i in e) i.startsWith("on") && (n ? r[i] = e[i] : r[t(i.replace(/^on/, ""))] = e[i]);
13
+ return r;
14
+ }, o = (e, t = "id", n = "label") => {
15
+ let r = [];
16
+ function i(e, a) {
17
+ if (!e) return;
18
+ let o = [...a, {
19
+ [t]: e[t],
20
+ [n]: e[n]
21
+ }];
22
+ if (!e.children || e.children.length === 0) {
23
+ r.push(o);
24
+ return;
25
+ }
26
+ e.children.forEach((e) => {
27
+ i(e, o);
28
+ });
29
+ }
30
+ return e.forEach((e) => i(e, [])), r;
31
+ }, s = (e, t = "id", n = "label") => {
32
+ let r = [];
33
+ return o(e).forEach((e) => {
34
+ let i = [], a = [];
35
+ for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
36
+ r.push({
37
+ value: i.join("/"),
38
+ label: a.join("/")
39
+ });
40
+ }), r;
41
+ }, c = (e, t = "id", n = "label") => {
42
+ let r = {};
43
+ return o(e).forEach((e) => {
44
+ let i = [], a = [];
45
+ for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
46
+ r[i.join("/")] = {
47
+ value: i.join("/"),
48
+ label: a.join("/")
49
+ };
50
+ }), r;
51
+ };
52
+ //#endregion
53
+ export { i as a, s as i, a as n, c as r, r as t };