wyfe-ivue 0.3.0 → 0.5.0
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.
- package/dist/{InlineForm-DzG4QBER.js → InlineForm-CJgRTO8w.js} +12 -12
- package/dist/{RecTableColumn-B_ZeDJ-N.js → RecTableColumn--TL4ZAq5.js} +2 -2
- package/dist/{RowForm-DjTOMs9y.js → RowForm-sni-NX8u.js} +43 -42
- package/dist/{Selection-B4K-p6l0.js → Selection-BqmTkjpI.js} +2 -2
- package/dist/{Span-CgaVCUFy.js → Span-r-IKXZvi.js} +1 -1
- package/dist/{el-radio-DyCRdSzQ.js → el-radio-DgLOuieg.js} +46 -46
- package/dist/{index-D77QQPIg.js → index-Bi7nW-sZ.js} +3170 -3009
- package/dist/index.es.js +10 -3
- package/dist/index.umd.js +4 -4
- package/dist/types/index.d.ts +158 -3
- package/dist/{el-select-v2-uZkd8EYF.js → useFormHook-BVZ_gZcT.js} +1675 -1632
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as I,
|
|
2
|
-
import { E as Q, a as L, b as R, c as W } from "./
|
|
3
|
-
import { defineComponent as q, computed as z, onMounted as A, createElementBlock as
|
|
1
|
+
import { c as I, E as S, f as U, e as K } from "./index-Bi7nW-sZ.js";
|
|
2
|
+
import { u as N, E as Q, a as L, b as R, c as W } from "./useFormHook-BVZ_gZcT.js";
|
|
3
|
+
import { defineComponent as q, computed as z, onMounted as A, createElementBlock as C, openBlock as t, normalizeStyle as a, createVNode as f, createElementVNode as D, withModifiers as H, withCtx as d, Fragment as T, renderList as j, createBlock as p, createCommentVNode as i, withKeys as u, unref as g, createTextVNode as _ } from "vue";
|
|
4
4
|
const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
5
5
|
__name: "InlineForm",
|
|
6
6
|
props: I,
|
|
@@ -24,10 +24,10 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
24
24
|
m("onQuery", s.formModel);
|
|
25
25
|
}, E = () => {
|
|
26
26
|
m("onQuery", {});
|
|
27
|
-
}, { formRef: c, dateFormat: y } =
|
|
27
|
+
}, { formRef: c, dateFormat: y } = N(s);
|
|
28
28
|
return b({ formRef: c }), (o, l) => {
|
|
29
|
-
const w =
|
|
30
|
-
return t(),
|
|
29
|
+
const w = S, M = R, F = W, v = L, B = Q, k = U;
|
|
30
|
+
return t(), C("div", {
|
|
31
31
|
class: "inlineForm",
|
|
32
32
|
style: a({ borderBottom: P.value })
|
|
33
33
|
}, [
|
|
@@ -41,7 +41,7 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
41
41
|
}, ["prevent"]))
|
|
42
42
|
}, {
|
|
43
43
|
default: d(() => [
|
|
44
|
-
(t(!0),
|
|
44
|
+
(t(!0), C(T, null, j(o.formColumns, (e) => (t(), p(v, {
|
|
45
45
|
key: e.label,
|
|
46
46
|
label: e.label
|
|
47
47
|
}, {
|
|
@@ -75,8 +75,8 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
75
75
|
"range-separator": e.datePickerConfig.rangeSeparator || "-",
|
|
76
76
|
"start-placeholder": e.datePickerConfig.startPlaceholder || "",
|
|
77
77
|
"end-placeholder": e.datePickerConfig.endPlaceholder || "",
|
|
78
|
-
format: e.datePickerConfig.dateFormat ||
|
|
79
|
-
"value-format": e.datePickerConfig.dateFormat ||
|
|
78
|
+
format: e.datePickerConfig.dateFormat || g(y)(e.datePickerConfig.type),
|
|
79
|
+
"value-format": e.datePickerConfig.dateFormat || g(y)(e.datePickerConfig.type),
|
|
80
80
|
placeholder: e.datePickerConfig.placeholder || "请选择",
|
|
81
81
|
style: a({ width: e.datePickerConfig.width ?? "100%" }),
|
|
82
82
|
onClear: r,
|
|
@@ -89,7 +89,7 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
89
89
|
_: 1
|
|
90
90
|
}, 8, ["model", "label-suffix"]),
|
|
91
91
|
D("div", G, [
|
|
92
|
-
f(
|
|
92
|
+
f(k, {
|
|
93
93
|
type: "primary",
|
|
94
94
|
loading: o.queryLoading,
|
|
95
95
|
onClick: r
|
|
@@ -99,7 +99,7 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
99
99
|
])]),
|
|
100
100
|
_: 1
|
|
101
101
|
}, 8, ["loading"]),
|
|
102
|
-
f(
|
|
102
|
+
f(k, { onClick: E }, {
|
|
103
103
|
default: d(() => [...l[2] || (l[2] = [
|
|
104
104
|
_("重置", -1)
|
|
105
105
|
])]),
|
|
@@ -109,7 +109,7 @@ const G = { class: "btnWrapper" }, J = /* @__PURE__ */ q({
|
|
|
109
109
|
], 4);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
}), Z = /* @__PURE__ */
|
|
112
|
+
}), Z = /* @__PURE__ */ K(J, [["__scopeId", "data-v-4ba37143"]]);
|
|
113
113
|
export {
|
|
114
114
|
Z as default
|
|
115
115
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aZ as m } from "./index-Bi7nW-sZ.js";
|
|
2
2
|
import { defineComponent as g, defineAsyncComponent as C, resolveComponent as s, createBlock as t, openBlock as n, withCtx as r, createElementBlock as u, Fragment as c, renderList as h, renderSlot as b, mergeProps as d, unref as y, normalizeProps as j, guardReactiveProps as k } from "vue";
|
|
3
3
|
const R = /* @__PURE__ */ g({
|
|
4
4
|
__name: "RecTableColumn",
|
|
@@ -17,7 +17,7 @@ const R = /* @__PURE__ */ g({
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(l) {
|
|
20
|
-
const i = C(() => import("./Span-
|
|
20
|
+
const i = C(() => import("./Span-r-IKXZvi.js"));
|
|
21
21
|
return (a, O) => {
|
|
22
22
|
const f = s("RecTableColumn", !0), p = m;
|
|
23
23
|
return n(), t(p, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as F, m as
|
|
2
|
-
import { E as X, a as Y, b as Z, c as ee } from "./
|
|
3
|
-
import { E as oe, a as le } from "./el-radio-
|
|
4
|
-
import { defineComponent as m, inject as te, computed as h, createBlock as d, openBlock as n, resolveDynamicComponent as K, normalizeStyle as v, normalizeClass as $, unref as r, withCtx as
|
|
1
|
+
import { b as F, m as b, d as C, _ as M, u as I, i as V, a as T, w as O, c as A, E as H, e as J } from "./index-Bi7nW-sZ.js";
|
|
2
|
+
import { u as Q, E as X, a as Y, b as Z, c as ee } from "./useFormHook-BVZ_gZcT.js";
|
|
3
|
+
import { E as oe, a as le } from "./el-radio-DgLOuieg.js";
|
|
4
|
+
import { defineComponent as m, inject as te, computed as h, createBlock as d, openBlock as n, resolveDynamicComponent as K, normalizeStyle as v, normalizeClass as $, unref as r, withCtx as i, renderSlot as E, provide as ae, createCommentVNode as f, createVNode as N, createElementBlock as k, Fragment as S, renderList as R, withDirectives as ne, withKeys as se, toDisplayString as j, createTextVNode as re, mergeProps as pe } from "vue";
|
|
5
5
|
const ue = F({
|
|
6
6
|
tag: {
|
|
7
7
|
type: String,
|
|
@@ -25,23 +25,23 @@ const ue = F({
|
|
|
25
25
|
},
|
|
26
26
|
xs: {
|
|
27
27
|
type: C([Number, Object]),
|
|
28
|
-
default: () =>
|
|
28
|
+
default: () => b({})
|
|
29
29
|
},
|
|
30
30
|
sm: {
|
|
31
31
|
type: C([Number, Object]),
|
|
32
|
-
default: () =>
|
|
32
|
+
default: () => b({})
|
|
33
33
|
},
|
|
34
34
|
md: {
|
|
35
35
|
type: C([Number, Object]),
|
|
36
|
-
default: () =>
|
|
36
|
+
default: () => b({})
|
|
37
37
|
},
|
|
38
38
|
lg: {
|
|
39
39
|
type: C([Number, Object]),
|
|
40
|
-
default: () =>
|
|
40
|
+
default: () => b({})
|
|
41
41
|
},
|
|
42
42
|
xl: {
|
|
43
43
|
type: C([Number, Object]),
|
|
44
|
-
default: () =>
|
|
44
|
+
default: () => b({})
|
|
45
45
|
}
|
|
46
46
|
}), U = Symbol("rowContextKey"), de = m({
|
|
47
47
|
name: "ElCol"
|
|
@@ -49,10 +49,10 @@ const ue = F({
|
|
|
49
49
|
...de,
|
|
50
50
|
props: ue,
|
|
51
51
|
setup(p) {
|
|
52
|
-
const t = p, { gutter: u } = te(U, { gutter: h(() => 0) }), s = I("col"),
|
|
52
|
+
const t = p, { gutter: u } = te(U, { gutter: h(() => 0) }), s = I("col"), c = h(() => {
|
|
53
53
|
const l = {};
|
|
54
54
|
return u.value && (l.paddingLeft = l.paddingRight = `${u.value / 2}px`), l;
|
|
55
|
-
}),
|
|
55
|
+
}), y = h(() => {
|
|
56
56
|
const l = [];
|
|
57
57
|
return ["span", "offset", "pull", "push"].forEach((o) => {
|
|
58
58
|
const g = t[o];
|
|
@@ -64,25 +64,25 @@ const ue = F({
|
|
|
64
64
|
}), u.value && l.push(s.is("guttered")), [s.b(), l];
|
|
65
65
|
});
|
|
66
66
|
return (l, _) => (n(), d(K(l.tag), {
|
|
67
|
-
class: $(r(
|
|
68
|
-
style: v(r(
|
|
67
|
+
class: $(r(y)),
|
|
68
|
+
style: v(r(c))
|
|
69
69
|
}, {
|
|
70
|
-
default:
|
|
70
|
+
default: i(() => [
|
|
71
71
|
E(l.$slots, "default")
|
|
72
72
|
]),
|
|
73
73
|
_: 3
|
|
74
74
|
}, 8, ["class", "style"]));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
var
|
|
78
|
-
const
|
|
77
|
+
var ie = /* @__PURE__ */ M(fe, [["__file", "col.vue"]]);
|
|
78
|
+
const ce = O(ie), ge = [
|
|
79
79
|
"start",
|
|
80
80
|
"center",
|
|
81
81
|
"end",
|
|
82
82
|
"space-around",
|
|
83
83
|
"space-between",
|
|
84
84
|
"space-evenly"
|
|
85
|
-
], he = ["top", "middle", "bottom"],
|
|
85
|
+
], he = ["top", "middle", "bottom"], ye = F({
|
|
86
86
|
tag: {
|
|
87
87
|
type: String,
|
|
88
88
|
default: "div"
|
|
@@ -100,29 +100,29 @@ const ie = O(ce), ge = [
|
|
|
100
100
|
type: String,
|
|
101
101
|
values: he
|
|
102
102
|
}
|
|
103
|
-
}),
|
|
103
|
+
}), be = m({
|
|
104
104
|
name: "ElRow"
|
|
105
105
|
}), Ce = /* @__PURE__ */ m({
|
|
106
|
-
...
|
|
107
|
-
props:
|
|
106
|
+
...be,
|
|
107
|
+
props: ye,
|
|
108
108
|
setup(p) {
|
|
109
109
|
const t = p, u = I("row"), s = h(() => t.gutter);
|
|
110
110
|
ae(U, {
|
|
111
111
|
gutter: s
|
|
112
112
|
});
|
|
113
|
-
const
|
|
113
|
+
const c = h(() => {
|
|
114
114
|
const l = {};
|
|
115
115
|
return t.gutter && (l.marginRight = l.marginLeft = `-${t.gutter / 2}px`), l;
|
|
116
|
-
}),
|
|
116
|
+
}), y = h(() => [
|
|
117
117
|
u.b(),
|
|
118
118
|
u.is(`justify-${t.justify}`, t.justify !== "start"),
|
|
119
119
|
u.is(`align-${t.align}`, !!t.align)
|
|
120
120
|
]);
|
|
121
121
|
return (l, _) => (n(), d(K(l.tag), {
|
|
122
|
-
class: $(r(
|
|
123
|
-
style: v(r(
|
|
122
|
+
class: $(r(y)),
|
|
123
|
+
style: v(r(c))
|
|
124
124
|
}, {
|
|
125
|
-
default:
|
|
125
|
+
default: i(() => [
|
|
126
126
|
E(l.$slots, "default")
|
|
127
127
|
]),
|
|
128
128
|
_: 3
|
|
@@ -143,14 +143,14 @@ const _e = O(me), we = {
|
|
|
143
143
|
setup(p, { expose: t }) {
|
|
144
144
|
const u = p, {
|
|
145
145
|
formRules: s,
|
|
146
|
-
dateFormat:
|
|
147
|
-
selectOptions:
|
|
146
|
+
dateFormat: c,
|
|
147
|
+
selectOptions: y,
|
|
148
148
|
handleSelectChange: l,
|
|
149
149
|
handleDatePickerChange: _,
|
|
150
150
|
formRef: P
|
|
151
|
-
} =
|
|
151
|
+
} = Q(u);
|
|
152
152
|
return t({ formRef: P }), (o, g) => {
|
|
153
|
-
const w =
|
|
153
|
+
const w = H, x = Z, z = ee, D = le, L = oe, B = Y, W = ce, q = _e, G = X;
|
|
154
154
|
return o.formMode === "rowForm" ? (n(), d(G, {
|
|
155
155
|
key: 0,
|
|
156
156
|
ref_key: "formRef",
|
|
@@ -163,14 +163,14 @@ const _e = O(me), we = {
|
|
|
163
163
|
"validate-on-rule-change": !1,
|
|
164
164
|
disabled: o.disabled
|
|
165
165
|
}, {
|
|
166
|
-
default:
|
|
166
|
+
default: i(() => [
|
|
167
167
|
N(q, { gutter: o.rowGutter }, {
|
|
168
|
-
default:
|
|
168
|
+
default: i(() => [
|
|
169
169
|
(n(!0), k(S, null, R(o.formColumns, (e) => (n(), d(W, {
|
|
170
170
|
key: e.label,
|
|
171
171
|
span: e.span || o.colSpan
|
|
172
172
|
}, {
|
|
173
|
-
default:
|
|
173
|
+
default: i(() => [
|
|
174
174
|
!Object.hasOwn(e, "show") || e.show ? (n(), d(B, {
|
|
175
175
|
key: 0,
|
|
176
176
|
label: e.hideLabel ? "" : e.label,
|
|
@@ -178,7 +178,7 @@ const _e = O(me), we = {
|
|
|
178
178
|
"label-width": e.labelWidth,
|
|
179
179
|
class: $(e.formItemClass || "")
|
|
180
180
|
}, {
|
|
181
|
-
default:
|
|
181
|
+
default: i(() => [
|
|
182
182
|
e.inputConfig ? (n(), k("div", {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "inputWrapper",
|
|
@@ -205,17 +205,18 @@ const _e = O(me), we = {
|
|
|
205
205
|
]),
|
|
206
206
|
e.inputConfig.unit ? (n(), k("span", ke, j(e.inputConfig.unit), 1)) : f("", !0)
|
|
207
207
|
], 4)) : f("", !0),
|
|
208
|
-
e.selectConfig ? (n(), d(
|
|
208
|
+
e.selectConfig ? (n(), d(x, {
|
|
209
209
|
key: 1,
|
|
210
210
|
modelValue: o.formModel[e.prop],
|
|
211
211
|
"onUpdate:modelValue": (a) => o.formModel[e.prop] = a,
|
|
212
|
-
options: r(
|
|
212
|
+
options: r(y)(e),
|
|
213
213
|
props: e.selectConfig?.props || {},
|
|
214
214
|
placeholder: e.selectConfig.placeholder || "请选择",
|
|
215
215
|
disabled: e.selectConfig.disabled || !1,
|
|
216
|
+
"popper-style": "z-index:999999 !important",
|
|
216
217
|
onChange: (a) => r(l)(a, e)
|
|
217
218
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled", "onChange"])) : f("", !0),
|
|
218
|
-
e.datePickerConfig ? (n(), d(
|
|
219
|
+
e.datePickerConfig ? (n(), d(z, {
|
|
219
220
|
key: 2,
|
|
220
221
|
modelValue: o.formModel[e.prop],
|
|
221
222
|
"onUpdate:modelValue": (a) => o.formModel[e.prop] = a,
|
|
@@ -223,8 +224,8 @@ const _e = O(me), we = {
|
|
|
223
224
|
"range-separator": e.datePickerConfig.rangeSeparator || "-",
|
|
224
225
|
"start-placeholder": e.datePickerConfig.startPlaceholder || "",
|
|
225
226
|
"end-placeholder": e.datePickerConfig.endPlaceholder || "",
|
|
226
|
-
format: e.datePickerConfig.dateFormat || r(
|
|
227
|
-
"value-format": e.datePickerConfig.dateFormat || r(
|
|
227
|
+
format: e.datePickerConfig.dateFormat || r(c)(e.datePickerConfig.type),
|
|
228
|
+
"value-format": e.datePickerConfig.dateFormat || r(c)(e.datePickerConfig.type),
|
|
228
229
|
placeholder: e.datePickerConfig.placeholder || "请选择",
|
|
229
230
|
style: v({ width: e.datePickerConfig.width ?? "100%" }),
|
|
230
231
|
onChange: (a) => r(_)(a, e, o.formModel)
|
|
@@ -235,11 +236,11 @@ const _e = O(me), we = {
|
|
|
235
236
|
"onUpdate:modelValue": (a) => o.formModel[e.prop] = a,
|
|
236
237
|
onChange: e.radioConfig?.onChange
|
|
237
238
|
}, {
|
|
238
|
-
default:
|
|
239
|
-
(n(!0), k(S, null, R(e.radioConfig.options, (a) => (n(), d(
|
|
239
|
+
default: i(() => [
|
|
240
|
+
(n(!0), k(S, null, R(e.radioConfig.options, (a) => (n(), d(D, {
|
|
240
241
|
value: a.value
|
|
241
242
|
}, {
|
|
242
|
-
default:
|
|
243
|
+
default: i(() => [
|
|
243
244
|
re(j(a.label), 1)
|
|
244
245
|
]),
|
|
245
246
|
_: 2
|
|
@@ -265,7 +266,7 @@ const _e = O(me), we = {
|
|
|
265
266
|
}, 8, ["model", "rules", "label-width", "label-suffix", "label-position", "disabled"])) : f("", !0);
|
|
266
267
|
};
|
|
267
268
|
}
|
|
268
|
-
}), Ne = /* @__PURE__ */
|
|
269
|
+
}), Ne = /* @__PURE__ */ J(ve, [["__scopeId", "data-v-66796e79"]]);
|
|
269
270
|
export {
|
|
270
271
|
Ne as default
|
|
271
272
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as s } from "./el-radio-
|
|
1
|
+
import { aZ as r } from "./index-Bi7nW-sZ.js";
|
|
2
|
+
import { a as s } from "./el-radio-DgLOuieg.js";
|
|
3
3
|
import { defineComponent as b, computed as x, createBlock as o, openBlock as a, withCtx as V, createVNode as w } from "vue";
|
|
4
4
|
const p = /* @__PURE__ */ b({
|
|
5
5
|
__name: "Selection",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as l, computed as o, createElementBlock as n, openBlock as r, normalizeStyle as s, normalizeClass as i, toDisplayString as c } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { b0 as p } from "./index-Bi7nW-sZ.js";
|
|
3
3
|
const y = /* @__PURE__ */ l({
|
|
4
4
|
__name: "Span",
|
|
5
5
|
props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as k, inject as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { ref as k, inject as Z, computed as m, defineComponent as h, createElementBlock as E, openBlock as B, normalizeClass as f, unref as e, createElementVNode as g, withDirectives as A, withModifiers as V, isRef as D, vModelRadio as L, renderSlot as R, createTextVNode as T, toDisplayString as U, nextTick as x, normalizeStyle as ee, onMounted as ae, provide as oe, reactive as le, toRefs as se, watch as te, Fragment as ne, renderList as re, createBlock as ie, mergeProps as de } from "vue";
|
|
2
|
+
import { ah as $, i as N, aq as w, b as S, Y as I, U as P, P as K, a_ as z, a1 as ue, $ as ce, a$ as pe, _ as C, u as G, M as ve, d as F, ax as be, T as me, V as fe, L as ye, a0 as _e, aB as M, w as ge } from "./index-Bi7nW-sZ.js";
|
|
3
|
+
const q = S({
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: [String, Number, Boolean],
|
|
6
6
|
default: void 0
|
|
7
7
|
},
|
|
8
|
-
size:
|
|
8
|
+
size: K,
|
|
9
9
|
disabled: Boolean,
|
|
10
10
|
label: {
|
|
11
11
|
type: [String, Number, Boolean],
|
|
@@ -20,18 +20,18 @@ const O = S({
|
|
|
20
20
|
default: void 0
|
|
21
21
|
}
|
|
22
22
|
}), he = S({
|
|
23
|
-
...
|
|
23
|
+
...q,
|
|
24
24
|
border: Boolean
|
|
25
|
-
}),
|
|
26
|
-
[
|
|
27
|
-
[I]: (o) =>
|
|
28
|
-
},
|
|
29
|
-
const l = k(), a =
|
|
25
|
+
}), O = {
|
|
26
|
+
[P]: (o) => $(o) || N(o) || w(o),
|
|
27
|
+
[I]: (o) => $(o) || N(o) || w(o)
|
|
28
|
+
}, j = Symbol("radioGroupKey"), H = (o, p) => {
|
|
29
|
+
const l = k(), a = Z(j, void 0), d = m(() => !!a), v = m(() => z(o.value) ? o.label : o.value), r = m({
|
|
30
30
|
get() {
|
|
31
31
|
return d.value ? a.modelValue : o.modelValue;
|
|
32
32
|
},
|
|
33
33
|
set(u) {
|
|
34
|
-
d.value ? a.changeEvent(u) : p && p(
|
|
34
|
+
d.value ? a.changeEvent(u) : p && p(P, u), l.value.checked = o.modelValue === v.value;
|
|
35
35
|
}
|
|
36
36
|
}), c = ue(m(() => a?.size)), s = ce(m(() => a?.disabled)), n = k(!1), b = m(() => s.value || d.value && r.value !== v.value ? -1 : 0);
|
|
37
37
|
return pe({
|
|
@@ -51,20 +51,20 @@ const O = S({
|
|
|
51
51
|
modelValue: r,
|
|
52
52
|
actualValue: v
|
|
53
53
|
};
|
|
54
|
-
},
|
|
54
|
+
}, Be = h({
|
|
55
55
|
name: "ElRadio"
|
|
56
|
-
}),
|
|
57
|
-
...
|
|
56
|
+
}), Ee = /* @__PURE__ */ h({
|
|
57
|
+
...Be,
|
|
58
58
|
props: he,
|
|
59
|
-
emits:
|
|
59
|
+
emits: O,
|
|
60
60
|
setup(o, { emit: p }) {
|
|
61
|
-
const l = o, a =
|
|
61
|
+
const l = o, a = G("radio"), { radioRef: d, radioGroup: v, focus: r, size: c, disabled: s, modelValue: n, actualValue: b } = H(l, p);
|
|
62
62
|
function u() {
|
|
63
|
-
|
|
63
|
+
x(() => p(I, n.value));
|
|
64
64
|
}
|
|
65
65
|
return (_, t) => {
|
|
66
66
|
var i;
|
|
67
|
-
return
|
|
67
|
+
return B(), E("label", {
|
|
68
68
|
class: f([
|
|
69
69
|
e(a).b(),
|
|
70
70
|
e(a).is("disabled", e(s)),
|
|
@@ -97,7 +97,7 @@ const O = S({
|
|
|
97
97
|
onClick: V(() => {
|
|
98
98
|
}, ["stop"])
|
|
99
99
|
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
|
|
100
|
-
[
|
|
100
|
+
[L, e(n)]
|
|
101
101
|
]),
|
|
102
102
|
g("span", {
|
|
103
103
|
class: f(e(a).e("inner"))
|
|
@@ -109,23 +109,23 @@ const O = S({
|
|
|
109
109
|
}, ["stop"])
|
|
110
110
|
}, [
|
|
111
111
|
R(_.$slots, "default", {}, () => [
|
|
112
|
-
|
|
112
|
+
T(U(_.label), 1)
|
|
113
113
|
])
|
|
114
114
|
], 42, ["onKeydown"])
|
|
115
115
|
], 2);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
var
|
|
119
|
+
var W = /* @__PURE__ */ C(Ee, [["__file", "radio.vue"]]);
|
|
120
120
|
const Ve = S({
|
|
121
|
-
...
|
|
121
|
+
...q
|
|
122
122
|
}), Se = h({
|
|
123
123
|
name: "ElRadioButton"
|
|
124
124
|
}), ke = /* @__PURE__ */ h({
|
|
125
125
|
...Se,
|
|
126
126
|
props: Ve,
|
|
127
127
|
setup(o) {
|
|
128
|
-
const p = o, l =
|
|
128
|
+
const p = o, l = G("radio"), { radioRef: a, focus: d, size: v, disabled: r, modelValue: c, radioGroup: s, actualValue: n } = H(p), b = m(() => ({
|
|
129
129
|
backgroundColor: s?.fill || "",
|
|
130
130
|
borderColor: s?.fill || "",
|
|
131
131
|
boxShadow: s?.fill ? `-1px 0 0 0 ${s.fill}` : "",
|
|
@@ -133,7 +133,7 @@ const Ve = S({
|
|
|
133
133
|
}));
|
|
134
134
|
return (u, _) => {
|
|
135
135
|
var t;
|
|
136
|
-
return
|
|
136
|
+
return B(), E("label", {
|
|
137
137
|
class: f([
|
|
138
138
|
e(l).b("button"),
|
|
139
139
|
e(l).is("active", e(c) === e(n)),
|
|
@@ -156,7 +156,7 @@ const Ve = S({
|
|
|
156
156
|
onClick: V(() => {
|
|
157
157
|
}, ["stop"])
|
|
158
158
|
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
|
|
159
|
-
[
|
|
159
|
+
[L, e(c)]
|
|
160
160
|
]),
|
|
161
161
|
g("span", {
|
|
162
162
|
class: f(e(l).be("button", "inner")),
|
|
@@ -165,20 +165,20 @@ const Ve = S({
|
|
|
165
165
|
}, ["stop"])
|
|
166
166
|
}, [
|
|
167
167
|
R(u.$slots, "default", {}, () => [
|
|
168
|
-
|
|
168
|
+
T(U(u.label), 1)
|
|
169
169
|
])
|
|
170
170
|
], 46, ["onKeydown"])
|
|
171
171
|
], 2);
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
|
-
var
|
|
175
|
+
var Y = /* @__PURE__ */ C(ke, [["__file", "radio-button.vue"]]);
|
|
176
176
|
const Re = S({
|
|
177
177
|
id: {
|
|
178
178
|
type: String,
|
|
179
179
|
default: void 0
|
|
180
180
|
},
|
|
181
|
-
size:
|
|
181
|
+
size: K,
|
|
182
182
|
disabled: Boolean,
|
|
183
183
|
modelValue: {
|
|
184
184
|
type: [String, Number, Boolean],
|
|
@@ -205,31 +205,31 @@ const Re = S({
|
|
|
205
205
|
},
|
|
206
206
|
props: {
|
|
207
207
|
type: F(Object),
|
|
208
|
-
default: () =>
|
|
208
|
+
default: () => J
|
|
209
209
|
},
|
|
210
210
|
...ve(["ariaLabel"])
|
|
211
|
-
}), Ie =
|
|
211
|
+
}), Ie = O, J = {
|
|
212
212
|
label: "label",
|
|
213
213
|
value: "value",
|
|
214
214
|
disabled: "disabled"
|
|
215
|
-
},
|
|
215
|
+
}, Pe = h({
|
|
216
216
|
name: "ElRadioGroup"
|
|
217
|
-
}),
|
|
218
|
-
...
|
|
217
|
+
}), Ce = /* @__PURE__ */ h({
|
|
218
|
+
...Pe,
|
|
219
219
|
props: Re,
|
|
220
220
|
emits: Ie,
|
|
221
221
|
setup(o, { emit: p }) {
|
|
222
|
-
const l = o, a =
|
|
222
|
+
const l = o, a = G("radio"), d = be(), v = k(), { formItem: r } = me(), { inputId: c, isLabeledByFormItem: s } = fe(l, {
|
|
223
223
|
formItemContext: r
|
|
224
224
|
}), n = (t) => {
|
|
225
|
-
p(
|
|
225
|
+
p(P, t), x(() => p(I, t));
|
|
226
226
|
};
|
|
227
227
|
ae(() => {
|
|
228
228
|
const t = v.value.querySelectorAll("[type=radio]"), i = t[0];
|
|
229
229
|
!Array.from(t).some((y) => y.checked) && i && (i.tabIndex = 0);
|
|
230
230
|
});
|
|
231
231
|
const b = m(() => l.name || d.value), u = m(() => ({
|
|
232
|
-
...
|
|
232
|
+
...J,
|
|
233
233
|
...l.props
|
|
234
234
|
})), _ = (t) => {
|
|
235
235
|
const i = {
|
|
@@ -239,13 +239,13 @@ const Re = S({
|
|
|
239
239
|
};
|
|
240
240
|
return { ...t, ...i };
|
|
241
241
|
};
|
|
242
|
-
return oe(
|
|
242
|
+
return oe(j, le({
|
|
243
243
|
...se(l),
|
|
244
244
|
changeEvent: n,
|
|
245
245
|
name: b
|
|
246
246
|
})), te(() => l.modelValue, (t, i) => {
|
|
247
247
|
l.validateEvent && !ye(t, i) && r?.validate("change").catch((y) => _e());
|
|
248
|
-
}), (t, i) => (
|
|
248
|
+
}), (t, i) => (B(), E("div", {
|
|
249
249
|
id: e(c),
|
|
250
250
|
ref_key: "radioGroupRef",
|
|
251
251
|
ref: v,
|
|
@@ -255,18 +255,18 @@ const Re = S({
|
|
|
255
255
|
"aria-labelledby": e(s) ? e(r).labelId : void 0
|
|
256
256
|
}, [
|
|
257
257
|
R(t.$slots, "default", {}, () => [
|
|
258
|
-
(
|
|
258
|
+
(B(!0), E(ne, null, re(l.options, (y, X) => (B(), ie(W, de({ key: X }, _(y)), null, 16))), 128))
|
|
259
259
|
])
|
|
260
260
|
], 10, ["id", "aria-label", "aria-labelledby"]));
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
RadioButton:
|
|
266
|
-
RadioGroup:
|
|
267
|
-
}), we = M(
|
|
268
|
-
M(
|
|
263
|
+
var Q = /* @__PURE__ */ C(Ce, [["__file", "radio-group.vue"]]);
|
|
264
|
+
const Ne = ge(W, {
|
|
265
|
+
RadioButton: Y,
|
|
266
|
+
RadioGroup: Q
|
|
267
|
+
}), we = M(Q);
|
|
268
|
+
M(Y);
|
|
269
269
|
export {
|
|
270
270
|
we as E,
|
|
271
|
-
|
|
271
|
+
Ne as a
|
|
272
272
|
};
|