@web-utils/form-ui 1.0.0-beta31 → 1.0.0-beta33

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 (106) hide show
  1. package/chunks/{Cc3EJjbV.mjs → 1cDNhlSV.mjs} +2 -2
  2. package/chunks/{C4bM8miy.mjs → A3sHIRQ_.mjs} +2 -3
  3. package/chunks/{Ci1XxmdE.mjs → BLRY0zkF.mjs} +3 -3
  4. package/chunks/{Cby3mvvZ.mjs → BLWwTutr.mjs} +2 -2
  5. package/chunks/{BgDYHgyH.mjs → BTS_zTkz.mjs} +1 -1
  6. package/chunks/BX-cVxlK.mjs +102 -0
  7. package/chunks/BYAy19s4.mjs +113 -0
  8. package/chunks/BmacSnUz.mjs +657 -0
  9. package/chunks/BvsmTC3G.mjs +229 -0
  10. package/chunks/{Dt6gY213.mjs → BwdWZEjT.mjs} +5 -5
  11. package/chunks/{bnRb5PUB.mjs → CGJkMYZ4.mjs} +5 -5
  12. package/chunks/CLn0r4lV.mjs +177 -0
  13. package/chunks/{Cgl-hCE5.mjs → CNskrN5I.mjs} +2 -2
  14. package/chunks/{D1G2MMMx.mjs → CWfUPCtS.mjs} +4 -4
  15. package/chunks/{4ZuVpQf6.mjs → CnAEuI_c.mjs} +1 -1
  16. package/chunks/{Cy-4nmyC.mjs → Cr1vBYne.mjs} +4 -4
  17. package/chunks/{BV_P9a8o.mjs → D5_ctQqL.mjs} +2 -2
  18. package/chunks/{CsfgUCe9.mjs → D7hD-ppq.mjs} +1 -1
  19. package/chunks/DFsI7Y6h.mjs +197 -0
  20. package/chunks/{B99alfW4.mjs → DJKE5P39.mjs} +2 -2
  21. package/chunks/DQKi5eEl.mjs +166 -0
  22. package/chunks/{BmZieBZW.mjs → DQxPzCsy.mjs} +2 -2
  23. package/chunks/DcbnHU8K.mjs +145 -0
  24. package/chunks/{DazglPJZ.mjs → Dgyjc3LT.mjs} +1 -1
  25. package/chunks/{JhyiXnbd.mjs → DistOy_O.mjs} +8 -4
  26. package/chunks/{C44-CFi-.mjs → ZXCLnZFa.mjs} +4 -4
  27. package/chunks/{D1EOkWJ7.mjs → _dm2lLNL.mjs} +2 -2
  28. package/chunks/{CugRu2Ka.mjs → axr9InkL.mjs} +3 -3
  29. package/chunks/{C3a15Ful.mjs → iWQD3xvX.mjs} +2 -2
  30. package/chunks/uYaz9cwr.mjs +336 -0
  31. package/editable-tree/index.d.ts +254 -0
  32. package/editable-tree/index.mjs +2 -0
  33. package/editable-tree/style.css +1 -0
  34. package/element-dialog/index.d.ts +6 -6
  35. package/element-dialog/index.mjs +1 -1
  36. package/form-cascader/index.d.ts +5 -5
  37. package/form-cascader/index.mjs +1 -1
  38. package/form-check-box-group/index.d.ts +78 -7
  39. package/form-check-box-group/index.mjs +1 -1
  40. package/form-check-box-group/style.css +1 -0
  41. package/form-checkbox/index.d.ts +4 -2
  42. package/form-checkbox/index.mjs +1 -1
  43. package/form-date-picker/index.d.ts +63 -11
  44. package/form-date-picker/index.mjs +1 -1
  45. package/form-holder/index.mjs +1 -1
  46. package/form-image/index.mjs +1 -1
  47. package/form-input/index.d.ts +3 -3
  48. package/form-input/index.mjs +1 -1
  49. package/form-input-cron-expression/index.mjs +1 -1
  50. package/form-input-email/index.d.ts +3 -3
  51. package/form-input-email/index.mjs +1 -1
  52. package/form-input-id-card/index.d.ts +3 -3
  53. package/form-input-id-card/index.mjs +1 -1
  54. package/form-input-number/index.d.ts +5 -3
  55. package/form-input-number/index.mjs +1 -1
  56. package/form-input-phone-number/index.d.ts +3 -3
  57. package/form-input-phone-number/index.mjs +1 -1
  58. package/form-item-group/index.d.ts +0 -2
  59. package/form-item-group/index.mjs +1 -1
  60. package/form-item-group/style.css +1 -1
  61. package/form-item-x/index.mjs +1 -1
  62. package/form-item-x/style.css +1 -1
  63. package/form-radio-group/index.d.ts +91 -4
  64. package/form-radio-group/index.mjs +1 -1
  65. package/form-rate/index.mjs +1 -1
  66. package/form-row/index.mjs +1 -1
  67. package/form-select/index.d.ts +82 -10
  68. package/form-select/index.mjs +1 -1
  69. package/form-slider/index.d.ts +2 -2
  70. package/form-slider/index.mjs +1 -1
  71. package/form-switch/index.d.ts +4 -4
  72. package/form-switch/index.mjs +1 -1
  73. package/form-text/index.mjs +1 -1
  74. package/helper/dictionary.mjs +7 -7
  75. package/iframe-window/index.mjs +1 -1
  76. package/index.d.ts +2 -1
  77. package/index.mjs +47 -46
  78. package/month-calendar/index.d.ts +1 -1
  79. package/package.json +1 -1
  80. package/pageable-table/index.d.ts +4 -4
  81. package/pageable-table/index.mjs +1 -1
  82. package/resize-observer/index.mjs +2 -2
  83. package/table-column/index.d.ts +4 -4
  84. package/table-column/index.mjs +1 -1
  85. package/table-column-def/index.mjs +1 -1
  86. package/table-view/index.d.ts +340 -1
  87. package/table-view/index.mjs +452 -6
  88. package/table-view/style.css +1 -0
  89. package/toolbar/index.mjs +1 -1
  90. package/toolbar-button/index.d.ts +136 -24
  91. package/toolbar-button/index.mjs +1 -1
  92. package/vue-cron/index.mjs +1 -1
  93. package/web-types.json +1 -1
  94. package/x-input-tag/index.mjs +1 -1
  95. package/year-calendar/index.mjs +1 -1
  96. package/chunks/BQ77eAb3.mjs +0 -71
  97. package/chunks/Br4i8stg.mjs +0 -222
  98. package/chunks/DO8dVGef.mjs +0 -98
  99. package/chunks/DtAYXPvz.mjs +0 -108
  100. package/chunks/S64sNmuR.mjs +0 -226
  101. package/chunks/dM-icPM8.mjs +0 -107
  102. package/chunks/pxFLMMUm.mjs +0 -110
  103. package/chunks/q1SlJP1y.mjs +0 -171
  104. /package/chunks/{CkFapoKt.mjs → B1MSrc6f.mjs} +0 -0
  105. /package/chunks/{C9J3j0PX.mjs → BW6iY7Q7.mjs} +0 -0
  106. /package/chunks/{BV_N8p9t.mjs → DiE4GJtU.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/CkFapoKt.mjs";
1
+ import { t as e } from "../chunks/B1MSrc6f.mjs";
2
2
  import { isArray as t, isDef as n, isPlainObject as r, scrollIntoView as i } from "@web-utils/core";
3
3
  import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, nextTick as d, normalizeClass as f, openBlock as p, renderList as m, toDisplayString as h, vShow as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
4
4
  import { ElMessage as b, formContextKey as x, formItemContextKey as S } from "element-plus";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/4ZuVpQf6.mjs";
1
+ import { t as e } from "../chunks/CnAEuI_c.mjs";
2
2
  export { e as default };
@@ -1,71 +0,0 @@
1
- import { capitalize as e, copy as t, isArray as n, uncapitalize as r } from "@web-utils/core";
2
- import { computed as i } from "vue";
3
- import { ElMessage as a } from "element-plus";
4
- //#region src/utils/index.ts
5
- var o = (t, n, r, i) => {
6
- let a = {};
7
- if (n) for (let e in t) n(e) && (a[e] = t[e]);
8
- return r && r.forEach((t) => {
9
- a[`on${e(t)}`] = (...e) => i(t, ...e);
10
- }), a;
11
- }, s = (e, { emit: t, events: n, predicate: r }) => i(() => o(e, r, n, t)), c = (e, { withOn: t = !1 } = {}) => {
12
- let n = {};
13
- for (let i in e) i.startsWith("on") && (t ? n[i] = e[i] : n[r(i.replace(/^on/, ""))] = e[i]);
14
- return n;
15
- }, l = (e, t = "id", n = "label") => {
16
- let r = [];
17
- function i(e, a) {
18
- if (!e) return;
19
- let o = [...a, {
20
- [t]: e[t],
21
- [n]: e[n]
22
- }];
23
- if (!e.children || e.children.length === 0) {
24
- r.push(o);
25
- return;
26
- }
27
- e.children.forEach((e) => {
28
- i(e, o);
29
- });
30
- }
31
- return e.forEach((e) => i(e, [])), r;
32
- }, u = (e, t = "id", n = "label") => {
33
- let r = [];
34
- return l(e).forEach((e) => {
35
- let i = [], a = [];
36
- for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
37
- r.push({
38
- value: i.join("/"),
39
- label: a.join("/")
40
- });
41
- }), r;
42
- }, d = (e, t = "id", n = "label") => {
43
- let r = {};
44
- return l(e).forEach((e) => {
45
- let i = [], a = [];
46
- for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
47
- r[i.join("/")] = {
48
- value: i.join("/"),
49
- label: a.join("/")
50
- };
51
- }), r;
52
- };
53
- function f(e) {
54
- t(e, () => a.success({
55
- duration: 1e3,
56
- message: "复制成功!",
57
- type: "success"
58
- }), () => a.error({
59
- duration: 1e3,
60
- message: "复制失败!",
61
- type: "error"
62
- }));
63
- }
64
- var p = (e) => {
65
- let t = [];
66
- return e && (n(e) ? e.forEach((e) => {
67
- n(e) ? t.push(...p(e)) : e && t.push(e);
68
- }) : e && t.push(e)), t;
69
- };
70
- //#endregion
71
- export { d as a, c as i, p as n, u as o, o as r, s, f as t };
@@ -1,222 +0,0 @@
1
- import { r as e } from "./BQ77eAb3.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.ts
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,98 +0,0 @@
1
- import { i as e, n as t } from "./Br4i8stg.mjs";
2
- import { n } from "./CsfgUCe9.mjs";
3
- import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
- import { ElRadio as s, ElRadioButton as c, ElRadioGroup as l } from "element-plus/es";
5
- //#region src/components/form/props/radio-group.ts
6
- var u = {
7
- ...n,
8
- modelValue: [
9
- String,
10
- Number,
11
- Boolean
12
- ],
13
- size: {
14
- type: String,
15
- default: "default"
16
- },
17
- validateEvent: {
18
- type: Boolean,
19
- default: !0
20
- },
21
- textColor: {
22
- type: String,
23
- default: "#ffffff"
24
- },
25
- fill: {
26
- type: String,
27
- default: "#409eff"
28
- },
29
- ariaLabel: String,
30
- name: String,
31
- id: String,
32
- label: String,
33
- options: Array,
34
- props: {
35
- type: Object,
36
- default: () => ({
37
- value: "value",
38
- label: "label",
39
- disabled: "disabled"
40
- })
41
- },
42
- type: {
43
- type: String,
44
- default: "radio"
45
- }
46
- }, d = {
47
- modelValue: !0,
48
- disabled: !0,
49
- type: !0,
50
- options: !0
51
- }, f = ["change"], p = (e) => n[e] === void 0 && d[e] !== !0;
52
- //#endregion
53
- //#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
54
- function m(e) {
55
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
56
- }
57
- //#endregion
58
- //#region src/components/form/FormRadioGroup.vue
59
- var h = {
60
- name: "FormRadioGroup",
61
- inheritAttrs: !1,
62
- props: { ...u },
63
- emits: {
64
- ...t,
65
- change: null
66
- },
67
- setup(t, { emit: n, slots: i, attrs: u }) {
68
- let d = o(t, "modelValue"), { render: h, disabled: g, autoBind: _ } = e(t, {
69
- emit: n,
70
- slots: i,
71
- attrs: u,
72
- events: f,
73
- predicate: p,
74
- messagePrefix: "请选择"
75
- });
76
- return () => h({ vNodes: r(l, a(_.value, {
77
- modelValue: d.value,
78
- "onUpdate:modelValue": (e) => d.value = e,
79
- disabled: g.value
80
- }), {
81
- ...i,
82
- default: i.default || (() => {
83
- var e;
84
- return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: i }) => t.type === "button" ? r(c, {
85
- key: e,
86
- value: e,
87
- disabled: i
88
- }, m(n) ? n : { default: () => [n] }) : r(s, {
89
- key: e,
90
- value: e,
91
- disabled: i
92
- }, m(n) ? n : { default: () => [n] }));
93
- })
94
- }) });
95
- }
96
- };
97
- //#endregion
98
- export { h as t };
@@ -1,108 +0,0 @@
1
- import { i as e, n as t } from "./Br4i8stg.mjs";
2
- import { n } from "./CsfgUCe9.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
- //#region src/components/form/props/checkbox-group.ts
6
- var u = {
7
- ...n,
8
- modelValue: {
9
- type: Array,
10
- default: () => []
11
- },
12
- size: String,
13
- min: Number,
14
- max: Number,
15
- ariaLabel: String,
16
- textColor: {
17
- type: String,
18
- default: "#ffffff"
19
- },
20
- fill: {
21
- type: String,
22
- default: "#409eff"
23
- },
24
- tag: {
25
- type: String,
26
- default: "div"
27
- },
28
- validateEvent: {
29
- type: Boolean,
30
- default: !0
31
- },
32
- label: String,
33
- options: Array,
34
- props: {
35
- type: Object,
36
- default: () => ({
37
- value: "value",
38
- label: "label",
39
- disabled: "disabled"
40
- })
41
- },
42
- type: {
43
- type: String,
44
- default: "checkbox"
45
- },
46
- stringMode: Boolean,
47
- delimiter: {
48
- type: String,
49
- default: ","
50
- }
51
- }, d = {
52
- modelValue: !0,
53
- type: !0,
54
- options: !0
55
- }, f = ["change"], p = (e) => n[e] === void 0 && d[e] !== !0;
56
- //#endregion
57
- //#region src/components/form/FormCheckBoxGroup.vue?vue&type=script&lang.jsx
58
- function m(e) {
59
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
60
- }
61
- //#endregion
62
- //#region src/components/form/FormCheckBoxGroup.vue
63
- var h = {
64
- name: "FormCheckBoxGroup",
65
- inheritAttrs: !1,
66
- props: { ...u },
67
- emits: {
68
- ...t,
69
- change: null
70
- },
71
- setup(t, { emit: n, slots: a, attrs: u }) {
72
- let { emitInput: d, render: h, disabled: g, autoBind: _ } = e(t, {
73
- emit: n,
74
- slots: a,
75
- attrs: u,
76
- events: f,
77
- predicate: p,
78
- messagePrefix: "请选择"
79
- }), v = (e) => d(t.stringMode ? e.join(t.delimiter) : e), y = r(() => {
80
- if (t.stringMode) {
81
- var e;
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
- }
84
- return t.modelValue || [];
85
- });
86
- return () => h({ vNodes: i(l, o(_.value, {
87
- modelValue: y.value,
88
- disabled: g.value,
89
- "onUpdate:modelValue": v
90
- }), {
91
- ...a,
92
- default: a.default || (() => {
93
- var e;
94
- return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" ? i(c, {
95
- key: e,
96
- value: e,
97
- disabled: r
98
- }, m(n) ? n : { default: () => [n] }) : i(s, {
99
- key: e,
100
- value: e,
101
- disabled: r
102
- }, m(n) ? n : { default: () => [n] }));
103
- })
104
- }) });
105
- }
106
- };
107
- //#endregion
108
- export { h as t };