@rft-rc/recycle-ui 0.0.3-rc.1 → 0.0.3-rc.11

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 (50) hide show
  1. package/dist/components/button/index.d.ts.map +1 -1
  2. package/dist/components/button/index.vue.d.ts +7 -0
  3. package/dist/components/button/index.vue.d.ts.map +1 -1
  4. package/dist/components/calendar/index.d.ts.map +1 -1
  5. package/dist/components/checkbox/button.vue.d.ts +51 -0
  6. package/dist/components/checkbox/button.vue.d.ts.map +1 -0
  7. package/dist/components/checkbox/group.vue.d.ts +58 -0
  8. package/dist/components/checkbox/group.vue.d.ts.map +1 -0
  9. package/dist/components/checkbox/index.d.ts +8 -0
  10. package/dist/components/checkbox/index.d.ts.map +1 -0
  11. package/dist/components/checkbox/index.vue.d.ts +60 -0
  12. package/dist/components/checkbox/index.vue.d.ts.map +1 -0
  13. package/dist/components/descriptions/index.d.ts +12 -0
  14. package/dist/components/descriptions/index.d.ts.map +1 -1
  15. package/dist/components/descriptions/index.vue.d.ts +3 -0
  16. package/dist/components/descriptions/index.vue.d.ts.map +1 -1
  17. package/dist/components/descriptions/item.vue.d.ts +3 -0
  18. package/dist/components/descriptions/item.vue.d.ts.map +1 -1
  19. package/dist/components/dropdown/index.d.ts.map +1 -1
  20. package/dist/components/dropdown/index.vue.d.ts.map +1 -1
  21. package/dist/components/form/index.d.ts +8 -0
  22. package/dist/components/form/index.d.ts.map +1 -0
  23. package/dist/components/form/index.vue.d.ts +76 -0
  24. package/dist/components/form/index.vue.d.ts.map +1 -0
  25. package/dist/components/form/item.vue.d.ts +49 -0
  26. package/dist/components/form/item.vue.d.ts.map +1 -0
  27. package/dist/components/icon/index.d.ts.map +1 -1
  28. package/dist/components/input/index.d.ts.map +1 -1
  29. package/dist/components/input/index.vue.d.ts +22 -3
  30. package/dist/components/input/index.vue.d.ts.map +1 -1
  31. package/dist/components/popup/index.d.ts.map +1 -1
  32. package/dist/components/popup/index.vue.d.ts.map +1 -1
  33. package/dist/components/radio/button.vue.d.ts +42 -0
  34. package/dist/components/radio/button.vue.d.ts.map +1 -0
  35. package/dist/components/radio/group.vue.d.ts +50 -0
  36. package/dist/components/radio/group.vue.d.ts.map +1 -0
  37. package/dist/components/radio/index.d.ts +8 -0
  38. package/dist/components/radio/index.d.ts.map +1 -0
  39. package/dist/components/radio/index.vue.d.ts +48 -0
  40. package/dist/components/radio/index.vue.d.ts.map +1 -0
  41. package/dist/components/toast/index.vue.d.ts +2 -2
  42. package/dist/components/toast/index.vue.d.ts.map +1 -1
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.ts +7 -0
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.mjs +2513 -1493
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/style.css +1 -1
  50. package/package.json +15 -4
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as re, inject as Ce, computed as R, onMounted as nt, createElementBlock as f, openBlock as s, normalizeStyle as le, normalizeClass as j, createCommentVNode as D, toDisplayString as P, renderSlot as q, Fragment as oe, createBlock as te, createTextVNode as _e, createElementVNode as C, ref as E, watchEffect as Et, provide as Ve, renderList as fe, onUnmounted as at, Teleport as it, createVNode as G, Transition as Ee, withCtx as ae, createApp as Bt, reactive as At, TransitionGroup as Ft, render as It, watch as Se, withModifiers as Fe, unref as Q, nextTick as Be, withDirectives as Mt, vModelText as Rt, useSlots as zt, resolveDynamicComponent as vt } from "vue";
2
- const Yt = {
1
+ import { defineComponent as oe, inject as le, computed as C, onMounted as Je, createElementBlock as g, openBlock as f, normalizeStyle as ie, normalizeClass as q, createCommentVNode as E, toDisplayString as K, renderSlot as Q, Fragment as ue, createBlock as ce, createTextVNode as ve, createElementVNode as T, ref as W, watchEffect as Gt, provide as we, renderList as ke, onUnmounted as at, Teleport as yt, createVNode as ae, Transition as Pe, withCtx as fe, unref as te, createApp as Ut, reactive as qt, TransitionGroup as Kt, render as Pt, watch as me, withModifiers as Ee, nextTick as Ie, withDirectives as pt, vModelText as Yt, useSlots as jt, resolveDynamicComponent as wt, vModelRadio as Wt } from "vue";
2
+ const Jt = {
3
3
  key: 0,
4
4
  class: "rc-icon__unicode"
5
- }, Lt = /* @__PURE__ */ re({
5
+ }, Qt = /* @__PURE__ */ oe({
6
6
  name: "rc-icon",
7
7
  __name: "index",
8
8
  props: {
@@ -12,52 +12,52 @@ const Yt = {
12
12
  spin: { type: Boolean, default: !1 },
13
13
  code: { default: "" }
14
14
  },
15
- setup(e) {
16
- const r = e, m = Ce(lt, {}), t = R(() => (m == null ? void 0 : m.iconClass) || "iconfont"), g = R(() => r.name || ""), k = R(() => typeof r.size == "number" ? `${r.size}px` : r.size || "16px"), v = R(() => ({
17
- fontSize: k.value,
18
- color: r.color || void 0,
15
+ setup(t) {
16
+ const d = t, n = le(ht, {}), e = C(() => (n == null ? void 0 : n.iconClass) || "iconfont"), p = C(() => d.name || ""), i = C(() => typeof d.size == "number" ? `${d.size}px` : d.size || "16px"), v = C(() => ({
17
+ fontSize: i.value,
18
+ color: d.color || void 0,
19
19
  lineHeight: 1,
20
- fontFamily: (m == null ? void 0 : m.iconClass) || "iconfont"
21
- })), d = R(() => {
22
- const o = r.code;
23
- if (o == null || o === "" || o === 0) return "";
24
- if (typeof o == "number")
25
- return String.fromCharCode(o);
26
- const p = String(o).replace(/^0x/i, ""), B = parseInt(p, 16);
27
- return Number.isNaN(B) ? "" : String.fromCharCode(B);
20
+ fontFamily: (n == null ? void 0 : n.iconClass) || "iconfont"
21
+ })), a = C(() => {
22
+ const u = d.code;
23
+ if (u == null || u === "" || u === 0) return "";
24
+ if (typeof u == "number")
25
+ return String.fromCharCode(u);
26
+ const o = String(u).replace(/^0x/i, ""), M = parseInt(o, 16);
27
+ return Number.isNaN(M) ? "" : String.fromCharCode(M);
28
28
  });
29
- return nt(() => {
29
+ return Je(() => {
30
30
  if (typeof window > "u") return;
31
- const o = m && m.iconCssUrl || ct.iconCssUrl;
32
- if (!o) return;
33
- const p = `link[rel="stylesheet"][data-rcui-icon="true"][href="${o}"]`;
34
- if (!document.head.querySelector(p)) {
31
+ const u = n && n.iconCssUrl || bt.iconCssUrl;
32
+ if (!u) return;
33
+ const o = `link[rel="stylesheet"][data-rcui-icon="true"][href="${u}"]`;
34
+ if (!document.head.querySelector(o)) {
35
35
  const x = document.createElement("link");
36
- x.rel = "stylesheet", x.href = o, x.setAttribute("data-rcui-icon", "true"), document.head.appendChild(x);
36
+ x.rel = "stylesheet", x.href = u, x.setAttribute("data-rcui-icon", "true"), document.head.appendChild(x);
37
37
  }
38
- }), (o, p) => (s(), f("i", {
39
- class: j(["rc-icon", [t.value, g.value, { "rc-icon--spin": e.spin }]]),
40
- style: le(v.value),
38
+ }), (u, o) => (f(), g("i", {
39
+ class: q(["rc-icon", [e.value, p.value, { "rc-icon--spin": t.spin }]]),
40
+ style: ie(v.value),
41
41
  "aria-hidden": "true"
42
42
  }, [
43
- d.value ? (s(), f("span", Yt, P(d.value), 1)) : D("", !0)
43
+ a.value ? (f(), g("span", Jt, K(a.value), 1)) : E("", !0)
44
44
  ], 6));
45
45
  }
46
- }), se = (e, r) => {
47
- const m = e.__vccOpts || e;
48
- for (const [t, g] of r)
49
- m[t] = g;
50
- return m;
51
- }, Z = /* @__PURE__ */ se(Lt, [["__scopeId", "data-v-3857a892"]]), Pt = ["disabled"], Nt = {
46
+ }), se = (t, d) => {
47
+ const n = t.__vccOpts || t;
48
+ for (const [e, p] of d)
49
+ n[e] = p;
50
+ return n;
51
+ }, re = /* @__PURE__ */ se(Qt, [["__scopeId", "data-v-3857a892"]]), Xt = ["disabled", "type"], Zt = {
52
52
  key: 0,
53
53
  class: "rc-button__spinner"
54
- }, Wt = {
54
+ }, ea = {
55
55
  key: 0,
56
56
  class: "rc-button__icon rc-button__icon--prefix"
57
- }, Ht = {
57
+ }, ta = {
58
58
  key: 2,
59
59
  class: "rc-button__icon rc-button__icon--suffix"
60
- }, Ot = /* @__PURE__ */ re({
60
+ }, aa = /* @__PURE__ */ oe({
61
61
  __name: "index",
62
62
  props: {
63
63
  type: { default: "default" },
@@ -69,97 +69,116 @@ const Yt = {
69
69
  disabled: { type: Boolean, default: !1 },
70
70
  loading: { type: Boolean, default: !1 },
71
71
  preIcon: { default: "" },
72
- suffixIcon: { default: "" }
72
+ suffixIcon: { default: "" },
73
+ formType: { default: void 0 },
74
+ width: { default: void 0 }
73
75
  },
74
76
  emits: ["click"],
75
- setup(e, { emit: r }) {
76
- const m = e, t = r, g = (v) => {
77
- !m.disabled && !m.loading && t("click", v);
78
- }, k = R(() => {
79
- const v = m.round;
80
- return typeof v == "boolean" ? v ? "999px" : "6px" : typeof v == "number" ? `${v}px` : String(v);
77
+ setup(t, { emit: d }) {
78
+ const n = t, e = d, p = le("rcFormActions", void 0), i = C(() => n.formType === "submit" ? "submit" : n.formType === "reset" ? "reset" : "button"), v = (o) => {
79
+ if (!(n.disabled || n.loading)) {
80
+ if (n.formType && p)
81
+ if (n.formType === "submit") {
82
+ o.preventDefault(), p.submit();
83
+ return;
84
+ } else n.formType === "button" ? (o.preventDefault(), p.submit()) : n.formType === "reset" && (o.preventDefault(), p.reset());
85
+ e("click", o);
86
+ }
87
+ }, a = C(() => {
88
+ const o = n.round;
89
+ return typeof o == "boolean" ? o ? "999px" : "6px" : typeof o == "number" ? `${o}px` : String(o);
90
+ }), u = C(() => {
91
+ if (n.width !== void 0) {
92
+ if (typeof n.width == "number") return `${n.width}px`;
93
+ const o = String(n.width);
94
+ return /^\d+$/.test(o) ? `${o}px` : o;
95
+ }
96
+ if (n.block)
97
+ return "100%";
81
98
  });
82
- return (v, d) => (s(), f("button", {
83
- class: j(["rc-button", [`rc-button--${e.type}`, `rc-button--${e.size}`, e.mode ? `rc-button--${e.mode}` : "", { "is-block": e.block, "is-disabled": e.disabled, "is-loading": e.loading }]]),
84
- style: le({ borderRadius: k.value }),
85
- disabled: e.disabled || e.loading,
86
- onClick: g
99
+ return (o, M) => (f(), g("button", {
100
+ class: q(["rc-button", [`rc-button--${t.type}`, `rc-button--${t.size}`, t.mode ? `rc-button--${t.mode}` : "", { "is-block": t.block, "is-disabled": t.disabled, "is-loading": t.loading }]]),
101
+ style: ie({ borderRadius: a.value, width: u.value }),
102
+ disabled: t.disabled || t.loading,
103
+ type: i.value,
104
+ onClick: v
87
105
  }, [
88
- e.loading ? (s(), f("span", Nt)) : (s(), f(oe, { key: 1 }, [
89
- e.preIcon || v.$slots.preIcon ? (s(), f("span", Wt, [
90
- q(v.$slots, "preIcon", {}, () => [
91
- e.preIcon ? (s(), te(Z, {
106
+ t.loading ? (f(), g("span", Zt)) : (f(), g(ue, { key: 1 }, [
107
+ t.preIcon || o.$slots.preIcon ? (f(), g("span", ea, [
108
+ Q(o.$slots, "preIcon", {}, () => [
109
+ t.preIcon ? (f(), ce(re, {
92
110
  key: 0,
93
- name: e.preIcon
94
- }, null, 8, ["name"])) : D("", !0)
111
+ name: t.preIcon
112
+ }, null, 8, ["name"])) : E("", !0)
95
113
  ], !0)
96
- ])) : D("", !0)
114
+ ])) : E("", !0)
97
115
  ], 64)),
98
- q(v.$slots, "default", {}, () => [
99
- _e(P(e.label), 1)
116
+ Q(o.$slots, "default", {}, () => [
117
+ ve(K(t.label), 1)
100
118
  ], !0),
101
- !e.loading && (e.suffixIcon || v.$slots.suffixIcon) ? (s(), f("span", Ht, [
102
- q(v.$slots, "suffixIcon", {}, () => [
103
- e.suffixIcon ? (s(), te(Z, {
119
+ !t.loading && (t.suffixIcon || o.$slots.suffixIcon) ? (f(), g("span", ta, [
120
+ Q(o.$slots, "suffixIcon", {}, () => [
121
+ t.suffixIcon ? (f(), ce(re, {
104
122
  key: 0,
105
- name: e.suffixIcon
106
- }, null, 8, ["name"])) : D("", !0)
123
+ name: t.suffixIcon
124
+ }, null, 8, ["name"])) : E("", !0)
107
125
  ], !0)
108
- ])) : D("", !0)
109
- ], 14, Pt));
126
+ ])) : E("", !0)
127
+ ], 14, Xt));
110
128
  }
111
- }), xe = /* @__PURE__ */ se(Ot, [["__scopeId", "data-v-4c6a5e4f"]]);
112
- xe.name = "rc-button";
113
- function mt(e) {
114
- return e.component(xe.name, xe), e;
129
+ }), De = /* @__PURE__ */ se(aa, [["__scopeId", "data-v-89bf839e"]]);
130
+ De && (De.name = "rc-button");
131
+ function $t(t) {
132
+ return De && t.component(De.name || "rc-button", De), t;
115
133
  }
116
- const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
134
+ const na = { class: "rc-desc-item__value" }, la = /* @__PURE__ */ oe({
117
135
  name: "rc-descriptions-item",
118
136
  __name: "item",
119
137
  props: {
120
138
  label: { default: "" },
121
139
  value: { default: "" },
122
140
  labelWidth: { default: "" },
123
- span: { default: 1 }
141
+ span: { default: 1 },
142
+ labelPosition: { default: void 0 }
124
143
  },
125
- setup(e) {
126
- const r = e;
127
- Ce("rcDescItemWidth", void 0), Ce("rcDescSingleWidth", ""), Ce("rcDescGap", "0px");
128
- const m = Ce("rcDescGapPx", 0), t = Ce("rcDescColCount", 1), g = Ce("rcDescLabelWidth", ""), k = R(() => {
129
- const o = typeof r.span == "string" ? parseInt(r.span, 10) : r.span, p = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, B = !Number.isNaN(o) && o > 0 ? o : 1;
130
- return Math.min(B, p || 1);
131
- }), v = R(() => {
132
- const o = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, p = typeof (m == null ? void 0 : m.value) == "number" ? m.value : m, B = k.value;
133
- if (!o || o <= 1 || B >= o) return "100%";
134
- const x = (o - 1) * p, _ = (B - 1) * p;
135
- return `calc((100% - ${x}px) * ${B} / ${o} + ${_}px)`;
136
- }), d = R(() => {
137
- const o = typeof (g == null ? void 0 : g.value) == "string" ? g.value : g, p = r.labelWidth !== "" ? r.labelWidth : o || "";
138
- return p ? { width: typeof p == "number" ? `${p}px` : String(p), flex: "0 0 auto" } : {};
144
+ setup(t) {
145
+ const d = t;
146
+ le("rcDescItemWidth", void 0), le("rcDescSingleWidth", ""), le("rcDescGap", "0px");
147
+ const n = le("rcDescGapPx", 0), e = le("rcDescColCount", 1), p = le("rcDescLabelWidth", ""), i = le("rcDescLabelPosition", "left"), v = C(() => d.labelPosition !== void 0 ? d.labelPosition : (typeof (i == null ? void 0 : i.value) == "string" ? i.value : i) || "left"), a = C(() => {
148
+ const M = typeof d.span == "string" ? parseInt(d.span, 10) : d.span, x = typeof (e == null ? void 0 : e.value) == "number" ? e.value : e, k = !Number.isNaN(M) && M > 0 ? M : 1;
149
+ return Math.min(k, x || 1);
150
+ }), u = C(() => {
151
+ const M = typeof (e == null ? void 0 : e.value) == "number" ? e.value : e, x = typeof (n == null ? void 0 : n.value) == "number" ? n.value : n, k = a.value;
152
+ if (!M || M <= 1 || k >= M) return "100%";
153
+ const D = (M - 1) * x, L = (k - 1) * x;
154
+ return `calc((100% - ${D}px) * ${k} / ${M} + ${L}px)`;
155
+ }), o = C(() => {
156
+ const M = typeof (p == null ? void 0 : p.value) == "string" ? p.value : p, x = d.labelWidth !== "" ? d.labelWidth : M || "";
157
+ return x ? { width: typeof x == "number" ? `${x}px` : String(x), flex: "0 0 auto" } : {};
139
158
  });
140
- return (o, p) => (s(), f("div", {
141
- class: "rc-desc-item",
142
- style: le({ width: v.value, flex: `0 0 ${v.value}` })
159
+ return (M, x) => (f(), g("div", {
160
+ class: q(["rc-desc-item", { "rc-desc-item--label-top": v.value === "top" }]),
161
+ style: ie({ width: u.value, flex: `0 0 ${u.value}` })
143
162
  }, [
144
- C("div", {
163
+ T("div", {
145
164
  class: "rc-desc-item__label",
146
- style: le(d.value)
165
+ style: ie(o.value)
147
166
  }, [
148
- q(o.$slots, "label", {}, () => [
149
- _e(P(e.label), 1)
167
+ Q(M.$slots, "label", {}, () => [
168
+ ve(K(t.label), 1)
150
169
  ], !0)
151
170
  ], 4),
152
- C("div", Ut, [
153
- q(o.$slots, "default", {}, () => [
154
- _e(P(e.value), 1)
171
+ T("div", na, [
172
+ Q(M.$slots, "default", {}, () => [
173
+ ve(K(t.value), 1)
155
174
  ], !0)
156
175
  ])
157
- ], 4));
176
+ ], 6));
158
177
  }
159
- }), ze = /* @__PURE__ */ se(Kt, [["__scopeId", "data-v-970d0b99"]]), jt = { class: "rc-descriptions" }, Gt = {
178
+ }), Ke = /* @__PURE__ */ se(la, [["__scopeId", "data-v-c67b72f3"]]), oa = { class: "rc-descriptions" }, sa = {
160
179
  key: 0,
161
180
  class: "rc-descriptions__title"
162
- }, qt = /* @__PURE__ */ re({
181
+ }, ra = /* @__PURE__ */ oe({
163
182
  name: "rc-descriptions",
164
183
  __name: "index",
165
184
  props: {
@@ -167,70 +186,71 @@ const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
167
186
  column: { default: 2 },
168
187
  gap: { default: 4 },
169
188
  labelWidth: { default: "" },
189
+ labelPosition: { default: "left" },
170
190
  data: { default: () => [] },
171
191
  keyMap: {}
172
192
  },
173
- setup(e) {
174
- const r = e, m = E(null), t = R(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)), g = R(() => {
175
- const p = typeof r.column == "string" ? Number.parseInt(r.column, 10) : r.column ?? 1;
176
- return !Number.isNaN(p) && p > 0 ? p : 1;
177
- }), k = E("100%"), v = E("100%");
178
- Et(() => {
179
- const p = g.value;
180
- if (p <= 1)
181
- k.value = "100%", v.value = "100%";
193
+ setup(t) {
194
+ const d = t, n = W(null), e = C(() => typeof d.gap == "number" ? `${d.gap}px` : String(d.gap)), p = C(() => {
195
+ const o = typeof d.column == "string" ? Number.parseInt(d.column, 10) : d.column ?? 1;
196
+ return !Number.isNaN(o) && o > 0 ? o : 1;
197
+ }), i = W("100%"), v = W("100%");
198
+ Gt(() => {
199
+ const o = p.value;
200
+ if (o <= 1)
201
+ i.value = "100%", v.value = "100%";
182
202
  else {
183
- const B = typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0, _ = `calc((100% - ${(p - 1) * B}px) / ${p})`;
184
- v.value = _, k.value = _;
185
- }
186
- }), Ve("rcDescItemWidth", k), Ve("rcDescSingleWidth", v), Ve("rcDescColCount", g), Ve("rcDescGapPx", R(() => typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0));
187
- const d = R(() => r.labelWidth === "" || r.labelWidth === void 0 ? "" : typeof r.labelWidth == "number" ? `${r.labelWidth}px` : String(r.labelWidth));
188
- Ve("rcDescLabelWidth", d), Ve("rcDescGap", R(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)));
189
- const o = R(() => {
190
- var x, _, V;
191
- const p = ((x = r.keyMap) == null ? void 0 : x.key) ?? "label", B = ((_ = r.keyMap) == null ? void 0 : _.value) ?? "value";
192
- return (V = r.data) != null && V.length ? r.data.map((A) => ({
193
- label: A == null ? void 0 : A[p],
194
- value: A == null ? void 0 : A[B]
203
+ const M = typeof d.gap == "number" ? d.gap : parseFloat(String(d.gap)) || 0, k = `calc((100% - ${(o - 1) * M}px) / ${o})`;
204
+ v.value = k, i.value = k;
205
+ }
206
+ }), we("rcDescItemWidth", i), we("rcDescSingleWidth", v), we("rcDescColCount", p), we("rcDescGapPx", C(() => typeof d.gap == "number" ? d.gap : parseFloat(String(d.gap)) || 0));
207
+ const a = C(() => d.labelWidth === "" || d.labelWidth === void 0 ? "" : typeof d.labelWidth == "number" ? `${d.labelWidth}px` : String(d.labelWidth));
208
+ we("rcDescLabelWidth", a), we("rcDescGap", C(() => typeof d.gap == "number" ? `${d.gap}px` : String(d.gap))), we("rcDescLabelPosition", C(() => d.labelPosition || "left"));
209
+ const u = C(() => {
210
+ var x, k, D;
211
+ const o = ((x = d.keyMap) == null ? void 0 : x.key) ?? "label", M = ((k = d.keyMap) == null ? void 0 : k.value) ?? "value";
212
+ return (D = d.data) != null && D.length ? d.data.map((L) => ({
213
+ label: L == null ? void 0 : L[o],
214
+ value: L == null ? void 0 : L[M]
195
215
  })) : [];
196
216
  });
197
- return (p, B) => (s(), f("div", jt, [
198
- p.$slots.title || e.title ? (s(), f("div", Gt, [
199
- q(p.$slots, "title", {}, () => [
200
- _e(P(e.title), 1)
217
+ return (o, M) => (f(), g("div", oa, [
218
+ o.$slots.title || t.title ? (f(), g("div", sa, [
219
+ Q(o.$slots, "title", {}, () => [
220
+ ve(K(t.title), 1)
201
221
  ], !0)
202
- ])) : D("", !0),
203
- C("div", {
222
+ ])) : E("", !0),
223
+ T("div", {
204
224
  class: "rc-descriptions__body",
205
- style: le({ gap: t.value }),
225
+ style: ie({ gap: e.value }),
206
226
  ref_key: "wrapEl",
207
- ref: m
227
+ ref: n
208
228
  }, [
209
- o.value.length ? (s(!0), f(oe, { key: 0 }, fe(o.value, (x, _) => (s(), te(ze, {
210
- key: _,
229
+ u.value.length ? (f(!0), g(ue, { key: 0 }, ke(u.value, (x, k) => (f(), ce(Ke, {
230
+ key: k,
211
231
  label: x.label,
212
232
  value: x.value,
213
- "label-width": e.labelWidth
214
- }, null, 8, ["label", "value", "label-width"]))), 128)) : q(p.$slots, "default", { key: 1 }, void 0, !0)
233
+ "label-width": t.labelWidth
234
+ }, null, 8, ["label", "value", "label-width"]))), 128)) : Q(o.$slots, "default", { key: 1 }, void 0, !0)
215
235
  ], 4)
216
236
  ]));
217
237
  }
218
- }), Ne = /* @__PURE__ */ se(qt, [["__scopeId", "data-v-5fcaa235"]]);
219
- Ne.name = "rc-descriptions";
220
- ze.name = "rc-descriptions-item";
221
- function pt(e) {
222
- return e.component(Ne.name, Ne), e.component("RcDescriptions", Ne), e.component(ze.name, ze), e.component("RcDescriptionsItem", ze), e;
238
+ }), Xe = /* @__PURE__ */ se(ra, [["__scopeId", "data-v-f8388d0b"]]);
239
+ Xe.name = "rc-descriptions";
240
+ Ke.name = "rc-descriptions-item";
241
+ function xt(t) {
242
+ return t.component(Xe.name, Xe), t.component("RcDescriptions", Xe), t.component(Ke.name, Ke), t.component("RcDescriptionsItem", Ke), t;
223
243
  }
224
- const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card__title-text" }, Xt = {
244
+ const kl = Xe, _l = Ke, ua = { class: "rc-card__title" }, ia = { class: "rc-card__title-text" }, ca = {
225
245
  key: 0,
226
246
  class: "rc-card__status"
227
- }, Zt = {
247
+ }, da = {
228
248
  key: 1,
229
249
  class: "rc-card__divider"
230
- }, en = {
250
+ }, fa = {
231
251
  key: 2,
232
252
  class: "rc-card__action"
233
- }, tn = /* @__PURE__ */ re({
253
+ }, va = /* @__PURE__ */ oe({
234
254
  name: "rc-card",
235
255
  __name: "index",
236
256
  props: {
@@ -247,85 +267,85 @@ const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card
247
267
  width: { default: "100%" },
248
268
  height: { default: "" }
249
269
  },
250
- setup(e) {
251
- const r = e, m = R(() => {
252
- const d = typeof r.round == "boolean" ? r.round ? "12px" : "0" : typeof r.round == "number" ? `${r.round}px` : String(r.round);
270
+ setup(t) {
271
+ const d = t, n = C(() => {
272
+ const a = typeof d.round == "boolean" ? d.round ? "12px" : "0" : typeof d.round == "number" ? `${d.round}px` : String(d.round);
253
273
  return {
254
- backgroundColor: r.color || "var(--rc-white)",
255
- borderRadius: d,
256
- boxShadow: v(r.elevation),
257
- width: k(r.width),
258
- height: k(r.height)
274
+ backgroundColor: d.color || "var(--rc-white)",
275
+ borderRadius: a,
276
+ boxShadow: v(d.elevation),
277
+ width: i(d.width),
278
+ height: i(d.height)
259
279
  };
260
- }), t = R(() => r.padding || "16px"), g = R(
261
- () => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)
280
+ }), e = C(() => d.padding || "16px"), p = C(
281
+ () => typeof d.gap == "number" ? `${d.gap}px` : String(d.gap)
262
282
  );
263
- function k(d) {
264
- return d == null || d === "" ? "" : typeof d == "number" ? `${d}px` : String(d);
265
- }
266
- function v(d) {
267
- if (!d || d <= 0) return "none";
268
- const o = 4 * d;
269
- return `0 ${Math.round(o / 2)}px ${o}px rgba(0,0,0,0.06), 0 ${Math.round(
270
- o / 4
271
- )}px ${Math.round(o / 2)}px rgba(0,0,0,0.04)`;
272
- }
273
- return (d, o) => (s(), f("div", {
274
- class: j(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
275
- style: le(m.value)
283
+ function i(a) {
284
+ return a == null || a === "" ? "" : typeof a == "number" ? `${a}px` : String(a);
285
+ }
286
+ function v(a) {
287
+ if (!a || a <= 0) return "none";
288
+ const u = 4 * a;
289
+ return `0 ${Math.round(u / 2)}px ${u}px rgba(0,0,0,0.06), 0 ${Math.round(
290
+ u / 4
291
+ )}px ${Math.round(u / 2)}px rgba(0,0,0,0.04)`;
292
+ }
293
+ return (a, u) => (f(), g("div", {
294
+ class: q(["rc-card", [{ "rc-card--bordered": t.bordered }]]),
295
+ style: ie(n.value)
276
296
  }, [
277
- d.$slots.title || e.title || d.$slots.status || e.status ? (s(), f("div", {
297
+ a.$slots.title || t.title || a.$slots.status || t.status ? (f(), g("div", {
278
298
  key: 0,
279
299
  class: "rc-card__top",
280
- style: le({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
300
+ style: ie({ backgroundColor: t.topBgColor || "rgba(29, 133, 252, 0.05)" })
281
301
  }, [
282
- C("div", Jt, [
283
- q(d.$slots, "title", {}, () => [
284
- C("span", Qt, P(e.title), 1)
302
+ T("div", ua, [
303
+ Q(a.$slots, "title", {}, () => [
304
+ T("span", ia, K(t.title), 1)
285
305
  ], !0)
286
306
  ]),
287
- d.$slots.status || e.status ? (s(), f("div", Xt, [
288
- q(d.$slots, "status", {}, () => [
289
- C("span", {
307
+ a.$slots.status || t.status ? (f(), g("div", ca, [
308
+ Q(a.$slots, "status", {}, () => [
309
+ T("span", {
290
310
  class: "rc-card__status-text",
291
- style: le({ color: e.statusColor || "var(--rc-primary)" })
292
- }, P(e.status), 5)
311
+ style: ie({ color: t.statusColor || "var(--rc-primary)" })
312
+ }, K(t.status), 5)
293
313
  ], !0)
294
- ])) : D("", !0)
295
- ], 4)) : D("", !0),
296
- C("div", {
314
+ ])) : E("", !0)
315
+ ], 4)) : E("", !0),
316
+ T("div", {
297
317
  class: "rc-card__body",
298
- style: le({ padding: t.value, gap: g.value })
318
+ style: ie({ padding: e.value, gap: p.value })
299
319
  }, [
300
- q(d.$slots, "content", {}, () => [
301
- q(d.$slots, "default", {}, void 0, !0)
320
+ Q(a.$slots, "content", {}, () => [
321
+ Q(a.$slots, "default", {}, void 0, !0)
302
322
  ], !0)
303
323
  ], 4),
304
- d.$slots.action ? (s(), f("div", Zt)) : D("", !0),
305
- d.$slots.action ? (s(), f("div", en, [
306
- q(d.$slots, "action", {}, void 0, !0)
307
- ])) : D("", !0)
324
+ a.$slots.action ? (f(), g("div", da)) : E("", !0),
325
+ a.$slots.action ? (f(), g("div", fa, [
326
+ Q(a.$slots, "action", {}, void 0, !0)
327
+ ])) : E("", !0)
308
328
  ], 6));
309
329
  }
310
- }), Ze = /* @__PURE__ */ se(tn, [["__scopeId", "data-v-a7b95214"]]);
311
- Ze.name = "rc-card";
312
- const nn = "RcCard";
313
- function yt(e) {
314
- return e.component(Ze.name, Ze), e.component(nn, Ze), e;
330
+ }), rt = /* @__PURE__ */ se(va, [["__scopeId", "data-v-a7b95214"]]);
331
+ rt.name = "rc-card";
332
+ const ma = "RcCard";
333
+ function Dt(t) {
334
+ return t.component(rt.name, rt), t.component(ma, rt), t;
315
335
  }
316
- const an = {
336
+ function Vt(t) {
337
+ return re && (t.component("rc-icon", re), t.component("RcIcon", re)), t;
338
+ }
339
+ const pa = {
317
340
  key: 0,
318
341
  class: "rc-toast__mask"
319
- }, ln = { class: "rc-toast__content" }, on = {
342
+ }, ha = { class: "rc-toast__content" }, ga = {
320
343
  key: 0,
321
344
  class: "rc-toast__spinner"
322
- }, rn = {
323
- key: 1,
324
- class: "rc-toast__icon rc-toast__icon--success"
325
- }, sn = {
345
+ }, ya = {
326
346
  key: 2,
327
347
  class: "rc-toast__icon rc-toast__icon--fail"
328
- }, un = { class: "rc-toast__text" }, cn = /* @__PURE__ */ re({
348
+ }, ba = { class: "rc-toast__text" }, ka = /* @__PURE__ */ oe({
329
349
  __name: "index",
330
350
  props: {
331
351
  message: { default: "" },
@@ -334,155 +354,154 @@ const an = {
334
354
  mask: { type: Boolean, default: !1 },
335
355
  onAfterLeave: {}
336
356
  },
337
- setup(e, { expose: r }) {
338
- const m = e, t = E(!0);
339
- let g;
340
- function k() {
341
- g && (clearTimeout(g), g = null);
357
+ setup(t, { expose: d }) {
358
+ const n = t, e = W(!0);
359
+ let p;
360
+ function i() {
361
+ p && (clearTimeout(p), p = null);
342
362
  }
343
363
  function v() {
344
- k(), t.value = !1;
364
+ i(), e.value = !1;
345
365
  }
346
- return r({ close: v }), nt(() => {
347
- m.duration && m.duration > 0 && (g = setTimeout(() => {
366
+ return d({ close: v }), Je(() => {
367
+ n.duration && n.duration > 0 && (p = setTimeout(() => {
348
368
  v();
349
- }, m.duration));
369
+ }, n.duration));
350
370
  }), at(() => {
351
- k();
352
- }), (d, o) => (s(), f(oe, null, [
353
- (s(), te(it, { to: "body" }, [
354
- G(Ee, {
371
+ i();
372
+ }), (a, u) => (f(), g(ue, null, [
373
+ (f(), ce(yt, { to: "body" }, [
374
+ ae(Pe, {
355
375
  name: "rc-toast-fade",
356
- onAfterLeave: e.onAfterLeave
376
+ onAfterLeave: t.onAfterLeave
357
377
  }, {
358
- default: ae(() => [
359
- t.value ? (s(), f("div", {
378
+ default: fe(() => [
379
+ e.value ? (f(), g("div", {
360
380
  key: 0,
361
- class: j(["rc-toast", [`rc-toast--${e.type}`]])
381
+ class: q(["rc-toast", [`rc-toast--${t.type}`]])
362
382
  }, [
363
- e.mask ? (s(), f("div", an)) : D("", !0),
364
- C("div", ln, [
365
- e.type === "loading" ? (s(), f("div", on)) : e.type === "success" ? (s(), f("div", rn)) : e.type === "fail" ? (s(), f("div", sn)) : D("", !0),
366
- C("div", un, P(e.message), 1)
383
+ t.mask ? (f(), g("div", pa)) : E("", !0),
384
+ T("div", ha, [
385
+ t.type === "loading" ? (f(), g("div", ga)) : t.type === "success" ? (f(), ce(te(re), {
386
+ key: 1,
387
+ name: "icon_select"
388
+ })) : t.type === "fail" ? (f(), g("div", ya)) : E("", !0),
389
+ T("div", ba, K(t.message), 1)
367
390
  ])
368
- ], 2)) : D("", !0)
391
+ ], 2)) : E("", !0)
369
392
  ]),
370
393
  _: 1
371
394
  }, 8, ["onAfterLeave"])
372
395
  ])),
373
- q(d.$slots, "default", {}, void 0, !0)
396
+ Q(a.$slots, "default", {}, void 0, !0)
374
397
  ], 64));
375
398
  }
376
- }), et = /* @__PURE__ */ se(cn, [["__scopeId", "data-v-d234c9c5"]]);
377
- let Te = null, Ye = null;
378
- function ht() {
379
- Te && (Te.unmount(), Te = null), Ye && (document.body.removeChild(Ye), Ye = null);
399
+ }), mt = /* @__PURE__ */ se(ka, [["__scopeId", "data-v-b3e27bda"]]);
400
+ let He = null, je = null;
401
+ function Ct() {
402
+ He && (He.unmount(), He = null), je && (document.body.removeChild(je), je = null);
380
403
  }
381
- function Pa(e) {
382
- const r = typeof e == "string" ? { message: e } : e || {};
383
- ht(), Ye = document.createElement("div"), document.body.appendChild(Ye);
384
- const m = {
385
- message: r.message,
386
- type: r.type ?? "text",
387
- duration: r.duration ?? 2e3,
388
- mask: r.mask ?? !1,
404
+ function wl(t) {
405
+ const d = typeof t == "string" ? { message: t } : t || {};
406
+ Ct(), je = document.createElement("div"), document.body.appendChild(je);
407
+ const n = {
408
+ message: d.message,
409
+ type: d.type ?? "text",
410
+ duration: d.duration ?? 2e3,
411
+ mask: d.mask ?? !1,
389
412
  onAfterLeave: () => {
390
- var t;
391
- ht(), (t = r.onClose) == null || t.call(r);
413
+ var e;
414
+ Ct(), (e = d.onClose) == null || e.call(d);
392
415
  }
393
416
  };
394
- return Te = Bt(et, m), Te.mount(Ye), {
395
- close: dn
417
+ return He = Ut(mt, n), He.mount(je), {
418
+ close: _a
396
419
  };
397
420
  }
398
- function dn() {
399
- var e, r, m;
400
- Te && ((m = (r = (e = Te._instance) == null ? void 0 : e.exposed) == null ? void 0 : r.close) == null || m.call(r));
421
+ function _a() {
422
+ var t, d, n;
423
+ He && ((n = (d = (t = He._instance) == null ? void 0 : t.exposed) == null ? void 0 : d.close) == null || n.call(d));
401
424
  }
402
- et.name = "rc-toast";
403
- function gt(e) {
404
- return e.component(et.name, et), e;
425
+ mt.name = "rc-toast";
426
+ function Rt(t) {
427
+ return t.component(mt.name, mt), t;
405
428
  }
406
- const fn = {
429
+ const wa = {
407
430
  class: "rc-message",
408
431
  role: "alert",
409
432
  "aria-live": "polite"
410
- }, vn = { class: "rc-message__content" }, mn = /* @__PURE__ */ re({
433
+ }, $a = { class: "rc-message__content" }, xa = /* @__PURE__ */ oe({
411
434
  __name: "index",
412
- setup(e, { expose: r }) {
413
- const m = At([]);
414
- let t = 1;
415
- function g(v) {
416
- const d = m.findIndex((o) => o.id === v);
417
- d >= 0 && m.splice(d, 1);
418
- }
419
- function k(v, d, o) {
420
- const p = t++;
421
- return m.push({ id: p, type: v, content: d, duration: o }), o > 0 && window.setTimeout(() => g(p), o), p;
422
- }
423
- return r({ add: k, remove: g }), (v, d) => (s(), f("div", fn, [
424
- G(Ft, {
435
+ setup(t, { expose: d }) {
436
+ const n = qt([]);
437
+ let e = 1;
438
+ function p(v) {
439
+ const a = n.findIndex((u) => u.id === v);
440
+ a >= 0 && n.splice(a, 1);
441
+ }
442
+ function i(v, a, u) {
443
+ const o = e++;
444
+ return n.push({ id: o, type: v, content: a, duration: u }), u > 0 && window.setTimeout(() => p(o), u), o;
445
+ }
446
+ return d({ add: i, remove: p }), (v, a) => (f(), g("div", wa, [
447
+ ae(Kt, {
425
448
  name: "rc-message-fade",
426
449
  tag: "div"
427
450
  }, {
428
- default: ae(() => [
429
- (s(!0), f(oe, null, fe(m, (o) => (s(), f("div", {
430
- key: o.id,
431
- class: j(["rc-message__item", `rc-message--${o.type}`])
451
+ default: fe(() => [
452
+ (f(!0), g(ue, null, ke(n, (u) => (f(), g("div", {
453
+ key: u.id,
454
+ class: q(["rc-message__item", `rc-message--${u.type}`])
432
455
  }, [
433
- C("span", vn, P(o.content), 1)
456
+ T("span", $a, K(u.content), 1)
434
457
  ], 2))), 128))
435
458
  ]),
436
459
  _: 1
437
460
  })
438
461
  ]));
439
462
  }
440
- }), pn = /* @__PURE__ */ se(mn, [["__scopeId", "data-v-87811df0"]]);
441
- let Re = null, Me = null;
442
- function yn() {
443
- var r;
444
- if (Re && Me) return;
445
- Re = document.createElement("div"), document.body.appendChild(Re);
446
- const e = G(pn, {});
447
- It(e, Re), Me = (r = e.component) == null ? void 0 : r.exposed;
463
+ }), Da = /* @__PURE__ */ se(xa, [["__scopeId", "data-v-87811df0"]]);
464
+ let Ne = null, Le = null;
465
+ function Va() {
466
+ var d;
467
+ if (Ne && Le) return;
468
+ Ne = document.createElement("div"), document.body.appendChild(Ne);
469
+ const t = ae(Da, {});
470
+ Pt(t, Ne), Le = (d = t.component) == null ? void 0 : d.exposed;
448
471
  }
449
- function Ae(e, r, m) {
450
- var g;
451
- yn();
452
- const t = typeof m == "number" ? m : e === "loading" ? 0 : 2e3;
453
- return (g = Me == null ? void 0 : Me.add) == null ? void 0 : g.call(Me, e, r, t);
472
+ function Ge(t, d, n) {
473
+ var p;
474
+ Va();
475
+ const e = typeof n == "number" ? n : t === "loading" ? 0 : 2e3;
476
+ return (p = Le == null ? void 0 : Le.add) == null ? void 0 : p.call(Le, t, d, e);
454
477
  }
455
- const hn = {
456
- open(e) {
457
- return Ae(e.type || "info", e.content, e.duration);
478
+ const Ca = {
479
+ open(t) {
480
+ return Ge(t.type || "info", t.content, t.duration);
458
481
  },
459
- info(e, r) {
460
- return Ae("info", e, r);
482
+ info(t, d) {
483
+ return Ge("info", t, d);
461
484
  },
462
- success(e, r) {
463
- return Ae("success", e, r);
485
+ success(t, d) {
486
+ return Ge("success", t, d);
464
487
  },
465
- warning(e, r) {
466
- return Ae("warning", e, r);
488
+ warning(t, d) {
489
+ return Ge("warning", t, d);
467
490
  },
468
- error(e, r) {
469
- return Ae("error", e, r);
491
+ error(t, d) {
492
+ return Ge("error", t, d);
470
493
  },
471
- loading(e, r) {
472
- return Ae("loading", e, r);
494
+ loading(t, d) {
495
+ return Ge("loading", t, d);
473
496
  },
474
497
  destroy() {
475
- Re && (It(null, Re), Re.remove(), Re = null, Me = null);
498
+ Ne && (Pt(null, Ne), Ne.remove(), Ne = null, Le = null);
476
499
  }
477
500
  };
478
- function kt(e) {
479
- return e.config.globalProperties.$message = hn, e;
480
- }
481
- Z.name = "rc-icon";
482
- function bt(e) {
483
- return e.component(Z.name, Z), e.component("RcIcon", Z), e;
501
+ function St(t) {
502
+ return t.config.globalProperties.$message = Ca, t;
484
503
  }
485
- const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
504
+ const Ra = { class: "rc-popup__content" }, Sa = /* @__PURE__ */ oe({
486
505
  name: "rc-popup",
487
506
  __name: "index",
488
507
  props: {
@@ -500,116 +519,116 @@ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
500
519
  lockScroll: { type: Boolean, default: !0 }
501
520
  },
502
521
  emits: ["update:modelValue", "open", "close", "click-overlay"],
503
- setup(e, { expose: r, emit: m }) {
504
- const t = e, g = m, k = E(), v = E(t.modelValue);
505
- Se(
506
- () => t.modelValue,
507
- (u) => {
508
- v.value = u, u ? (g("open"), t.lockScroll && B()) : (g("close"), t.lockScroll && x());
522
+ setup(t, { expose: d, emit: n }) {
523
+ const e = t, p = n, i = W(), v = W(e.modelValue);
524
+ let a = !1;
525
+ function u() {
526
+ a || (a = !0, document.body.style.overflow = "hidden");
527
+ }
528
+ function o() {
529
+ a && (a = !1, document.body.style.overflow = "");
530
+ }
531
+ me(
532
+ () => e.modelValue,
533
+ (l) => {
534
+ v.value = l, l ? (p("open"), e.lockScroll && u()) : (p("close"), e.lockScroll && o());
509
535
  },
510
536
  { immediate: !0 }
511
- ), Se(v, (u) => {
512
- u !== t.modelValue && g("update:modelValue", u);
537
+ ), me(v, (l) => {
538
+ l !== e.modelValue && p("update:modelValue", l);
513
539
  });
514
- const d = R(() => `rc-popup-slide-${t.position}`), o = R(() => ({ ...t.popupStyle || {} }));
515
- let p = !1;
516
- function B() {
517
- p || (p = !0, document.body.style.overflow = "hidden");
518
- }
519
- function x() {
520
- p && (p = !1, document.body.style.overflow = "");
521
- }
522
- function _() {
523
- g("click-overlay"), t.closeOnClickOverlay && A();
540
+ const M = C(() => `rc-popup-slide-${e.position}`), x = C(() => ({ ...e.popupStyle || {} }));
541
+ function k() {
542
+ p("click-overlay"), e.closeOnClickOverlay && L();
524
543
  }
525
- function V() {
526
- A();
544
+ function D() {
545
+ L();
527
546
  }
528
- function A() {
547
+ function L() {
529
548
  v.value = !1;
530
549
  }
531
- function I() {
550
+ function _() {
532
551
  v.value = !0;
533
552
  }
534
553
  return at(() => {
535
- x();
536
- }), r({
537
- open: I,
538
- close: A,
554
+ o();
555
+ }), d({
556
+ open: _,
557
+ close: L,
539
558
  visible: v
540
- }), (u, ve) => (s(), te(it, { to: "body" }, [
541
- G(Ee, { name: "rc-popup-fade" }, {
542
- default: ae(() => [
543
- v.value && t.overlay ? (s(), f("div", {
559
+ }), (l, U) => (f(), ce(yt, { to: "body" }, [
560
+ ae(Pe, { name: "rc-popup-fade" }, {
561
+ default: fe(() => [
562
+ v.value && e.overlay ? (f(), g("div", {
544
563
  key: 0,
545
- class: j(["rc-popup__overlay", { "rc-popup__overlay--transparent": t.overlayClass === "transparent" }]),
546
- style: le(t.overlayStyle),
547
- onClick: _
548
- }, null, 6)) : D("", !0)
564
+ class: q(["rc-popup__overlay", { "rc-popup__overlay--transparent": e.overlayClass === "transparent" }]),
565
+ style: ie(e.overlayStyle),
566
+ onClick: k
567
+ }, null, 6)) : E("", !0)
549
568
  ]),
550
569
  _: 1
551
570
  }),
552
- G(Ee, { name: d.value }, {
553
- default: ae(() => [
554
- v.value ? (s(), f("div", {
571
+ ae(Pe, { name: M.value }, {
572
+ default: fe(() => [
573
+ v.value ? (f(), g("div", {
555
574
  key: 0,
556
575
  ref_key: "popupRef",
557
- ref: k,
558
- class: j(["rc-popup", [
559
- `rc-popup--${e.position}`,
560
- { "rc-popup--round": e.round }
576
+ ref: i,
577
+ class: q(["rc-popup", [
578
+ `rc-popup--${t.position}`,
579
+ { "rc-popup--round": t.round }
561
580
  ]]),
562
- style: le(o.value),
563
- onClick: ve[0] || (ve[0] = Fe(() => {
581
+ style: ie(x.value),
582
+ onClick: U[0] || (U[0] = Ee(() => {
564
583
  }, ["stop"]))
565
584
  }, [
566
- e.closeable ? (s(), f("div", {
585
+ t.closeable ? (f(), g("div", {
567
586
  key: 0,
568
- class: j(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
569
- onClick: V
587
+ class: q(["rc-popup__close", `rc-popup__close--${t.closeIconPosition}`]),
588
+ onClick: D
570
589
  }, [
571
- G(Z, {
572
- name: e.closeIcon,
590
+ ae(re, {
591
+ name: t.closeIcon,
573
592
  class: "rc-popup__close-icon"
574
593
  }, null, 8, ["name"])
575
- ], 2)) : D("", !0),
576
- C("div", gn, [
577
- q(u.$slots, "default", {}, void 0, !0)
594
+ ], 2)) : E("", !0),
595
+ T("div", Ra, [
596
+ Q(l.$slots, "default", {}, void 0, !0)
578
597
  ])
579
- ], 6)) : D("", !0)
598
+ ], 6)) : E("", !0)
580
599
  ]),
581
600
  _: 3
582
601
  }, 8, ["name"])
583
602
  ]));
584
603
  }
585
- }), We = /* @__PURE__ */ se(kn, [["__scopeId", "data-v-f1696784"]]);
586
- We.name = "rc-popup";
587
- const bn = "RcPopup";
588
- function _t(e) {
589
- return e.component(We.name, We), e.component(bn, We), e;
604
+ }), Ye = /* @__PURE__ */ se(Sa, [["__scopeId", "data-v-6face8e9"]]);
605
+ Ye && (Ye.name = "rc-popup");
606
+ const Ma = "RcPopup";
607
+ function Mt(t) {
608
+ return Ye && (t.component(Ye.name || "rc-popup", Ye), t.component(Ma, Ye)), t;
590
609
  }
591
- const _n = {
610
+ const Ba = {
592
611
  key: 0,
593
612
  class: "rc-calendar__header"
594
- }, wn = { class: "rc-calendar__header-title" }, $n = {
613
+ }, Fa = { class: "rc-calendar__header-title" }, Ta = {
595
614
  key: 1,
596
615
  class: "rc-calendar__shortcuts"
597
- }, xn = { class: "rc-calendar__shortcuts-scroll" }, Dn = ["onClick"], Cn = { class: "rc-calendar__month-title" }, Sn = { class: "rc-calendar__weekdays" }, In = { class: "rc-calendar__days" }, Mn = ["onClick"], Rn = { class: "rc-calendar__day-content" }, Vn = { class: "rc-calendar__day-text" }, Tn = {
616
+ }, Aa = { class: "rc-calendar__shortcuts-scroll" }, Ea = ["onClick"], Ia = { class: "rc-calendar__month-title" }, za = { class: "rc-calendar__weekdays" }, La = { class: "rc-calendar__days" }, Na = ["onClick"], Pa = { class: "rc-calendar__day-content" }, Ya = { class: "rc-calendar__day-text" }, Wa = {
598
617
  key: 0,
599
618
  class: "rc-calendar__day-bottom"
600
- }, En = {
619
+ }, Oa = {
601
620
  key: 2,
602
621
  class: "rc-calendar__footer"
603
- }, Bn = {
622
+ }, Ha = {
604
623
  key: 0,
605
624
  class: "rc-calendar__month-picker-overlay"
606
- }, An = { class: "rc-calendar__month-picker" }, Fn = { class: "rc-calendar__month-picker-header" }, zn = { class: "rc-calendar__month-picker-title" }, Yn = { key: 0 }, Ln = {
625
+ }, Ga = { class: "rc-calendar__month-picker" }, Ua = { class: "rc-calendar__month-picker-header" }, qa = { class: "rc-calendar__month-picker-title" }, Ka = { key: 0 }, ja = {
607
626
  key: 0,
608
627
  class: "rc-calendar__year-picker-content"
609
- }, Pn = { class: "rc-calendar__year-picker-grid" }, Nn = ["onClick"], Wn = {
628
+ }, Ja = { class: "rc-calendar__year-picker-grid" }, Qa = ["onClick"], Xa = {
610
629
  key: 1,
611
630
  class: "rc-calendar__month-picker-content"
612
- }, Hn = ["onClick"], Xe = 48, de = 3, ot = 7, On = /* @__PURE__ */ re({
631
+ }, Za = ["onClick"], st = 48, be = 3, gt = 7, en = /* @__PURE__ */ oe({
613
632
  __name: "panel-content",
614
633
  props: {
615
634
  showTitle: { type: Boolean },
@@ -626,244 +645,244 @@ const _n = {
626
645
  maxRangeDays: {}
627
646
  },
628
647
  emits: ["select-day", "clear", "confirm", "shortcut-select"],
629
- setup(e, { expose: r, emit: m }) {
630
- const t = e, g = m, k = ["日", "一", "二", "三", "四", "五", "六"];
631
- function v(a) {
632
- if (!a) return null;
633
- const i = new Date(a);
634
- return isNaN(i.getTime()) ? null : i;
635
- }
636
- function d(a) {
637
- const i = a.getFullYear(), y = String(a.getMonth() + 1).padStart(2, "0"), z = String(a.getDate()).padStart(2, "0");
638
- return `${i}-${y}-${z}`;
639
- }
640
- const o = E(/* @__PURE__ */ new Date());
641
- Se(
642
- () => [t.selectedDate, t.rangeStart],
648
+ setup(t, { expose: d, emit: n }) {
649
+ const e = t, p = n, i = ["日", "一", "二", "三", "四", "五", "六"];
650
+ function v(r) {
651
+ if (!r) return null;
652
+ const b = new Date(r);
653
+ return isNaN(b.getTime()) ? null : b;
654
+ }
655
+ function a(r) {
656
+ const b = r.getFullYear(), V = String(r.getMonth() + 1).padStart(2, "0"), j = String(r.getDate()).padStart(2, "0");
657
+ return `${b}-${V}-${j}`;
658
+ }
659
+ const u = W(/* @__PURE__ */ new Date());
660
+ me(
661
+ () => [e.selectedDate, e.rangeStart],
643
662
  () => {
644
- if (t.range && t.rangeStart) {
645
- const a = v(t.rangeStart);
646
- a && (o.value = a);
647
- } else if (!t.range && t.selectedDate) {
648
- const a = v(t.selectedDate);
649
- a && (o.value = a);
663
+ if (e.range && e.rangeStart) {
664
+ const r = v(e.rangeStart);
665
+ r && (u.value = r);
666
+ } else if (!e.range && e.selectedDate) {
667
+ const r = v(e.selectedDate);
668
+ r && (u.value = r);
650
669
  }
651
670
  },
652
671
  { immediate: !0 }
653
672
  );
654
- function p(a) {
655
- const i = /* @__PURE__ */ new Date();
656
- return a.getFullYear() === i.getFullYear() && a.getMonth() === i.getMonth() && a.getDate() === i.getDate();
673
+ function o(r) {
674
+ const b = /* @__PURE__ */ new Date();
675
+ return r.getFullYear() === b.getFullYear() && r.getMonth() === b.getMonth() && r.getDate() === b.getDate();
657
676
  }
658
- function B(a) {
659
- if (!t.rangeStart || !t.rangeEnd) return !1;
660
- const i = d(a), y = t.rangeStart, z = t.rangeEnd;
661
- return i > y && i < z;
677
+ function M(r) {
678
+ if (!e.rangeStart || !e.rangeEnd) return !1;
679
+ const b = a(r), V = e.rangeStart, j = e.rangeEnd;
680
+ return b > V && b < j;
662
681
  }
663
- function x(a) {
664
- if (t.disabledDate && t.disabledDate(a))
682
+ function x(r) {
683
+ if (e.disabledDate && e.disabledDate(r))
665
684
  return !0;
666
- const i = d(a);
667
- return !!(t.minDate && i < t.minDate || t.maxDate && i > t.maxDate);
668
- }
669
- function _(a, i) {
670
- const y = new Date(a, i, 1), z = new Date(a, i + 1, 0), W = y.getDay(), ke = z.getDate(), be = [], dt = new Date(a, i, 0).getDate();
671
- for (let ue = W - 1; ue >= 0; ue--) {
672
- const ie = {
673
- date: new Date(a, i - 1, dt - ue),
685
+ const b = a(r);
686
+ return !!(e.minDate && b < e.minDate || e.maxDate && b > e.maxDate);
687
+ }
688
+ function k(r, b) {
689
+ const V = new Date(r, b, 1), j = new Date(r, b + 1, 0), Z = V.getDay(), Ve = j.getDate(), Ce = [], kt = new Date(r, b, 0).getDate();
690
+ for (let he = Z - 1; he >= 0; he--) {
691
+ const ge = {
692
+ date: new Date(r, b - 1, kt - he),
674
693
  type: "prev-month",
675
- text: String(dt - ue)
694
+ text: String(kt - he)
676
695
  };
677
- if (t.formatter) {
678
- const ce = t.formatter(ie);
679
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
696
+ if (e.formatter) {
697
+ const ye = e.formatter(ge);
698
+ ye.text && (ge.text = ye.text), ye.bottomInfo && (ge.bottomInfo = ye.bottomInfo);
680
699
  }
681
- be.push(ie);
700
+ Ce.push(ge);
682
701
  }
683
- for (let ue = 1; ue <= ke; ue++) {
684
- const ie = {
685
- date: new Date(a, i, ue),
702
+ for (let he = 1; he <= Ve; he++) {
703
+ const ge = {
704
+ date: new Date(r, b, he),
686
705
  type: "current-month",
687
- text: String(ue)
706
+ text: String(he)
688
707
  };
689
- if (t.formatter) {
690
- const ce = t.formatter(ie);
691
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
708
+ if (e.formatter) {
709
+ const ye = e.formatter(ge);
710
+ ye.text && (ge.text = ye.text), ye.bottomInfo && (ge.bottomInfo = ye.bottomInfo);
692
711
  }
693
- be.push(ie);
712
+ Ce.push(ge);
694
713
  }
695
- const Tt = 42 - be.length;
696
- for (let ue = 1; ue <= Tt; ue++) {
697
- const ie = {
698
- date: new Date(a, i + 1, ue),
714
+ const Ht = 42 - Ce.length;
715
+ for (let he = 1; he <= Ht; he++) {
716
+ const ge = {
717
+ date: new Date(r, b + 1, he),
699
718
  type: "next-month",
700
- text: String(ue)
719
+ text: String(he)
701
720
  };
702
- if (t.formatter) {
703
- const ce = t.formatter(ie);
704
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
721
+ if (e.formatter) {
722
+ const ye = e.formatter(ge);
723
+ ye.text && (ge.text = ye.text), ye.bottomInfo && (ge.bottomInfo = ye.bottomInfo);
705
724
  }
706
- be.push(ie);
725
+ Ce.push(ge);
707
726
  }
708
- return be;
709
- }
710
- const V = R(() => {
711
- const a = o.value.getFullYear(), i = o.value.getMonth();
712
- return _(a, i);
713
- }), A = R(() => {
714
- const a = o.value.getFullYear(), i = o.value.getMonth() + 1;
715
- return `${a}年${i}月`;
727
+ return Ce;
728
+ }
729
+ const D = C(() => {
730
+ const r = u.value.getFullYear(), b = u.value.getMonth();
731
+ return k(r, b);
732
+ }), L = C(() => {
733
+ const r = u.value.getFullYear(), b = u.value.getMonth() + 1;
734
+ return `${r}年${b}月`;
716
735
  });
717
- function I(a) {
718
- const i = [];
719
- if (a.type !== "current-month" && i.push("is-other-month"), p(a.date) && i.push("is-today"), x(a.date))
720
- return i.push("is-disabled"), i;
721
- const y = d(a.date);
722
- return t.range ? (t.rangeStart === y && i.push("is-start"), t.rangeEnd === y && i.push("is-end"), B(a.date) && i.push("is-in-range")) : t.selectedDate === y && i.push("is-selected"), i;
723
- }
724
- const u = R(() => !!(t.rangeStart && t.rangeEnd)), ve = R(() => t.rangeStart && t.rangeEnd ? 2 : t.rangeStart || t.rangeEnd ? 1 : 0);
725
- function ye(a) {
726
- if (!t.minDate && !t.maxDate)
736
+ function _(r) {
737
+ const b = [];
738
+ if (r.type !== "current-month" && b.push("is-other-month"), o(r.date) && b.push("is-today"), x(r.date))
739
+ return b.push("is-disabled"), b;
740
+ const V = a(r.date);
741
+ return e.range ? (e.rangeStart === V && b.push("is-start"), e.rangeEnd === V && b.push("is-end"), M(r.date) && b.push("is-in-range")) : e.selectedDate === V && b.push("is-selected"), b;
742
+ }
743
+ const l = C(() => !!(e.rangeStart && e.rangeEnd)), U = C(() => e.rangeStart && e.rangeEnd ? 2 : e.rangeStart || e.rangeEnd ? 1 : 0);
744
+ function Y(r) {
745
+ if (!e.minDate && !e.maxDate)
727
746
  return !1;
728
- const i = t.minDate ? v(t.minDate) : null, y = t.maxDate ? v(t.maxDate) : null;
729
- return !!(i && a < i.getFullYear() || y && a > y.getFullYear());
730
- }
731
- function he(a, i) {
732
- const y = t.minDate ? v(t.minDate) : null, z = t.maxDate ? v(t.maxDate) : null;
733
- if (y) {
734
- const W = y.getFullYear(), ke = y.getMonth() + 1;
735
- if (a < W || a === W && i < ke)
747
+ const b = e.minDate ? v(e.minDate) : null, V = e.maxDate ? v(e.maxDate) : null;
748
+ return !!(b && r < b.getFullYear() || V && r > V.getFullYear());
749
+ }
750
+ function c(r, b) {
751
+ const V = e.minDate ? v(e.minDate) : null, j = e.maxDate ? v(e.maxDate) : null;
752
+ if (V) {
753
+ const Z = V.getFullYear(), Ve = V.getMonth() + 1;
754
+ if (r < Z || r === Z && b < Ve)
736
755
  return !0;
737
756
  }
738
- if (z) {
739
- const W = z.getFullYear(), ke = z.getMonth() + 1;
740
- if (a > W || a === W && i > ke)
757
+ if (j) {
758
+ const Z = j.getFullYear(), Ve = j.getMonth() + 1;
759
+ if (r > Z || r === Z && b > Ve)
741
760
  return !0;
742
761
  }
743
762
  return !1;
744
763
  }
745
- const H = E(!1), N = E("year"), O = E(o.value.getFullYear()), F = E(o.value.getMonth() + 1), U = E(), S = E(1900), T = E(1920), M = E(1900), Y = E(2100), me = R(() => {
746
- const a = [], y = Math.floor((S.value - M.value) / de) - 3, z = Math.ceil((T.value - M.value) / de) + 3, W = M.value + Math.max(0, y) * de, ke = M.value + z * de - 1;
747
- for (let be = W; be <= ke; be++)
748
- a.push(be);
749
- return a;
764
+ const R = W(!1), y = W("year"), $ = W(u.value.getFullYear()), S = W(u.value.getMonth() + 1), F = W(), A = W(1900), H = W(1920), z = W(1900), G = W(2100), pe = C(() => {
765
+ const r = [], V = Math.floor((A.value - z.value) / be) - 3, j = Math.ceil((H.value - z.value) / be) + 3, Z = z.value + Math.max(0, V) * be, Ve = z.value + j * be - 1;
766
+ for (let Ce = Z; Ce <= Ve; Ce++)
767
+ r.push(Ce);
768
+ return r;
750
769
  });
751
- Se(() => o.value, (a) => {
752
- O.value = a.getFullYear(), F.value = a.getMonth() + 1;
770
+ me(() => u.value, (r) => {
771
+ $.value = r.getFullYear(), S.value = r.getMonth() + 1;
753
772
  }, { immediate: !0 });
754
- function ge() {
755
- if (!U.value) return;
756
- const a = U.value.scrollTop, y = Math.max(0, Math.floor(a / Xe)), z = M.value + y * de, W = z + ot * de - 1;
757
- z < M.value ? M.value = z - 100 : W > Y.value && (Y.value = W + 100), (z !== S.value || W !== T.value) && (S.value = z, T.value = W);
758
- }
759
- function we() {
760
- O.value = o.value.getFullYear(), F.value = o.value.getMonth() + 1, N.value = "year", H.value = !0;
761
- const a = O.value;
762
- a < M.value ? M.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99), Be(() => {
763
- if (U.value) {
764
- const i = Math.floor((a - M.value) / de), y = Math.max(0, i - 2);
765
- S.value = M.value + y * de, T.value = S.value + ot * de - 1, $e(a);
773
+ function $e() {
774
+ if (!F.value) return;
775
+ const r = F.value.scrollTop, V = Math.max(0, Math.floor(r / st)), j = z.value + V * be, Z = j + gt * be - 1;
776
+ j < z.value ? z.value = j - 100 : Z > G.value && (G.value = Z + 100), (j !== A.value || Z !== H.value) && (A.value = j, H.value = Z);
777
+ }
778
+ function Re() {
779
+ $.value = u.value.getFullYear(), S.value = u.value.getMonth() + 1, y.value = "year", R.value = !0;
780
+ const r = $.value;
781
+ r < z.value ? z.value = Math.floor(r / 100) * 100 : r > G.value && (G.value = Math.ceil(r / 100) * 100 + 99), Ie(() => {
782
+ if (F.value) {
783
+ const b = Math.floor((r - z.value) / be), V = Math.max(0, b - 2);
784
+ A.value = z.value + V * be, H.value = A.value + gt * be - 1, Fe(r);
766
785
  }
767
786
  });
768
787
  }
769
- function $e(a) {
770
- if (!U.value) return;
771
- a < M.value ? M.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99);
772
- const i = Math.floor((a - M.value) / de), y = i * Xe;
773
- U.value.scrollTop = y;
774
- const z = Math.max(0, i - 2);
775
- S.value = M.value + z * de, T.value = S.value + ot * de - 1;
788
+ function Fe(r) {
789
+ if (!F.value) return;
790
+ r < z.value ? z.value = Math.floor(r / 100) * 100 : r > G.value && (G.value = Math.ceil(r / 100) * 100 + 99);
791
+ const b = Math.floor((r - z.value) / be), V = b * st;
792
+ F.value.scrollTop = V;
793
+ const j = Math.max(0, b - 2);
794
+ A.value = z.value + j * be, H.value = A.value + gt * be - 1;
776
795
  }
777
- function b() {
778
- const a = new Date(o.value);
779
- a.setMonth(a.getMonth() - 1), o.value = a;
796
+ function I() {
797
+ const r = new Date(u.value);
798
+ r.setMonth(r.getMonth() - 1), u.value = r;
780
799
  }
781
- function w() {
782
- const a = new Date(o.value);
783
- a.setMonth(a.getMonth() + 1), o.value = a;
800
+ function N() {
801
+ const r = new Date(u.value);
802
+ r.setMonth(r.getMonth() + 1), u.value = r;
784
803
  }
785
- function L(a) {
786
- ye(a) || (O.value = a, N.value = "month");
804
+ function X(r) {
805
+ Y(r) || ($.value = r, y.value = "month");
787
806
  }
788
- function ee(a) {
789
- he(O.value, a) || (F.value = a, h());
807
+ function de(r) {
808
+ c($.value, r) || (S.value = r, _e());
790
809
  }
791
- function h() {
792
- const a = new Date(o.value);
793
- a.setFullYear(O.value), a.setMonth(F.value - 1), o.value = a, H.value = !1, N.value = "year";
810
+ function _e() {
811
+ const r = new Date(u.value);
812
+ r.setFullYear($.value), r.setMonth(S.value - 1), u.value = r, R.value = !1, y.value = "year";
794
813
  }
795
- function X(a) {
796
- g("select-day", a);
814
+ function xe(r) {
815
+ p("select-day", r);
797
816
  }
798
- function ne() {
799
- g("clear");
817
+ function Se() {
818
+ p("clear");
800
819
  }
801
- function n() {
802
- pe.value && ne();
820
+ function s() {
821
+ h.value && Se();
803
822
  }
804
- function l() {
805
- g("confirm");
823
+ function m() {
824
+ p("confirm");
806
825
  }
807
- function c() {
808
- H.value = !1;
826
+ function w() {
827
+ R.value = !1;
809
828
  }
810
- function $(a) {
811
- N.value = a;
829
+ function P(r) {
830
+ y.value = r;
812
831
  }
813
- function J() {
814
- const i = (/* @__PURE__ */ new Date()).getFullYear();
815
- ye(i) || (O.value = i, N.value = "month");
832
+ function ne() {
833
+ const b = (/* @__PURE__ */ new Date()).getFullYear();
834
+ Y(b) || ($.value = b, y.value = "month");
816
835
  }
817
- function K() {
818
- const i = (/* @__PURE__ */ new Date()).getMonth() + 1;
819
- he(O.value, i) || (F.value = i, h());
836
+ function ee() {
837
+ const b = (/* @__PURE__ */ new Date()).getMonth() + 1;
838
+ c($.value, b) || (S.value = b, _e());
820
839
  }
821
- const pe = R(() => t.range ? !!(t.rangeStart || t.rangeEnd) : !!t.selectedDate);
822
- function Ie(a, i) {
823
- const y = v(a), z = v(i);
824
- if (!y || !z) return 0;
825
- const W = Math.abs(z.getTime() - y.getTime());
826
- return Math.ceil(W / (1e3 * 60 * 60 * 24)) + 1;
840
+ const h = C(() => e.range ? !!(e.rangeStart || e.rangeEnd) : !!e.selectedDate);
841
+ function O(r, b) {
842
+ const V = v(r), j = v(b);
843
+ if (!V || !j) return 0;
844
+ const Z = Math.abs(j.getTime() - V.getTime());
845
+ return Math.ceil(Z / (1e3 * 60 * 60 * 24)) + 1;
827
846
  }
828
- function De() {
829
- return d(/* @__PURE__ */ new Date());
847
+ function B() {
848
+ return a(/* @__PURE__ */ new Date());
830
849
  }
831
- function Le() {
832
- const a = /* @__PURE__ */ new Date(), i = a.getDay(), y = a.getDate() - i + (i === 0 ? -6 : 1);
833
- return new Date(a.getFullYear(), a.getMonth(), y);
850
+ function J() {
851
+ const r = /* @__PURE__ */ new Date(), b = r.getDay(), V = r.getDate() - b + (b === 0 ? -6 : 1);
852
+ return new Date(r.getFullYear(), r.getMonth(), V);
834
853
  }
835
- function Oe() {
836
- const a = Le(), i = new Date(a);
837
- return i.setDate(a.getDate() + 6), i;
854
+ function Me() {
855
+ const r = J(), b = new Date(r);
856
+ return b.setDate(r.getDate() + 6), b;
838
857
  }
839
- function Ue() {
840
- const a = /* @__PURE__ */ new Date();
841
- return new Date(a.getFullYear(), a.getMonth(), 1);
858
+ function Te() {
859
+ const r = /* @__PURE__ */ new Date();
860
+ return new Date(r.getFullYear(), r.getMonth(), 1);
842
861
  }
843
- function Pe() {
844
- const a = /* @__PURE__ */ new Date();
845
- return new Date(a.getFullYear(), a.getMonth() + 1, 0);
862
+ function Be() {
863
+ const r = /* @__PURE__ */ new Date();
864
+ return new Date(r.getFullYear(), r.getMonth() + 1, 0);
846
865
  }
847
- function Ke() {
848
- const a = /* @__PURE__ */ new Date();
849
- return new Date(a.getFullYear(), a.getMonth() - 2, 1);
866
+ function Qe() {
867
+ const r = /* @__PURE__ */ new Date();
868
+ return new Date(r.getFullYear(), r.getMonth() - 2, 1);
850
869
  }
851
- function je() {
852
- const a = /* @__PURE__ */ new Date();
853
- return new Date(a.getFullYear(), 0, 1);
870
+ function Ae() {
871
+ const r = /* @__PURE__ */ new Date();
872
+ return new Date(r.getFullYear(), 0, 1);
854
873
  }
855
- function Ge() {
856
- const a = /* @__PURE__ */ new Date();
857
- return new Date(a.getFullYear(), 11, 31);
874
+ function ze() {
875
+ const r = /* @__PURE__ */ new Date();
876
+ return new Date(r.getFullYear(), 11, 31);
858
877
  }
859
- const qe = [
878
+ const nt = [
860
879
  {
861
880
  key: "today",
862
881
  label: "本日",
863
882
  days: 1,
864
883
  getRange: () => {
865
- const a = De();
866
- return [a, a];
884
+ const r = B();
885
+ return [r, r];
867
886
  }
868
887
  },
869
888
  {
@@ -871,32 +890,32 @@ const _n = {
871
890
  label: "本周",
872
891
  days: 7,
873
892
  getRange: () => {
874
- const a = d(Le()), i = d(Oe());
875
- return [a, i];
893
+ const r = a(J()), b = a(Me());
894
+ return [r, b];
876
895
  }
877
896
  },
878
897
  {
879
898
  key: "month",
880
899
  label: "本月",
881
900
  getRange: () => {
882
- const a = d(Ue()), i = d(Pe());
883
- return [a, i];
901
+ const r = a(Te()), b = a(Be());
902
+ return [r, b];
884
903
  }
885
904
  },
886
905
  {
887
906
  key: "threeMonths",
888
907
  label: "近三月",
889
908
  getRange: () => {
890
- const a = d(Ke()), i = d(Pe());
891
- return [a, i];
909
+ const r = a(Qe()), b = a(Be());
910
+ return [r, b];
892
911
  }
893
912
  },
894
913
  {
895
914
  key: "year",
896
915
  label: "本年",
897
916
  getRange: () => {
898
- const a = d(je()), i = d(Ge());
899
- return [a, i];
917
+ const r = a(Ae()), b = a(ze());
918
+ return [r, b];
900
919
  }
901
920
  },
902
921
  {
@@ -904,8 +923,8 @@ const _n = {
904
923
  label: "近7天",
905
924
  days: 7,
906
925
  getRange: () => {
907
- const a = /* @__PURE__ */ new Date(), i = new Date(a);
908
- return i.setDate(a.getDate() - 6), [d(i), De()];
926
+ const r = /* @__PURE__ */ new Date(), b = new Date(r);
927
+ return b.setDate(r.getDate() - 6), [a(b), B()];
909
928
  }
910
929
  },
911
930
  {
@@ -913,213 +932,213 @@ const _n = {
913
932
  label: "近30天",
914
933
  days: 30,
915
934
  getRange: () => {
916
- const a = /* @__PURE__ */ new Date(), i = new Date(a);
917
- return i.setDate(a.getDate() - 29), [d(i), De()];
935
+ const r = /* @__PURE__ */ new Date(), b = new Date(r);
936
+ return b.setDate(r.getDate() - 29), [a(b), B()];
918
937
  }
919
938
  }
920
- ], Je = R(() => qe.filter((a) => {
921
- if (t.maxRangeDays !== void 0) {
922
- if (a.days !== void 0)
923
- return a.days <= t.maxRangeDays;
939
+ ], lt = C(() => nt.filter((r) => {
940
+ if (e.maxRangeDays !== void 0) {
941
+ if (r.days !== void 0)
942
+ return r.days <= e.maxRangeDays;
924
943
  {
925
- const i = a.getRange();
926
- if (i)
927
- return Ie(i[0], i[1]) <= t.maxRangeDays;
944
+ const b = r.getRange();
945
+ if (b)
946
+ return O(b[0], b[1]) <= e.maxRangeDays;
928
947
  }
929
948
  }
930
949
  return !0;
931
950
  }));
932
- function Qe(a) {
933
- const i = a.getRange();
934
- if (i) {
935
- if (t.minDate && i[0] < t.minDate || t.maxDate && i[1] > t.maxDate)
951
+ function ot(r) {
952
+ const b = r.getRange();
953
+ if (b) {
954
+ if (e.minDate && b[0] < e.minDate || e.maxDate && b[1] > e.maxDate)
936
955
  return;
937
- g("shortcut-select", i);
956
+ p("shortcut-select", b);
938
957
  }
939
958
  }
940
- return r({
941
- yearScrollRef: U
942
- }), (a, i) => (s(), f("div", null, [
943
- e.showTitle ? (s(), f("div", _n, [
944
- C("div", wn, P(e.title), 1),
945
- C("span", {
946
- class: j(["rc-calendar__header-clear", { "is-disabled": !pe.value }]),
947
- onClick: n
959
+ return d({
960
+ yearScrollRef: F
961
+ }), (r, b) => (f(), g("div", null, [
962
+ t.showTitle ? (f(), g("div", Ba, [
963
+ T("div", Fa, K(t.title), 1),
964
+ T("span", {
965
+ class: q(["rc-calendar__header-clear", { "is-disabled": !h.value }]),
966
+ onClick: s
948
967
  }, " 清空 ", 2)
949
- ])) : D("", !0),
950
- e.range ? (s(), f("div", $n, [
951
- C("div", xn, [
952
- (s(!0), f(oe, null, fe(Je.value, (y) => (s(), f("div", {
953
- key: y.key,
968
+ ])) : E("", !0),
969
+ t.range ? (f(), g("div", Ta, [
970
+ T("div", Aa, [
971
+ (f(!0), g(ue, null, ke(lt.value, (V) => (f(), g("div", {
972
+ key: V.key,
954
973
  class: "rc-calendar__shortcut-item",
955
- onClick: (z) => Qe(y)
956
- }, P(y.label), 9, Dn))), 128))
974
+ onClick: (j) => ot(V)
975
+ }, K(V.label), 9, Ea))), 128))
957
976
  ])
958
- ])) : D("", !0),
959
- C("div", Cn, [
960
- C("div", {
977
+ ])) : E("", !0),
978
+ T("div", Ia, [
979
+ T("div", {
961
980
  class: "rc-calendar__nav-button",
962
- onClick: b
981
+ onClick: I
963
982
  }, [
964
- G(Q(Z), {
983
+ ae(te(re), {
965
984
  name: "icon_caret-left",
966
985
  class: "rc-calendar__nav-icon"
967
986
  })
968
987
  ]),
969
- C("div", {
988
+ T("div", {
970
989
  class: "rc-calendar__month-text",
971
- onClick: we
972
- }, P(A.value), 1),
973
- C("div", {
990
+ onClick: Re
991
+ }, K(L.value), 1),
992
+ T("div", {
974
993
  class: "rc-calendar__nav-button",
975
- onClick: w
994
+ onClick: N
976
995
  }, [
977
- G(Q(Z), {
996
+ ae(te(re), {
978
997
  name: "icon_caret-right",
979
998
  class: "rc-calendar__nav-icon"
980
999
  })
981
1000
  ])
982
1001
  ]),
983
- C("div", Sn, [
984
- (s(), f(oe, null, fe(k, (y) => C("div", {
985
- key: y,
1002
+ T("div", za, [
1003
+ (f(), g(ue, null, ke(i, (V) => T("div", {
1004
+ key: V,
986
1005
  class: "rc-calendar__weekday"
987
- }, P(y), 1)), 64))
1006
+ }, K(V), 1)), 64))
988
1007
  ]),
989
- C("div", In, [
990
- (s(!0), f(oe, null, fe(V.value, (y, z) => (s(), f("div", {
991
- key: z,
992
- class: j(["rc-calendar__day", I(y)]),
993
- onClick: (W) => X(y)
1008
+ T("div", La, [
1009
+ (f(!0), g(ue, null, ke(D.value, (V, j) => (f(), g("div", {
1010
+ key: j,
1011
+ class: q(["rc-calendar__day", _(V)]),
1012
+ onClick: (Z) => xe(V)
994
1013
  }, [
995
- C("div", Rn, [
996
- C("span", Vn, P(y.text), 1),
997
- y.bottomInfo ? (s(), f("span", Tn, P(y.bottomInfo), 1)) : D("", !0)
1014
+ T("div", Pa, [
1015
+ T("span", Ya, K(V.text), 1),
1016
+ V.bottomInfo ? (f(), g("span", Wa, K(V.bottomInfo), 1)) : E("", !0)
998
1017
  ])
999
- ], 10, Mn))), 128))
1018
+ ], 10, Na))), 128))
1000
1019
  ]),
1001
- e.range && e.showFooter ? (s(), f("div", En, [
1002
- G(Q(xe), {
1020
+ t.range && t.showFooter ? (f(), g("div", Oa, [
1021
+ ae(te(De), {
1003
1022
  type: "default",
1004
1023
  class: "rc-calendar__footer-reset",
1005
- onClick: ne
1024
+ onClick: Se
1006
1025
  }, {
1007
- default: ae(() => [...i[2] || (i[2] = [
1008
- _e("取消", -1)
1026
+ default: fe(() => [...b[2] || (b[2] = [
1027
+ ve("取消", -1)
1009
1028
  ])]),
1010
1029
  _: 1
1011
1030
  }),
1012
- G(Q(xe), {
1031
+ ae(te(De), {
1013
1032
  type: "primary",
1014
1033
  class: "rc-calendar__footer-confirm",
1015
- disabled: !u.value,
1016
- onClick: l
1034
+ disabled: !l.value,
1035
+ onClick: m
1017
1036
  }, {
1018
- default: ae(() => [
1019
- _e(P(u.value ? `确定(${ve.value}项)` : "确定"), 1)
1037
+ default: fe(() => [
1038
+ ve(K(l.value ? `确定(${U.value}项)` : "确定"), 1)
1020
1039
  ]),
1021
1040
  _: 1
1022
1041
  }, 8, ["disabled"])
1023
- ])) : D("", !0),
1024
- G(Ee, { name: "rc-calendar-fade" }, {
1025
- default: ae(() => [
1026
- H.value ? (s(), f("div", Bn, [
1027
- C("div", An, [
1028
- C("div", Fn, [
1029
- G(Q(xe), {
1042
+ ])) : E("", !0),
1043
+ ae(Pe, { name: "rc-calendar-fade" }, {
1044
+ default: fe(() => [
1045
+ R.value ? (f(), g("div", Ha, [
1046
+ T("div", Ga, [
1047
+ T("div", Ua, [
1048
+ ae(te(De), {
1030
1049
  type: "default",
1031
1050
  mode: "text",
1032
1051
  size: "small",
1033
- onClick: c
1052
+ onClick: w
1034
1053
  }, {
1035
- default: ae(() => [...i[3] || (i[3] = [
1036
- _e("取消", -1)
1054
+ default: fe(() => [...b[3] || (b[3] = [
1055
+ ve("取消", -1)
1037
1056
  ])]),
1038
1057
  _: 1
1039
1058
  }),
1040
- C("div", zn, [
1041
- C("span", {
1042
- onClick: i[0] || (i[0] = (y) => $("year"))
1043
- }, P(O.value) + "年", 1),
1044
- N.value === "month" ? (s(), f("span", Yn, " - ")) : D("", !0),
1045
- N.value === "month" ? (s(), f("span", {
1059
+ T("div", qa, [
1060
+ T("span", {
1061
+ onClick: b[0] || (b[0] = (V) => P("year"))
1062
+ }, K($.value) + "年", 1),
1063
+ y.value === "month" ? (f(), g("span", Ka, " - ")) : E("", !0),
1064
+ y.value === "month" ? (f(), g("span", {
1046
1065
  key: 1,
1047
- onClick: i[1] || (i[1] = (y) => $("month"))
1048
- }, P(F.value) + "月", 1)) : D("", !0)
1066
+ onClick: b[1] || (b[1] = (V) => P("month"))
1067
+ }, K(S.value) + "月", 1)) : E("", !0)
1049
1068
  ]),
1050
- N.value === "year" ? (s(), te(Q(xe), {
1069
+ y.value === "year" ? (f(), ce(te(De), {
1051
1070
  key: 0,
1052
1071
  type: "primary",
1053
1072
  mode: "text",
1054
1073
  size: "small",
1055
- onClick: J
1074
+ onClick: ne
1056
1075
  }, {
1057
- default: ae(() => [...i[4] || (i[4] = [
1058
- _e(" 本年 ", -1)
1076
+ default: fe(() => [...b[4] || (b[4] = [
1077
+ ve(" 本年 ", -1)
1059
1078
  ])]),
1060
1079
  _: 1
1061
- })) : D("", !0),
1062
- N.value === "month" ? (s(), te(Q(xe), {
1080
+ })) : E("", !0),
1081
+ y.value === "month" ? (f(), ce(te(De), {
1063
1082
  key: 1,
1064
1083
  type: "primary",
1065
1084
  mode: "text",
1066
1085
  size: "small",
1067
- onClick: K
1086
+ onClick: ee
1068
1087
  }, {
1069
- default: ae(() => [...i[5] || (i[5] = [
1070
- _e(" 本月 ", -1)
1088
+ default: fe(() => [...b[5] || (b[5] = [
1089
+ ve(" 本月 ", -1)
1071
1090
  ])]),
1072
1091
  _: 1
1073
- })) : D("", !0)
1092
+ })) : E("", !0)
1074
1093
  ]),
1075
- N.value === "year" ? (s(), f("div", Ln, [
1076
- C("div", {
1094
+ y.value === "year" ? (f(), g("div", ja, [
1095
+ T("div", {
1077
1096
  class: "rc-calendar__year-picker-scroll",
1078
1097
  ref_key: "yearScrollRef",
1079
- ref: U,
1080
- onScroll: ge
1098
+ ref: F,
1099
+ onScroll: $e
1081
1100
  }, [
1082
- C("div", {
1101
+ T("div", {
1083
1102
  class: "rc-calendar__year-picker-spacer",
1084
- style: le({ height: `${Math.floor((S.value - M.value) / de) * Xe}px` })
1103
+ style: ie({ height: `${Math.floor((A.value - z.value) / be) * st}px` })
1085
1104
  }, null, 4),
1086
- C("div", Pn, [
1087
- (s(!0), f(oe, null, fe(me.value, (y) => (s(), f("div", {
1088
- key: y,
1089
- class: j(["rc-calendar__year-picker-item", {
1090
- "is-selected": O.value === y,
1091
- "is-disabled": ye(y)
1105
+ T("div", Ja, [
1106
+ (f(!0), g(ue, null, ke(pe.value, (V) => (f(), g("div", {
1107
+ key: V,
1108
+ class: q(["rc-calendar__year-picker-item", {
1109
+ "is-selected": $.value === V,
1110
+ "is-disabled": Y(V)
1092
1111
  }]),
1093
- onClick: (z) => L(y)
1094
- }, P(y), 11, Nn))), 128))
1112
+ onClick: (j) => X(V)
1113
+ }, K(V), 11, Qa))), 128))
1095
1114
  ]),
1096
- C("div", {
1115
+ T("div", {
1097
1116
  class: "rc-calendar__year-picker-spacer",
1098
- style: le({ height: `${Math.ceil((Y.value - T.value) / de) * Xe}px` })
1117
+ style: ie({ height: `${Math.ceil((G.value - H.value) / be) * st}px` })
1099
1118
  }, null, 4)
1100
1119
  ], 544)
1101
- ])) : D("", !0),
1102
- N.value === "month" ? (s(), f("div", Wn, [
1103
- (s(), f(oe, null, fe(12, (y) => C("div", {
1104
- key: y,
1105
- class: j(["rc-calendar__month-picker-item", {
1106
- "is-selected": F.value === y,
1107
- "is-disabled": he(O.value, y)
1120
+ ])) : E("", !0),
1121
+ y.value === "month" ? (f(), g("div", Xa, [
1122
+ (f(), g(ue, null, ke(12, (V) => T("div", {
1123
+ key: V,
1124
+ class: q(["rc-calendar__month-picker-item", {
1125
+ "is-selected": S.value === V,
1126
+ "is-disabled": c($.value, V)
1108
1127
  }]),
1109
- onClick: (z) => ee(y)
1110
- }, P(y) + "月 ", 11, Hn)), 64))
1111
- ])) : D("", !0)
1128
+ onClick: (j) => de(V)
1129
+ }, K(V) + "月 ", 11, Za)), 64))
1130
+ ])) : E("", !0)
1112
1131
  ])
1113
- ])) : D("", !0)
1132
+ ])) : E("", !0)
1114
1133
  ]),
1115
1134
  _: 1
1116
1135
  })
1117
1136
  ]));
1118
1137
  }
1119
- }), wt = /* @__PURE__ */ se(On, [["__scopeId", "data-v-0bf1834b"]]), Un = { class: "rc-calendar" }, Kn = ["placeholder"], jn = { class: "rc-calendar__input-actions" }, Gn = {
1138
+ }), Bt = /* @__PURE__ */ se(en, [["__scopeId", "data-v-0bf1834b"]]), tn = { class: "rc-calendar" }, an = ["placeholder"], nn = { class: "rc-calendar__input-actions" }, ln = {
1120
1139
  key: 1,
1121
1140
  class: "rc-calendar__panel"
1122
- }, qn = /* @__PURE__ */ re({
1141
+ }, on = /* @__PURE__ */ oe({
1123
1142
  name: "rc-calendar",
1124
1143
  __name: "index",
1125
1144
  props: {
@@ -1137,190 +1156,190 @@ const _n = {
1137
1156
  endDateOffset: { type: Boolean, default: !1 }
1138
1157
  },
1139
1158
  emits: ["update:modelValue", "change", "confirm"],
1140
- setup(e, { emit: r }) {
1141
- const m = e, t = r, g = E(), k = E(), v = E(!1), d = E(""), o = R(() => m.range === !0 || typeof m.range == "number"), p = R(() => typeof m.range == "number" ? m.range : void 0), B = R(() => (b) => {
1142
- if (m.disabledDate && m.disabledDate(b))
1159
+ setup(t, { emit: d }) {
1160
+ const n = t, e = d, p = W(), i = W(), v = W(!1), a = W(""), u = C(() => n.range === !0 || typeof n.range == "number"), o = C(() => typeof n.range == "number" ? n.range : void 0), M = C(() => (I) => {
1161
+ if (n.disabledDate && n.disabledDate(I))
1143
1162
  return !0;
1144
- if (p.value !== void 0 && _.value && !V.value) {
1145
- const w = u(b);
1146
- if (I(_.value) && ve(_.value, w) > p.value)
1163
+ if (o.value !== void 0 && k.value && !D.value) {
1164
+ const N = l(I);
1165
+ if (_(k.value) && U(k.value, N) > o.value)
1147
1166
  return !0;
1148
1167
  }
1149
1168
  return !1;
1150
- }), x = E(null), _ = E(null), V = E(null);
1151
- Se(
1152
- () => m.modelValue,
1153
- (b) => {
1154
- o.value ? Array.isArray(b) && b.length === 2 ? (_.value = b[0], V.value = N(b[1])) : (_.value = null, V.value = null) : x.value = typeof b == "string" ? b : null, A();
1169
+ }), x = W(null), k = W(null), D = W(null);
1170
+ me(
1171
+ () => n.modelValue,
1172
+ (I) => {
1173
+ u.value ? Array.isArray(I) && I.length === 2 ? (k.value = I[0], D.value = y(I[1])) : (k.value = null, D.value = null) : x.value = typeof I == "string" ? I : null, L();
1155
1174
  },
1156
1175
  { immediate: !0 }
1157
1176
  );
1158
- function A() {
1159
- m.mode === "popup" && (o.value ? _.value && V.value ? d.value = `${_.value} ~ ${V.value}` : _.value ? d.value = `${_.value} ~ ` : d.value = "" : d.value = x.value || "");
1177
+ function L() {
1178
+ n.mode === "popup" && (u.value ? k.value && D.value ? a.value = `${k.value} ~ ${D.value}` : k.value ? a.value = `${k.value} ~ ` : a.value = "" : a.value = x.value || "");
1160
1179
  }
1161
- function I(b) {
1162
- if (!b) return null;
1163
- const w = new Date(b);
1164
- return isNaN(w.getTime()) ? null : w;
1180
+ function _(I) {
1181
+ if (!I) return null;
1182
+ const N = new Date(I);
1183
+ return isNaN(N.getTime()) ? null : N;
1165
1184
  }
1166
- function u(b) {
1167
- const w = b.getFullYear(), L = String(b.getMonth() + 1).padStart(2, "0"), ee = String(b.getDate()).padStart(2, "0");
1168
- return `${w}-${L}-${ee}`;
1185
+ function l(I) {
1186
+ const N = I.getFullYear(), X = String(I.getMonth() + 1).padStart(2, "0"), de = String(I.getDate()).padStart(2, "0");
1187
+ return `${N}-${X}-${de}`;
1169
1188
  }
1170
- function ve(b, w) {
1171
- const L = I(b), ee = I(w);
1172
- if (!L || !ee) return 0;
1173
- const h = Math.abs(ee.getTime() - L.getTime());
1174
- return Math.ceil(h / (1e3 * 60 * 60 * 24));
1189
+ function U(I, N) {
1190
+ const X = _(I), de = _(N);
1191
+ if (!X || !de) return 0;
1192
+ const _e = Math.abs(de.getTime() - X.getTime());
1193
+ return Math.ceil(_e / (1e3 * 60 * 60 * 24));
1175
1194
  }
1176
- function ye(b) {
1177
- const w = I(b);
1178
- return w ? (w.setDate(w.getDate() + 1), u(w)) : b;
1195
+ function Y(I) {
1196
+ const N = _(I);
1197
+ return N ? (N.setDate(N.getDate() + 1), l(N)) : I;
1179
1198
  }
1180
- function he(b) {
1181
- const w = I(b);
1182
- return w ? (w.setDate(w.getDate() - 1), u(w)) : b;
1199
+ function c(I) {
1200
+ const N = _(I);
1201
+ return N ? (N.setDate(N.getDate() - 1), l(N)) : I;
1183
1202
  }
1184
- function H(b) {
1185
- return m.endDateOffset && o.value ? ye(b) : b;
1203
+ function R(I) {
1204
+ return n.endDateOffset && u.value ? Y(I) : I;
1186
1205
  }
1187
- function N(b) {
1188
- return m.endDateOffset && o.value ? he(b) : b;
1206
+ function y(I) {
1207
+ return n.endDateOffset && u.value ? c(I) : I;
1189
1208
  }
1190
- function O(b) {
1191
- if (b.type !== "current-month" || m.disabledDate && m.disabledDate(b.date))
1209
+ function $(I) {
1210
+ if (I.type !== "current-month" || n.disabledDate && n.disabledDate(I.date))
1192
1211
  return;
1193
- const w = u(b.date);
1194
- if (!(m.minDate && w < m.minDate) && !(m.maxDate && w > m.maxDate)) {
1195
- if (o.value)
1196
- if (!_.value || _.value && V.value)
1197
- _.value = w, V.value = null;
1212
+ const N = l(I.date);
1213
+ if (!(n.minDate && N < n.minDate) && !(n.maxDate && N > n.maxDate)) {
1214
+ if (u.value)
1215
+ if (!k.value || k.value && D.value)
1216
+ k.value = N, D.value = null;
1198
1217
  else {
1199
- let L = _.value, ee = w;
1200
- if (w < _.value && (ee = _.value, L = w), _.value = L, V.value = ee, _.value && V.value) {
1201
- const h = H(V.value), X = [_.value, h];
1202
- t("update:modelValue", X), t("change", X), m.showFooter || F();
1218
+ let X = k.value, de = N;
1219
+ if (N < k.value && (de = k.value, X = N), k.value = X, D.value = de, k.value && D.value) {
1220
+ const _e = R(D.value), xe = [k.value, _e];
1221
+ e("update:modelValue", xe), e("change", xe), n.showFooter || S();
1203
1222
  }
1204
1223
  }
1205
1224
  else {
1206
- x.value = w;
1207
- const L = w;
1208
- t("update:modelValue", L), t("change", L), m.mode && M();
1225
+ x.value = N;
1226
+ const X = N;
1227
+ e("update:modelValue", X), e("change", X), n.mode && z();
1209
1228
  }
1210
- A();
1229
+ L();
1211
1230
  }
1212
1231
  }
1213
- function F() {
1214
- if (_.value && V.value) {
1215
- const b = H(V.value), w = [_.value, b];
1216
- t("update:modelValue", w), t("change", w), t("confirm", w), M();
1232
+ function S() {
1233
+ if (k.value && D.value) {
1234
+ const I = R(D.value), N = [k.value, I];
1235
+ e("update:modelValue", N), e("change", N), e("confirm", N), z();
1217
1236
  }
1218
1237
  }
1219
- function U() {
1220
- o.value ? (_.value = null, V.value = null) : x.value = null;
1221
- const b = null;
1222
- t("update:modelValue", b), t("change", b), A();
1238
+ function F() {
1239
+ u.value ? (k.value = null, D.value = null) : x.value = null;
1240
+ const I = null;
1241
+ e("update:modelValue", I), e("change", I), L();
1223
1242
  }
1224
- function S(b) {
1225
- _.value = b[0], V.value = b[1];
1226
- const w = H(b[1]), L = [b[0], w];
1227
- t("update:modelValue", L), t("change", L), m.showFooter ? A() : F();
1243
+ function A(I) {
1244
+ k.value = I[0], D.value = I[1];
1245
+ const N = R(I[1]), X = [I[0], N];
1246
+ e("update:modelValue", X), e("change", X), n.showFooter ? L() : S();
1228
1247
  }
1229
- function T() {
1248
+ function H() {
1230
1249
  v.value = !0;
1231
1250
  }
1232
- function M() {
1251
+ function z() {
1233
1252
  v.value = !1;
1234
1253
  }
1235
- function Y(b) {
1236
- v.value = b;
1237
- }
1238
- function me() {
1239
- T();
1254
+ function G(I) {
1255
+ v.value = I;
1240
1256
  }
1241
- function ge() {
1242
- m.mode === "popup" && $e();
1243
- }
1244
- function we() {
1245
- v.value || T();
1257
+ function pe() {
1258
+ H();
1246
1259
  }
1247
1260
  function $e() {
1248
- const b = d.value.trim();
1249
- if (o.value) {
1250
- const w = b.split("~").map((L) => L.trim());
1251
- if (w.length === 2 && w[0] && w[1]) {
1252
- const L = I(w[0]), ee = I(w[1]);
1253
- if (L && ee && !isNaN(L.getTime()) && !isNaN(ee.getTime())) {
1254
- _.value = u(L);
1255
- const h = u(ee);
1256
- V.value = N(h);
1257
- const X = H(V.value), ne = [_.value, X];
1258
- t("update:modelValue", ne), t("change", ne);
1261
+ n.mode === "popup" && Fe();
1262
+ }
1263
+ function Re() {
1264
+ v.value || H();
1265
+ }
1266
+ function Fe() {
1267
+ const I = a.value.trim();
1268
+ if (u.value) {
1269
+ const N = I.split("~").map((X) => X.trim());
1270
+ if (N.length === 2 && N[0] && N[1]) {
1271
+ const X = _(N[0]), de = _(N[1]);
1272
+ if (X && de && !isNaN(X.getTime()) && !isNaN(de.getTime())) {
1273
+ k.value = l(X);
1274
+ const _e = l(de);
1275
+ D.value = y(_e);
1276
+ const xe = R(D.value), Se = [k.value, xe];
1277
+ e("update:modelValue", Se), e("change", Se);
1259
1278
  return;
1260
1279
  }
1261
1280
  }
1262
1281
  } else {
1263
- const w = I(b);
1264
- if (w && !isNaN(w.getTime())) {
1265
- x.value = u(w), t("update:modelValue", x.value), t("change", x.value);
1282
+ const N = _(I);
1283
+ if (N && !isNaN(N.getTime())) {
1284
+ x.value = l(N), e("update:modelValue", x.value), e("change", x.value);
1266
1285
  return;
1267
1286
  }
1268
1287
  }
1269
- A();
1288
+ L();
1270
1289
  }
1271
- return (b, w) => (s(), f("div", Un, [
1272
- e.mode === "popup" ? (s(), f("div", {
1290
+ return (I, N) => (f(), g("div", tn, [
1291
+ t.mode === "popup" ? (f(), g("div", {
1273
1292
  key: 0,
1274
1293
  class: "rc-calendar__input",
1275
- onClick: T
1294
+ onClick: H
1276
1295
  }, [
1277
- Mt(C("input", {
1296
+ pt(T("input", {
1278
1297
  ref_key: "inputRef",
1279
- ref: g,
1280
- "onUpdate:modelValue": w[0] || (w[0] = (L) => d.value = L),
1298
+ ref: p,
1299
+ "onUpdate:modelValue": N[0] || (N[0] = (X) => a.value = X),
1281
1300
  type: "text",
1282
1301
  class: "rc-calendar__input-field",
1283
- placeholder: e.placeholder,
1302
+ placeholder: t.placeholder,
1284
1303
  readonly: "",
1285
- onFocus: me,
1286
- onBlur: ge,
1287
- onInput: we
1288
- }, null, 40, Kn), [
1289
- [Rt, d.value]
1304
+ onFocus: pe,
1305
+ onBlur: $e,
1306
+ onInput: Re
1307
+ }, null, 40, an), [
1308
+ [Yt, a.value]
1290
1309
  ]),
1291
- C("div", jn, [
1292
- G(Q(Z), {
1310
+ T("div", nn, [
1311
+ ae(te(re), {
1293
1312
  name: "icon_a-rili",
1294
1313
  class: "rc-calendar__input-icon"
1295
1314
  })
1296
1315
  ])
1297
- ])) : D("", !0),
1298
- e.mode === "default" ? (s(), f("div", Gn, [
1299
- G(wt, {
1300
- "show-title": e.showTitle,
1301
- title: e.title,
1302
- range: o.value,
1316
+ ])) : E("", !0),
1317
+ t.mode === "default" ? (f(), g("div", ln, [
1318
+ ae(Bt, {
1319
+ "show-title": t.showTitle,
1320
+ title: t.title,
1321
+ range: u.value,
1303
1322
  "selected-date": x.value,
1304
- "range-start": _.value,
1305
- "range-end": V.value,
1306
- "min-date": e.minDate,
1307
- "max-date": e.maxDate,
1308
- "disabled-date": B.value,
1309
- formatter: e.formatter,
1323
+ "range-start": k.value,
1324
+ "range-end": D.value,
1325
+ "min-date": t.minDate,
1326
+ "max-date": t.maxDate,
1327
+ "disabled-date": M.value,
1328
+ formatter: t.formatter,
1310
1329
  "show-footer": !1,
1311
- "max-range-days": p.value,
1312
- onSelectDay: O,
1313
- onClear: U,
1314
- onConfirm: F,
1315
- onShortcutSelect: S
1330
+ "max-range-days": o.value,
1331
+ onSelectDay: $,
1332
+ onClear: F,
1333
+ onConfirm: S,
1334
+ onShortcutSelect: A
1316
1335
  }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "max-range-days"])
1317
- ])) : D("", !0),
1318
- e.mode === "popup" ? (s(), te(Q(We), {
1336
+ ])) : E("", !0),
1337
+ t.mode === "popup" ? (f(), ce(te(Ye), {
1319
1338
  key: 2,
1320
1339
  modelValue: v.value,
1321
1340
  "onUpdate:modelValue": [
1322
- w[1] || (w[1] = (L) => v.value = L),
1323
- Y
1341
+ N[1] || (N[1] = (X) => v.value = X),
1342
+ G
1324
1343
  ],
1325
1344
  position: "bottom",
1326
1345
  overlay: !0,
@@ -1328,67 +1347,67 @@ const _n = {
1328
1347
  "close-on-click-overlay": !0,
1329
1348
  "lock-scroll": !0
1330
1349
  }, {
1331
- default: ae(() => [
1332
- C("div", {
1350
+ default: fe(() => [
1351
+ T("div", {
1333
1352
  ref_key: "popupPanelRef",
1334
- ref: k,
1353
+ ref: i,
1335
1354
  class: "rc-calendar__panel"
1336
1355
  }, [
1337
- G(wt, {
1338
- "show-title": e.showTitle,
1339
- title: e.title,
1340
- range: o.value,
1356
+ ae(Bt, {
1357
+ "show-title": t.showTitle,
1358
+ title: t.title,
1359
+ range: u.value,
1341
1360
  "selected-date": x.value,
1342
- "range-start": _.value,
1343
- "range-end": V.value,
1344
- "min-date": e.minDate,
1345
- "max-date": e.maxDate,
1346
- "disabled-date": B.value,
1347
- formatter: e.formatter,
1348
- "show-footer": e.showFooter,
1349
- "max-range-days": p.value,
1350
- onSelectDay: O,
1351
- onClear: U,
1352
- onConfirm: F,
1353
- onShortcutSelect: S
1361
+ "range-start": k.value,
1362
+ "range-end": D.value,
1363
+ "min-date": t.minDate,
1364
+ "max-date": t.maxDate,
1365
+ "disabled-date": M.value,
1366
+ formatter: t.formatter,
1367
+ "show-footer": t.showFooter,
1368
+ "max-range-days": o.value,
1369
+ onSelectDay: $,
1370
+ onClear: F,
1371
+ onConfirm: S,
1372
+ onShortcutSelect: A
1354
1373
  }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "show-footer", "max-range-days"])
1355
1374
  ], 512)
1356
1375
  ]),
1357
1376
  _: 1
1358
- }, 8, ["modelValue"])) : D("", !0)
1377
+ }, 8, ["modelValue"])) : E("", !0)
1359
1378
  ]));
1360
1379
  }
1361
- }), He = /* @__PURE__ */ se(qn, [["__scopeId", "data-v-96b29c22"]]);
1362
- He.name = "rc-calendar";
1363
- const Jn = "RcCalendar";
1364
- function $t(e) {
1365
- return e.component(He.name, He), e.component(Jn, He), e;
1380
+ }), We = /* @__PURE__ */ se(on, [["__scopeId", "data-v-96b29c22"]]);
1381
+ We && (We.name = "rc-calendar");
1382
+ const sn = "RcCalendar";
1383
+ function Ft(t) {
1384
+ return We && (t.component(We.name || "rc-calendar", We), t.component(sn, We)), t;
1366
1385
  }
1367
- const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Zn = ["onClick"], ea = { class: "rc-search-area__item-label" }, ta = { class: "rc-search-area__panel-content" }, na = {
1386
+ const rn = { class: "rc-search-area" }, un = { class: "rc-search-area__bar" }, cn = ["onClick"], dn = { class: "rc-search-area__item-label" }, fn = { class: "rc-search-area__panel-content" }, vn = {
1368
1387
  key: 1,
1369
1388
  class: "rc-search-area__input-wrapper"
1370
- }, aa = ["placeholder"], la = {
1389
+ }, mn = ["placeholder"], pn = {
1371
1390
  key: 2,
1372
1391
  class: "rc-search-area__calendar-wrapper"
1373
- }, oa = {
1392
+ }, hn = {
1374
1393
  key: 3,
1375
1394
  class: "rc-search-area__tree-container"
1376
- }, ra = { class: "rc-search-area__tree-group-title" }, sa = { class: "rc-search-area__tree-group-options" }, ua = ["onClick"], ia = { class: "rc-search-area__option-label" }, ca = {
1395
+ }, gn = { class: "rc-search-area__tree-group-title" }, yn = { class: "rc-search-area__tree-group-options" }, bn = ["onClick"], kn = { class: "rc-search-area__option-label" }, _n = {
1377
1396
  key: 4,
1378
1397
  class: "rc-search-area__tree-container"
1379
- }, da = { class: "rc-search-area__tree-group-title" }, fa = { class: "rc-search-area__tree-group-options" }, va = ["onClick"], ma = { class: "rc-search-area__option-label" }, pa = {
1398
+ }, wn = { class: "rc-search-area__tree-group-title" }, $n = { class: "rc-search-area__tree-group-options" }, xn = ["onClick"], Dn = { class: "rc-search-area__option-label" }, Vn = {
1380
1399
  key: 5,
1381
1400
  class: "rc-search-area__options-grid"
1382
- }, ya = ["onClick"], ha = { class: "rc-search-area__option-label" }, ga = {
1401
+ }, Cn = ["onClick"], Rn = { class: "rc-search-area__option-label" }, Sn = {
1383
1402
  key: 6,
1384
1403
  class: "rc-search-area__options-grid"
1385
- }, ka = ["onClick"], ba = { class: "rc-search-area__option-label" }, _a = {
1404
+ }, Mn = ["onClick"], Bn = { class: "rc-search-area__option-label" }, Fn = {
1386
1405
  key: 7,
1387
1406
  class: "rc-search-area__empty"
1388
- }, wa = {
1407
+ }, Tn = {
1389
1408
  key: 0,
1390
1409
  class: "rc-search-area__panel-footer"
1391
- }, $a = /* @__PURE__ */ re({
1410
+ }, An = /* @__PURE__ */ oe({
1392
1411
  name: "rc-search-area",
1393
1412
  __name: "index",
1394
1413
  props: {
@@ -1398,426 +1417,426 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1398
1417
  autoConfirm: { type: Boolean, default: !1 }
1399
1418
  },
1400
1419
  emits: ["update:modelValue", "change"],
1401
- setup(e, { expose: r, emit: m }) {
1402
- const t = e, g = m, k = E(null), v = E(null), d = E(null), o = E({ top: "0px" }), p = async () => {
1403
- if (k.value === null || !v.value)
1420
+ setup(t, { expose: d, emit: n }) {
1421
+ const e = t, p = n, i = W(null), v = W(null), a = W(null), u = W({ top: "0px" }), o = async () => {
1422
+ if (i.value === null || !v.value)
1404
1423
  return;
1405
- await Be();
1406
- const l = v.value.getBoundingClientRect().top;
1407
- o.value = { top: `${l}px` };
1408
- }, B = (n) => {
1409
- if (k.value === null || !v.value)
1424
+ await Ie();
1425
+ const m = v.value.getBoundingClientRect().top;
1426
+ u.value = { top: `${m}px` };
1427
+ }, M = (s) => {
1428
+ if (i.value === null || !v.value)
1410
1429
  return;
1411
- const l = n.target;
1412
- if (v.value.contains(l))
1430
+ const m = s.target;
1431
+ if (v.value.contains(m))
1413
1432
  return;
1414
- const c = v.value.closest(".rc-search-area");
1415
- if (c) {
1416
- const $ = c.querySelector(".rc-search-area__bar");
1417
- if ($ && $.contains(l))
1433
+ const w = v.value.closest(".rc-search-area");
1434
+ if (w) {
1435
+ const P = w.querySelector(".rc-search-area__bar");
1436
+ if (P && P.contains(m))
1418
1437
  return;
1419
1438
  }
1420
- H();
1439
+ R();
1421
1440
  };
1422
- Se(k, async (n) => {
1423
- n !== null ? (await Be(), p(), window.addEventListener("resize", p), window.addEventListener("scroll", p, !0), document.addEventListener("click", B, !0)) : (window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), document.removeEventListener("click", B, !0));
1441
+ me(i, async (s) => {
1442
+ s !== null ? (await Ie(), o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), document.addEventListener("click", M, !0)) : (window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), document.removeEventListener("click", M, !0));
1424
1443
  }), at(() => {
1425
- window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), document.removeEventListener("click", B, !0);
1444
+ window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), document.removeEventListener("click", M, !0);
1426
1445
  });
1427
- const x = E({}), _ = E(""), V = E(null), A = E({}), I = E({ ...t.modelValue });
1428
- Se(() => t.modelValue, (n) => {
1429
- I.value = { ...n || {} };
1446
+ const x = W({}), k = W(""), D = W(null), L = W({}), _ = W({ ...e.modelValue });
1447
+ me(() => e.modelValue, (s) => {
1448
+ _.value = { ...s || {} };
1430
1449
  }, { deep: !0, immediate: !0 });
1431
- const u = R(() => k.value === null ? null : t.items[k.value]), ve = R(() => {
1432
- if (!u.value) return "";
1433
- const n = ne(u.value);
1434
- return n > 0 ? `(${n}项)` : "";
1435
- }), ye = (n) => {
1436
- const l = I.value[n.key];
1437
- if (l == null || l === "" || n.slot)
1438
- return n.label;
1439
- if (n.type === "input") {
1440
- if (l && String(l).trim())
1441
- return `${n.label}: ${l}`;
1442
- } else if (n.type === "calendar") {
1443
- if (l) {
1444
- if (Array.isArray(l) && l.length === 2)
1445
- return `${n.label}: ${l[0]} ~ ${l[1]}`;
1446
- if (typeof l == "string")
1447
- return `${n.label}: ${l}`;
1450
+ const l = C(() => i.value === null ? null : e.items[i.value]), U = C(() => {
1451
+ if (!l.value) return "";
1452
+ const s = Se(l.value);
1453
+ return s > 0 ? `(${s}项)` : "";
1454
+ }), Y = (s) => {
1455
+ const m = _.value[s.key];
1456
+ if (m == null || m === "" || s.slot)
1457
+ return s.label;
1458
+ if (s.type === "input") {
1459
+ if (m && String(m).trim())
1460
+ return `${s.label}: ${m}`;
1461
+ } else if (s.type === "calendar") {
1462
+ if (m) {
1463
+ if (Array.isArray(m) && m.length === 2)
1464
+ return `${s.label}: ${m[0]} ~ ${m[1]}`;
1465
+ if (typeof m == "string")
1466
+ return `${s.label}: ${m}`;
1448
1467
  }
1449
- } else if (n.type === "single" || n.type === "tree-single") {
1450
- const c = U(n, l);
1451
- if (c)
1452
- return `${n.label}: ${F(c, n)}`;
1468
+ } else if (s.type === "single" || s.type === "tree-single") {
1469
+ const w = F(s, m);
1470
+ if (w)
1471
+ return `${s.label}: ${S(w, s)}`;
1453
1472
  } else {
1454
- const c = Array.isArray(l) ? l : [l];
1455
- if (c.length > 0) {
1456
- const $ = c.map((J) => {
1457
- const K = U(n, J);
1458
- return K ? F(K, n) : null;
1459
- }).filter((J) => J !== null);
1460
- if ($.length > 0)
1461
- return `${n.label}: ${$.join("、")}`;
1473
+ const w = Array.isArray(m) ? m : [m];
1474
+ if (w.length > 0) {
1475
+ const P = w.map((ne) => {
1476
+ const ee = F(s, ne);
1477
+ return ee ? S(ee, s) : null;
1478
+ }).filter((ne) => ne !== null);
1479
+ if (P.length > 0)
1480
+ return `${s.label}: ${P.join("、")}`;
1462
1481
  }
1463
1482
  }
1464
- return n.label;
1465
- }, he = (n) => {
1466
- const l = t.items[n];
1467
- if (!l) return;
1468
- if (k.value === n) {
1469
- k.value = null;
1483
+ return s.label;
1484
+ }, c = (s) => {
1485
+ const m = e.items[s];
1486
+ if (!m) return;
1487
+ if (i.value === s) {
1488
+ i.value = null;
1470
1489
  return;
1471
1490
  }
1472
- const c = I.value[l.key];
1473
- l.slot ? c != null ? Array.isArray(c) ? A.value[l.key] = [...c] : typeof c == "object" ? A.value[l.key] = { ...c } : A.value[l.key] = c : A.value[l.key] = void 0 : l.type === "input" ? _.value = c != null ? String(c) : "" : l.type === "calendar" ? V.value = c ?? null : l.type === "single" || l.type === "tree-single" ? x.value[l.key] = c !== void 0 ? c : null : x.value[l.key] = c !== void 0 ? Array.isArray(c) ? [...c] : [c] : [], k.value = n;
1474
- }, H = () => {
1475
- k.value = null;
1476
- }, N = (n, l) => {
1477
- if (!l)
1478
- return typeof n == "string" ? n : n.label || String(n.value);
1479
- const c = n;
1480
- if (l.renderItem) {
1481
- if (typeof l.renderItem == "string")
1482
- return String(typeof c == "object" && c !== null ? c[l.renderItem] ?? "" : c);
1491
+ const w = _.value[m.key];
1492
+ m.slot ? w != null ? Array.isArray(w) ? L.value[m.key] = [...w] : typeof w == "object" ? L.value[m.key] = { ...w } : L.value[m.key] = w : L.value[m.key] = void 0 : m.type === "input" ? k.value = w != null ? String(w) : "" : m.type === "calendar" ? D.value = w ?? null : m.type === "single" || m.type === "tree-single" ? x.value[m.key] = w !== void 0 ? w : null : x.value[m.key] = w !== void 0 ? Array.isArray(w) ? [...w] : [w] : [], i.value = s;
1493
+ }, R = () => {
1494
+ i.value = null;
1495
+ }, y = (s, m) => {
1496
+ if (!m)
1497
+ return typeof s == "string" ? s : s.label || String(s.value);
1498
+ const w = s;
1499
+ if (m.renderItem) {
1500
+ if (typeof m.renderItem == "string")
1501
+ return String(typeof w == "object" && w !== null ? w[m.renderItem] ?? "" : w);
1483
1502
  {
1484
- const $ = l.renderItem(c);
1485
- return $ != null ? String($) : "";
1503
+ const P = m.renderItem(w);
1504
+ return P != null ? String(P) : "";
1486
1505
  }
1487
1506
  }
1488
- return typeof n == "string" ? n : n.label || String(n.value);
1489
- }, O = (n, l) => {
1490
- if (!l)
1491
- return typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
1492
- const c = n;
1493
- return l.format ? typeof l.format == "string" ? typeof c == "object" && c !== null ? c[l.format] : c : l.format(c) : typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
1494
- }, F = (n, l) => {
1495
- const c = n, $ = l.renderResult || l.renderItem;
1496
- if ($) {
1497
- if (typeof $ == "string")
1498
- return String(typeof c == "object" && c !== null ? c[$] ?? "" : c);
1507
+ return typeof s == "string" ? s : s.label || String(s.value);
1508
+ }, $ = (s, m) => {
1509
+ if (!m)
1510
+ return typeof s == "string" ? s : s.value !== void 0 ? s.value : s;
1511
+ const w = s;
1512
+ return m.format ? typeof m.format == "string" ? typeof w == "object" && w !== null ? w[m.format] : w : m.format(w) : typeof s == "string" ? s : s.value !== void 0 ? s.value : s;
1513
+ }, S = (s, m) => {
1514
+ const w = s, P = m.renderResult || m.renderItem;
1515
+ if (P) {
1516
+ if (typeof P == "string")
1517
+ return String(typeof w == "object" && w !== null ? w[P] ?? "" : w);
1499
1518
  {
1500
- const J = $(c);
1501
- return J != null ? String(J) : "";
1519
+ const ne = P(w);
1520
+ return ne != null ? String(ne) : "";
1502
1521
  }
1503
1522
  }
1504
- return N(n, l);
1505
- }, U = (n, l, c) => {
1506
- const $ = c || n.options;
1507
- if (!$) return null;
1508
- const J = n.childrenKey || "children";
1509
- for (const K of $) {
1510
- const pe = O(K, n);
1511
- if (pe === l || String(pe) === String(l))
1512
- return K;
1513
- if (typeof K == "object" && K !== null) {
1514
- const Ie = K[J];
1515
- if (Array.isArray(Ie) && Ie.length > 0) {
1516
- const De = U(n, l, Ie);
1517
- if (De) return De;
1523
+ return y(s, m);
1524
+ }, F = (s, m, w) => {
1525
+ const P = w || s.options;
1526
+ if (!P) return null;
1527
+ const ne = s.childrenKey || "children";
1528
+ for (const ee of P) {
1529
+ const h = $(ee, s);
1530
+ if (h === m || String(h) === String(m))
1531
+ return ee;
1532
+ if (typeof ee == "object" && ee !== null) {
1533
+ const O = ee[ne];
1534
+ if (Array.isArray(O) && O.length > 0) {
1535
+ const B = F(s, m, O);
1536
+ if (B) return B;
1518
1537
  }
1519
1538
  }
1520
1539
  }
1521
1540
  return null;
1522
- }, S = (n, l) => {
1523
- const c = l || n.options;
1524
- if (!c) return [];
1525
- const $ = n.childrenKey || "children", J = [];
1526
- for (const K of c)
1527
- if (J.push(K), typeof K == "object" && K !== null) {
1528
- const pe = K[$];
1529
- Array.isArray(pe) && pe.length > 0 && J.push(...S(n, pe));
1541
+ }, A = (s, m) => {
1542
+ const w = m || s.options;
1543
+ if (!w) return [];
1544
+ const P = s.childrenKey || "children", ne = [];
1545
+ for (const ee of w)
1546
+ if (ne.push(ee), typeof ee == "object" && ee !== null) {
1547
+ const h = ee[P];
1548
+ Array.isArray(h) && h.length > 0 && ne.push(...A(s, h));
1530
1549
  }
1531
- return J;
1532
- }, T = (n) => {
1533
- if (!u.value) return !1;
1534
- const l = u.value.key, c = x.value[l], $ = O(n, u.value);
1535
- return u.value.type === "single" || u.value.type === "tree-single" ? c != null && c === $ : (Array.isArray(c) ? c : []).some((K) => K === $ || String(K) === String($));
1536
- }, M = (n) => n ? n.childrenKey ? S(n) : n.options || [] : [], Y = (n) => {
1537
- if (!n) return [];
1538
- const l = n.childrenKey || "children";
1539
- return (n.options || []).filter((c) => {
1540
- if (typeof c == "string") return !1;
1541
- const $ = c[l];
1542
- return Array.isArray($) && $.length > 0;
1550
+ return ne;
1551
+ }, H = (s) => {
1552
+ if (!l.value) return !1;
1553
+ const m = l.value.key, w = x.value[m], P = $(s, l.value);
1554
+ return l.value.type === "single" || l.value.type === "tree-single" ? w != null && w === P : (Array.isArray(w) ? w : []).some((ee) => ee === P || String(ee) === String(P));
1555
+ }, z = (s) => s ? s.childrenKey ? A(s) : s.options || [] : [], G = (s) => {
1556
+ if (!s) return [];
1557
+ const m = s.childrenKey || "children";
1558
+ return (s.options || []).filter((w) => {
1559
+ if (typeof w == "string") return !1;
1560
+ const P = w[m];
1561
+ return Array.isArray(P) && P.length > 0;
1543
1562
  });
1544
- }, me = (n, l) => {
1545
- if (!l || typeof n == "string") return [];
1546
- const c = l.childrenKey || "children", $ = n[c];
1547
- return Array.isArray($) ? $ : [];
1548
- }, ge = (n) => {
1549
- if (n)
1550
- return A.value[n.key] !== void 0 ? A.value[n.key] : I.value[n.key];
1551
- }, we = (n, l) => {
1552
- if (n && (A.value[n.key] = l, t.autoConfirm)) {
1553
- const c = n.key;
1554
- I.value[c] = l, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, n), H();
1555
- }
1556
- }, $e = (n) => {
1557
- if (!u.value) return;
1558
- const l = u.value.key, c = O(n, u.value);
1559
- I.value[l];
1560
- let $;
1561
- x.value[l] === c ? $ = void 0 : $ = c, I.value[l] = $, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1562
- }, b = (n) => {
1563
- if (!u.value) return;
1564
- const l = u.value.key, c = O(n, u.value), $ = Array.isArray(x.value[l]) ? [...x.value[l]] : [], J = $.findIndex(
1565
- (K) => K === c || String(K) === String(c)
1563
+ }, pe = (s, m) => {
1564
+ if (!m || typeof s == "string") return [];
1565
+ const w = m.childrenKey || "children", P = s[w];
1566
+ return Array.isArray(P) ? P : [];
1567
+ }, $e = (s) => {
1568
+ if (s)
1569
+ return L.value[s.key] !== void 0 ? L.value[s.key] : _.value[s.key];
1570
+ }, Re = (s, m) => {
1571
+ if (s && (L.value[s.key] = m, e.autoConfirm)) {
1572
+ const w = s.key;
1573
+ _.value[w] = m, p("update:modelValue", { ..._.value }), p("change", { ..._.value }, s), R();
1574
+ }
1575
+ }, Fe = (s) => {
1576
+ if (!l.value) return;
1577
+ const m = l.value.key, w = $(s, l.value);
1578
+ _.value[m];
1579
+ let P;
1580
+ x.value[m] === w ? P = void 0 : P = w, _.value[m] = P, p("update:modelValue", { ..._.value }), p("change", { ..._.value }, l.value), R();
1581
+ }, I = (s) => {
1582
+ if (!l.value) return;
1583
+ const m = l.value.key, w = $(s, l.value), P = Array.isArray(x.value[m]) ? [...x.value[m]] : [], ne = P.findIndex(
1584
+ (ee) => ee === w || String(ee) === String(w)
1566
1585
  );
1567
- if (J >= 0 ? $.splice(J, 1) : $.push(c), x.value[l] = $, t.autoConfirm) {
1568
- const K = $.length > 0 ? $ : void 0;
1569
- I.value[l] = K, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1570
- }
1571
- }, w = () => {
1572
- if (!u.value) return;
1573
- const n = u.value.key;
1574
- u.value.slot ? A.value[n] = void 0 : u.value.type === "input" ? _.value = "" : u.value.type === "calendar" ? V.value = null : u.value.type === "single" || u.value.type === "tree-single" ? x.value[n] = null : x.value[n] = [];
1575
- }, L = () => {
1576
- if (t.autoConfirm && u.value) {
1577
- const n = u.value.key, l = _.value.trim() || void 0;
1578
- I.value[n] = l, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1579
- }
1580
- }, ee = (n) => {
1581
- if (V.value = n, t.autoConfirm && u.value) {
1582
- const l = u.value.key, c = n ?? void 0;
1583
- I.value[l] = c, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1584
- }
1585
- }, h = () => {
1586
- if (!u.value) return;
1587
- const n = u.value.key;
1588
- I.value[n];
1589
- let l;
1590
- if (u.value.slot)
1591
- l = A.value[n], I.value[n] = l;
1592
- else if (u.value.type === "input")
1593
- l = _.value.trim() || void 0, I.value[n] = l;
1594
- else if (u.value.type === "calendar")
1595
- l = V.value !== null && V.value !== void 0 ? V.value : void 0, I.value[n] = l;
1596
- else if (u.value.type === "single" || u.value.type === "tree-single") {
1597
- const c = x.value[n];
1598
- l = c ?? void 0, I.value[n] = l;
1586
+ if (ne >= 0 ? P.splice(ne, 1) : P.push(w), x.value[m] = P, e.autoConfirm) {
1587
+ const ee = P.length > 0 ? P : void 0;
1588
+ _.value[m] = ee, p("update:modelValue", { ..._.value }), p("change", { ..._.value }, l.value), R();
1589
+ }
1590
+ }, N = () => {
1591
+ if (!l.value) return;
1592
+ const s = l.value.key;
1593
+ l.value.slot ? L.value[s] = void 0 : l.value.type === "input" ? k.value = "" : l.value.type === "calendar" ? D.value = null : l.value.type === "single" || l.value.type === "tree-single" ? x.value[s] = null : x.value[s] = [];
1594
+ }, X = () => {
1595
+ if (e.autoConfirm && l.value) {
1596
+ const s = l.value.key, m = k.value.trim() || void 0;
1597
+ _.value[s] = m, p("update:modelValue", { ..._.value }), p("change", { ..._.value }, l.value), R();
1598
+ }
1599
+ }, de = (s) => {
1600
+ if (D.value = s, e.autoConfirm && l.value) {
1601
+ const m = l.value.key, w = s ?? void 0;
1602
+ _.value[m] = w, p("update:modelValue", { ..._.value }), p("change", { ..._.value }, l.value), R();
1603
+ }
1604
+ }, _e = () => {
1605
+ if (!l.value) return;
1606
+ const s = l.value.key;
1607
+ _.value[s];
1608
+ let m;
1609
+ if (l.value.slot)
1610
+ m = L.value[s], _.value[s] = m;
1611
+ else if (l.value.type === "input")
1612
+ m = k.value.trim() || void 0, _.value[s] = m;
1613
+ else if (l.value.type === "calendar")
1614
+ m = D.value !== null && D.value !== void 0 ? D.value : void 0, _.value[s] = m;
1615
+ else if (l.value.type === "single" || l.value.type === "tree-single") {
1616
+ const w = x.value[s];
1617
+ m = w ?? void 0, _.value[s] = m;
1599
1618
  } else {
1600
- const c = x.value[n];
1601
- l = Array.isArray(c) && c.length > 0 ? c : void 0, I.value[n] = l;
1602
- }
1603
- g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1604
- }, X = (n) => {
1605
- const l = I.value[n.key];
1606
- return l == null || l === "" ? 0 : n.slot ? 1 : n.type === "input" ? String(l).trim() ? 1 : 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : l ? 1 : 0;
1607
- }, ne = (n) => {
1608
- if (n.slot) {
1609
- const c = A.value[n.key];
1610
- return c != null && c !== "" ? 1 : 0;
1619
+ const w = x.value[s];
1620
+ m = Array.isArray(w) && w.length > 0 ? w : void 0, _.value[s] = m;
1621
+ }
1622
+ p("update:modelValue", { ..._.value }), p("change", { ..._.value }, l.value), R();
1623
+ }, xe = (s) => {
1624
+ const m = _.value[s.key];
1625
+ return m == null || m === "" ? 0 : s.slot ? 1 : s.type === "input" ? String(m).trim() ? 1 : 0 : s.type === "single" || s.type === "tree-single" ? 1 : Array.isArray(m) ? m.length : m ? 1 : 0;
1626
+ }, Se = (s) => {
1627
+ if (s.slot) {
1628
+ const w = L.value[s.key];
1629
+ return w != null && w !== "" ? 1 : 0;
1611
1630
  } else {
1612
- if (n.type === "input")
1613
- return _.value.trim() ? 1 : 0;
1614
- if (n.type === "calendar")
1615
- return V.value !== null && V.value !== void 0 ? 1 : 0;
1631
+ if (s.type === "input")
1632
+ return k.value.trim() ? 1 : 0;
1633
+ if (s.type === "calendar")
1634
+ return D.value !== null && D.value !== void 0 ? 1 : 0;
1616
1635
  }
1617
- const l = x.value[n.key];
1618
- return l == null || l === "" ? 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : 0;
1636
+ const m = x.value[s.key];
1637
+ return m == null || m === "" ? 0 : s.type === "single" || s.type === "tree-single" ? 1 : Array.isArray(m) ? m.length : 0;
1619
1638
  };
1620
- return r({
1639
+ return d({
1621
1640
  /** 获取当前筛选值 */
1622
- getValues: () => ({ ...I.value }),
1641
+ getValues: () => ({ ..._.value }),
1623
1642
  /** 重置所有筛选 */
1624
1643
  reset: () => {
1625
- I.value = {}, x.value = {}, A.value = {}, g("update:modelValue", {});
1626
- }
1627
- }), (n, l) => (s(), f("div", Qn, [
1628
- C("div", Xn, [
1629
- (s(!0), f(oe, null, fe(t.items, (c, $) => (s(), f("div", {
1630
- key: $,
1631
- class: j(["rc-search-area__item", {
1632
- "is-active": k.value === $,
1633
- "has-value": X(c) > 0
1644
+ _.value = {}, x.value = {}, L.value = {}, p("update:modelValue", {});
1645
+ }
1646
+ }), (s, m) => (f(), g("div", rn, [
1647
+ T("div", un, [
1648
+ (f(!0), g(ue, null, ke(e.items, (w, P) => (f(), g("div", {
1649
+ key: P,
1650
+ class: q(["rc-search-area__item", {
1651
+ "is-active": i.value === P,
1652
+ "has-value": xe(w) > 0
1634
1653
  }]),
1635
- onClick: (J) => he($)
1654
+ onClick: (ne) => c(P)
1636
1655
  }, [
1637
- C("span", ea, P(ye(c)), 1),
1638
- G(Q(Z), {
1656
+ T("span", dn, K(Y(w)), 1),
1657
+ ae(te(re), {
1639
1658
  name: "icon_a-xiala2",
1640
- color: k.value !== $ && X(c) > 0 ? "#1677ff" : "#969799",
1641
- class: j(["rc-search-area__item-arrow", { "is-up": k.value === $ }])
1659
+ color: i.value !== P && xe(w) > 0 ? "#1677ff" : "#969799",
1660
+ class: q(["rc-search-area__item-arrow", { "is-up": i.value === P }])
1642
1661
  }, null, 8, ["color", "class"])
1643
- ], 10, Zn))), 128))
1662
+ ], 10, cn))), 128))
1644
1663
  ]),
1645
- G(Ee, { name: "rc-search-area-fade" }, {
1646
- default: ae(() => [
1647
- k.value !== null && t.showMask ? (s(), f("div", {
1664
+ ae(Pe, { name: "rc-search-area-fade" }, {
1665
+ default: fe(() => [
1666
+ i.value !== null && e.showMask ? (f(), g("div", {
1648
1667
  key: 0,
1649
1668
  ref_key: "maskRef",
1650
- ref: d,
1669
+ ref: a,
1651
1670
  class: "rc-search-area__mask",
1652
- style: le(o.value),
1653
- onClick: H
1654
- }, null, 4)) : D("", !0)
1671
+ style: ie(u.value),
1672
+ onClick: R
1673
+ }, null, 4)) : E("", !0)
1655
1674
  ]),
1656
1675
  _: 1
1657
1676
  }),
1658
- G(Ee, { name: "rc-search-area-slide" }, {
1659
- default: ae(() => {
1660
- var c, $, J, K, pe, Ie, De, Le, Oe, Ue, Pe, Ke, je, Ge, qe, Je, Qe, a, i;
1677
+ ae(Pe, { name: "rc-search-area-slide" }, {
1678
+ default: fe(() => {
1679
+ var w, P, ne, ee, h, O, B, J, Me, Te, Be, Qe, Ae, ze, nt, lt, ot, r, b;
1661
1680
  return [
1662
- k.value !== null ? (s(), f("div", {
1681
+ i.value !== null ? (f(), g("div", {
1663
1682
  key: 0,
1664
1683
  ref_key: "panelRef",
1665
1684
  ref: v,
1666
1685
  class: "rc-search-area__panel"
1667
1686
  }, [
1668
- C("div", ta, [
1669
- (c = u.value) != null && c.slot && n.$slots[u.value.key] ? q(n.$slots, u.value.key, {
1687
+ T("div", fn, [
1688
+ (w = l.value) != null && w.slot && s.$slots[l.value.key] ? Q(s.$slots, l.value.key, {
1670
1689
  key: 0,
1671
- value: ge(u.value),
1672
- "update:value": (y) => we(u.value, y)
1673
- }, void 0, !0) : (($ = u.value) == null ? void 0 : $.type) === "input" ? (s(), f("div", na, [
1674
- Mt(C("input", {
1675
- "onUpdate:modelValue": l[0] || (l[0] = (y) => _.value = y),
1690
+ value: $e(l.value),
1691
+ "update:value": (V) => Re(l.value, V)
1692
+ }, void 0, !0) : ((P = l.value) == null ? void 0 : P.type) === "input" ? (f(), g("div", vn, [
1693
+ pt(T("input", {
1694
+ "onUpdate:modelValue": m[0] || (m[0] = (V) => k.value = V),
1676
1695
  type: "text",
1677
1696
  class: "rc-search-area__input",
1678
- placeholder: u.value.placeholder || "请输入",
1679
- onInput: L
1680
- }, null, 40, aa), [
1681
- [Rt, _.value]
1697
+ placeholder: l.value.placeholder || "请输入",
1698
+ onInput: X
1699
+ }, null, 40, mn), [
1700
+ [Yt, k.value]
1682
1701
  ])
1683
- ])) : ((J = u.value) == null ? void 0 : J.type) === "calendar" ? (s(), f("div", la, [
1684
- G(Q(He), {
1685
- modelValue: V.value,
1686
- "onUpdate:modelValue": l[1] || (l[1] = (y) => V.value = y),
1687
- range: ((K = u.value.calendarConfig) == null ? void 0 : K.range) || !1,
1702
+ ])) : ((ne = l.value) == null ? void 0 : ne.type) === "calendar" ? (f(), g("div", pn, [
1703
+ ae(te(We), {
1704
+ modelValue: D.value,
1705
+ "onUpdate:modelValue": m[1] || (m[1] = (V) => D.value = V),
1706
+ range: ((ee = l.value.calendarConfig) == null ? void 0 : ee.range) || !1,
1688
1707
  mode: "default",
1689
- "min-date": (pe = u.value.calendarConfig) == null ? void 0 : pe.minDate,
1690
- "max-date": (Ie = u.value.calendarConfig) == null ? void 0 : Ie.maxDate,
1691
- "disabled-date": (De = u.value.calendarConfig) == null ? void 0 : De.disabledDate,
1692
- formatter: (Le = u.value.calendarConfig) == null ? void 0 : Le.formatter,
1693
- "end-date-offset": ((Oe = u.value.calendarConfig) == null ? void 0 : Oe.endDateOffset) || !1,
1694
- onChange: ee
1708
+ "min-date": (h = l.value.calendarConfig) == null ? void 0 : h.minDate,
1709
+ "max-date": (O = l.value.calendarConfig) == null ? void 0 : O.maxDate,
1710
+ "disabled-date": (B = l.value.calendarConfig) == null ? void 0 : B.disabledDate,
1711
+ formatter: (J = l.value.calendarConfig) == null ? void 0 : J.formatter,
1712
+ "end-date-offset": ((Me = l.value.calendarConfig) == null ? void 0 : Me.endDateOffset) || !1,
1713
+ onChange: de
1695
1714
  }, null, 8, ["modelValue", "range", "min-date", "max-date", "disabled-date", "formatter", "end-date-offset"])
1696
- ])) : ((Ue = u.value) == null ? void 0 : Ue.type) === "tree-single" ? (s(), f("div", oa, [
1697
- (s(!0), f(oe, null, fe(Y(u.value), (y, z) => (s(), f("div", {
1698
- key: z,
1715
+ ])) : ((Te = l.value) == null ? void 0 : Te.type) === "tree-single" ? (f(), g("div", hn, [
1716
+ (f(!0), g(ue, null, ke(G(l.value), (V, j) => (f(), g("div", {
1717
+ key: j,
1699
1718
  class: "rc-search-area__tree-group"
1700
1719
  }, [
1701
- C("div", ra, P(N(y, u.value || void 0)), 1),
1702
- C("div", sa, [
1703
- (s(!0), f(oe, null, fe(me(y, u.value), (W, ke) => (s(), f("div", {
1704
- key: ke,
1705
- class: j(["rc-search-area__option", { "is-selected": T(W) }]),
1706
- onClick: (be) => $e(W)
1720
+ T("div", gn, K(y(V, l.value || void 0)), 1),
1721
+ T("div", yn, [
1722
+ (f(!0), g(ue, null, ke(pe(V, l.value), (Z, Ve) => (f(), g("div", {
1723
+ key: Ve,
1724
+ class: q(["rc-search-area__option", { "is-selected": H(Z) }]),
1725
+ onClick: (Ce) => Fe(Z)
1707
1726
  }, [
1708
- C("span", ia, P(N(W, u.value || void 0)), 1),
1709
- T(W) ? (s(), te(Q(Z), {
1727
+ T("span", kn, K(y(Z, l.value || void 0)), 1),
1728
+ H(Z) ? (f(), ce(te(re), {
1710
1729
  key: 0,
1711
1730
  name: "icon_check",
1712
1731
  class: "rc-search-area__option-check"
1713
- })) : D("", !0)
1714
- ], 10, ua))), 128))
1732
+ })) : E("", !0)
1733
+ ], 10, bn))), 128))
1715
1734
  ])
1716
1735
  ]))), 128))
1717
- ])) : ((Pe = u.value) == null ? void 0 : Pe.type) === "tree-multiple" ? (s(), f("div", ca, [
1718
- (s(!0), f(oe, null, fe(Y(u.value), (y, z) => (s(), f("div", {
1719
- key: z,
1736
+ ])) : ((Be = l.value) == null ? void 0 : Be.type) === "tree-multiple" ? (f(), g("div", _n, [
1737
+ (f(!0), g(ue, null, ke(G(l.value), (V, j) => (f(), g("div", {
1738
+ key: j,
1720
1739
  class: "rc-search-area__tree-group"
1721
1740
  }, [
1722
- C("div", da, P(N(y, u.value || void 0)), 1),
1723
- C("div", fa, [
1724
- (s(!0), f(oe, null, fe(me(y, u.value), (W, ke) => (s(), f("div", {
1725
- key: ke,
1726
- class: j(["rc-search-area__option", { "is-selected": T(W) }]),
1727
- onClick: (be) => b(W)
1741
+ T("div", wn, K(y(V, l.value || void 0)), 1),
1742
+ T("div", $n, [
1743
+ (f(!0), g(ue, null, ke(pe(V, l.value), (Z, Ve) => (f(), g("div", {
1744
+ key: Ve,
1745
+ class: q(["rc-search-area__option", { "is-selected": H(Z) }]),
1746
+ onClick: (Ce) => I(Z)
1728
1747
  }, [
1729
- C("span", ma, P(N(W, u.value || void 0)), 1),
1730
- T(W) ? (s(), te(Q(Z), {
1748
+ T("span", Dn, K(y(Z, l.value || void 0)), 1),
1749
+ H(Z) ? (f(), ce(te(re), {
1731
1750
  key: 0,
1732
1751
  name: "icon_check",
1733
1752
  class: "rc-search-area__option-check"
1734
- })) : D("", !0)
1735
- ], 10, va))), 128))
1753
+ })) : E("", !0)
1754
+ ], 10, xn))), 128))
1736
1755
  ])
1737
1756
  ]))), 128))
1738
- ])) : ((Ke = u.value) == null ? void 0 : Ke.type) === "single" ? (s(), f("div", pa, [
1739
- (s(!0), f(oe, null, fe(M(u.value), (y, z) => (s(), f("div", {
1740
- key: z,
1741
- class: j(["rc-search-area__option", { "is-selected": T(y) }]),
1742
- onClick: (W) => $e(y)
1757
+ ])) : ((Qe = l.value) == null ? void 0 : Qe.type) === "single" ? (f(), g("div", Vn, [
1758
+ (f(!0), g(ue, null, ke(z(l.value), (V, j) => (f(), g("div", {
1759
+ key: j,
1760
+ class: q(["rc-search-area__option", { "is-selected": H(V) }]),
1761
+ onClick: (Z) => Fe(V)
1743
1762
  }, [
1744
- C("span", ha, P(N(y, u.value || void 0)), 1),
1745
- T(y) ? (s(), te(Q(Z), {
1763
+ T("span", Rn, K(y(V, l.value || void 0)), 1),
1764
+ H(V) ? (f(), ce(te(re), {
1746
1765
  key: 0,
1747
1766
  name: "icon_check",
1748
1767
  class: "rc-search-area__option-check"
1749
- })) : D("", !0)
1750
- ], 10, ya))), 128))
1751
- ])) : (s(), f("div", ga, [
1752
- (s(!0), f(oe, null, fe(M(u.value), (y, z) => (s(), f("div", {
1753
- key: z,
1754
- class: j(["rc-search-area__option", { "is-selected": T(y) }]),
1755
- onClick: (W) => b(y)
1768
+ })) : E("", !0)
1769
+ ], 10, Cn))), 128))
1770
+ ])) : (f(), g("div", Sn, [
1771
+ (f(!0), g(ue, null, ke(z(l.value), (V, j) => (f(), g("div", {
1772
+ key: j,
1773
+ class: q(["rc-search-area__option", { "is-selected": H(V) }]),
1774
+ onClick: (Z) => I(V)
1756
1775
  }, [
1757
- C("span", ba, P(N(y, u.value || void 0)), 1),
1758
- T(y) ? (s(), te(Q(Z), {
1776
+ T("span", Bn, K(y(V, l.value || void 0)), 1),
1777
+ H(V) ? (f(), ce(te(re), {
1759
1778
  key: 0,
1760
1779
  name: "icon_check",
1761
1780
  class: "rc-search-area__option-check"
1762
- })) : D("", !0)
1763
- ], 10, ka))), 128))
1781
+ })) : E("", !0)
1782
+ ], 10, Mn))), 128))
1764
1783
  ])),
1765
- ((je = u.value) == null ? void 0 : je.type) !== "input" && ((Ge = u.value) == null ? void 0 : Ge.type) !== "calendar" && !((qe = u.value) != null && qe.slot) && ((Qe = (Je = u.value) == null ? void 0 : Je.options) == null ? void 0 : Qe.length) === 0 ? (s(), f("div", _a, [...l[2] || (l[2] = [
1766
- C("p", null, "暂无选项", -1)
1767
- ])])) : D("", !0)
1784
+ ((Ae = l.value) == null ? void 0 : Ae.type) !== "input" && ((ze = l.value) == null ? void 0 : ze.type) !== "calendar" && !((nt = l.value) != null && nt.slot) && ((ot = (lt = l.value) == null ? void 0 : lt.options) == null ? void 0 : ot.length) === 0 ? (f(), g("div", Fn, [...m[2] || (m[2] = [
1785
+ T("p", null, "暂无选项", -1)
1786
+ ])])) : E("", !0)
1768
1787
  ]),
1769
- !t.autoConfirm && ((a = u.value) == null ? void 0 : a.type) !== "single" && ((i = u.value) == null ? void 0 : i.type) !== "tree-single" ? (s(), f("div", wa, [
1770
- G(Q(xe), {
1788
+ !e.autoConfirm && ((r = l.value) == null ? void 0 : r.type) !== "single" && ((b = l.value) == null ? void 0 : b.type) !== "tree-single" ? (f(), g("div", Tn, [
1789
+ ae(te(De), {
1771
1790
  block: "",
1772
- onClick: w
1791
+ onClick: N
1773
1792
  }, {
1774
- default: ae(() => [...l[3] || (l[3] = [
1775
- _e(" 重置 ", -1)
1793
+ default: fe(() => [...m[3] || (m[3] = [
1794
+ ve(" 重置 ", -1)
1776
1795
  ])]),
1777
1796
  _: 1
1778
1797
  }),
1779
- G(Q(xe), {
1798
+ ae(te(De), {
1780
1799
  type: "primary",
1781
1800
  block: "",
1782
- onClick: h
1801
+ onClick: _e
1783
1802
  }, {
1784
- default: ae(() => [
1785
- _e(" 确定" + P(ve.value), 1)
1803
+ default: fe(() => [
1804
+ ve(" 确定" + K(U.value), 1)
1786
1805
  ]),
1787
1806
  _: 1
1788
1807
  })
1789
- ])) : D("", !0)
1790
- ], 512)) : D("", !0)
1808
+ ])) : E("", !0)
1809
+ ], 512)) : E("", !0)
1791
1810
  ];
1792
1811
  }),
1793
1812
  _: 3
1794
1813
  })
1795
1814
  ]));
1796
1815
  }
1797
- }), xt = /* @__PURE__ */ se($a, [["__scopeId", "data-v-dd3a69e1"]]), Dt = (e) => {
1798
- e.component("RcSearchArea", xt), e.component("rc-search-area", xt);
1799
- }, xa = {
1800
- key: 0,
1816
+ }), Tt = /* @__PURE__ */ se(An, [["__scopeId", "data-v-084a312b"]]), At = (t) => {
1817
+ t.component("RcSearchArea", Tt), t.component("rc-search-area", Tt);
1818
+ }, En = ["disabled"], In = {
1819
+ key: 1,
1801
1820
  class: "rc-input__prepend"
1802
- }, Da = {
1821
+ }, zn = { class: "rc-input__wrapper" }, Ln = {
1803
1822
  key: 0,
1804
1823
  class: "rc-input__prefix"
1805
- }, Ca = {
1824
+ }, Nn = {
1806
1825
  key: 1,
1807
1826
  class: "rc-input__textarea-wrapper"
1808
- }, Sa = {
1827
+ }, Pn = {
1809
1828
  key: 3,
1810
1829
  class: "rc-input__suffix"
1811
- }, Ia = {
1830
+ }, Yn = {
1812
1831
  key: 0,
1813
1832
  class: "rc-input__suffix-inner"
1814
- }, Ma = {
1833
+ }, Wn = {
1815
1834
  key: 4,
1816
1835
  class: "rc-input__count"
1817
- }, Ra = {
1818
- key: 1,
1836
+ }, On = {
1837
+ key: 2,
1819
1838
  class: "rc-input__append"
1820
- }, Va = /* @__PURE__ */ re({
1839
+ }, Hn = ["disabled"], Gn = /* @__PURE__ */ oe({
1821
1840
  __name: "index",
1822
1841
  props: {
1823
1842
  modelValue: { default: "" },
@@ -1843,259 +1862,391 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1843
1862
  tabindex: { default: void 0 },
1844
1863
  formatter: { type: Function, default: void 0 },
1845
1864
  parser: { type: Function, default: void 0 },
1846
- deviceType: { default: void 0 }
1865
+ deviceType: { default: void 0 },
1866
+ min: { default: void 0 },
1867
+ max: { default: void 0 },
1868
+ step: { default: 1 },
1869
+ precision: { default: void 0 },
1870
+ controls: { type: Boolean, default: !1 },
1871
+ useGrouping: { type: Boolean, default: !1 }
1847
1872
  },
1848
1873
  emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "keydown", "mouseenter", "mouseleave", "compositionstart", "compositionupdate", "compositionend"],
1849
- setup(e, { expose: r, emit: m }) {
1850
- const t = e, g = Ce(lt, {}), k = R(() => t.deviceType || (g == null ? void 0 : g.inputDeviceType) || ct.inputDeviceType || "pc"), v = m, d = E(), o = E(t.modelValue ?? ""), p = E(!1), B = E(!1), x = E(!1);
1851
- Se(
1852
- () => t.modelValue,
1874
+ setup(t, { expose: d, emit: n }) {
1875
+ const e = t, p = le(ht, {}), i = le("rcFormItem", void 0), v = C(() => e.deviceType || (p == null ? void 0 : p.inputDeviceType) || bt.inputDeviceType || "pc"), a = n, u = W(), o = W(e.modelValue ?? ""), M = W(!1), x = W(!1), k = W(!1);
1876
+ me(
1877
+ () => e.modelValue,
1853
1878
  (h) => {
1854
1879
  o.value = h ?? "";
1855
1880
  }
1856
1881
  );
1857
- const _ = R(() => t.type === "password" ? B.value ? "text" : "password" : t.type), V = R(() => {
1882
+ const D = C(() => e.type === "number"), L = C(() => e.type === "password" ? x.value ? "text" : "password" : D.value ? "text" : e.type), _ = C(() => {
1883
+ if (D.value) {
1884
+ if (typeof o.value == "string" && o.value.endsWith(".") && !o.value.includes("e") && !o.value.includes("E"))
1885
+ return o.value;
1886
+ const O = $(o.value);
1887
+ if (O == null)
1888
+ return typeof o.value == "string" && (o.value === "-" || o.value === "") ? o.value : "";
1889
+ let B = String(O);
1890
+ return e.precision !== void 0 && (B = O.toFixed(e.precision)), e.useGrouping && !k.value && (B = S(B)), B;
1891
+ }
1858
1892
  const h = String(o.value ?? "");
1859
- return t.formatter && !x.value ? t.formatter(h) : h;
1860
- }), A = R(() => {
1893
+ return e.formatter && !k.value ? e.formatter(h) : h;
1894
+ }), l = C(() => {
1861
1895
  const h = o.value;
1862
1896
  return h !== "" && h !== null && h !== void 0;
1863
- }), I = R(() => String(o.value ?? "").length), u = R(() => !t.clearable || !A.value || t.disabled || t.readonly ? !1 : (k.value === "mobile", !0)), ve = zt(), ye = R(() => !!(t.suffixIcon || t.showPassword && t.type === "password" || u.value && t.type !== "textarea" || ve.suffix)), he = R(() => {
1864
- if (t.type !== "textarea") return {};
1897
+ }), U = C(() => String(o.value ?? "").length), Y = C(() => !e.clearable || !l.value || e.disabled || e.readonly ? !1 : (v.value === "mobile", !0)), c = jt(), R = C(() => D.value && e.controls ? !!(e.suffixIcon || Y.value && (v.value === "mobile" || e.controls) || c.suffix) : !!(e.suffixIcon || e.showPassword && e.type === "password" || Y.value && e.type !== "textarea" && (!D.value || D.value && (v.value === "mobile" || e.controls)) || c.suffix)), y = C(() => {
1898
+ if (e.type !== "textarea") return {};
1865
1899
  const h = {};
1866
- return t.autosize ? h.resize = "none" : t.resize !== void 0 ? h.resize = t.resize : h.resize = "vertical", h;
1900
+ return e.autosize ? h.resize = "none" : e.resize !== void 0 ? h.resize = e.resize : h.resize = "vertical", h;
1867
1901
  });
1868
- function H(h) {
1869
- let ne = h.target.value;
1870
- t.parser && !x.value && (ne = t.parser(ne));
1871
- const n = ne === "" ? void 0 : ne;
1872
- o.value = n, v("update:modelValue", n), v("input", n), t.type === "textarea" && t.autosize && Be(() => {
1873
- $e();
1902
+ function $(h) {
1903
+ if (h == null || h === "")
1904
+ return null;
1905
+ if (typeof h == "number")
1906
+ return isNaN(h) ? null : h;
1907
+ const O = Number(String(h).replace(/,/g, ""));
1908
+ return isNaN(O) ? null : O;
1909
+ }
1910
+ function S(h) {
1911
+ const O = h.split(".");
1912
+ return O[0] = O[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), O.join(".");
1913
+ }
1914
+ function F(h) {
1915
+ if (h === null) return null;
1916
+ let O = h;
1917
+ return e.min !== void 0 && O < e.min && (O = e.min), e.max !== void 0 && O > e.max && (O = e.max), e.precision !== void 0 && (O = Number(O.toFixed(e.precision))), O;
1918
+ }
1919
+ const A = C(() => {
1920
+ if (!D.value || e.max === void 0) return !1;
1921
+ const h = $(o.value);
1922
+ return h !== null && h >= e.max;
1923
+ }), H = C(() => {
1924
+ if (!D.value || e.min === void 0) return !1;
1925
+ const h = $(o.value);
1926
+ return h !== null && h <= e.min;
1927
+ });
1928
+ function z(h) {
1929
+ var Me, Te, Be;
1930
+ let B = h.target.value;
1931
+ if (D.value && (B = B.replace(/,/g, "")), e.parser && !k.value && (B = e.parser(B)), D.value) {
1932
+ if (B === "" || B === "-" || B === ".") {
1933
+ o.value = B === "" ? void 0 : B, a("update:modelValue", B === "" ? void 0 : B), a("input", B === "" ? void 0 : B), (Me = i == null ? void 0 : i.onChange) == null || Me.call(i);
1934
+ return;
1935
+ }
1936
+ if (/^-?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(B)) {
1937
+ const Ae = $(B);
1938
+ if (Ae !== null)
1939
+ if (B.endsWith(".") && !B.includes("e") && !B.includes("E"))
1940
+ o.value = B, a("update:modelValue", B), a("input", B);
1941
+ else {
1942
+ const ze = F(Ae);
1943
+ o.value = ze, a("update:modelValue", ze), a("input", ze);
1944
+ }
1945
+ else
1946
+ o.value = B, a("update:modelValue", B), a("input", B);
1947
+ } else {
1948
+ Ie(() => {
1949
+ if (u.value) {
1950
+ const Ae = _.value;
1951
+ u.value.value = Ae;
1952
+ }
1953
+ });
1954
+ return;
1955
+ }
1956
+ (Te = i == null ? void 0 : i.onChange) == null || Te.call(i);
1957
+ return;
1958
+ }
1959
+ const J = B === "" ? void 0 : B;
1960
+ o.value = J, a("update:modelValue", J), a("input", J), (Be = i == null ? void 0 : i.onChange) == null || Be.call(i), e.type === "textarea" && e.autosize && Ie(() => {
1961
+ m();
1874
1962
  });
1875
1963
  }
1876
- function N(h) {
1877
- p.value = !0, v("focus", h);
1964
+ function G(h) {
1965
+ M.value = !0, a("focus", h);
1878
1966
  }
1879
- function O(h) {
1880
- p.value = !1;
1881
- const X = o.value, ne = X === "" ? void 0 : X;
1882
- v("blur", h), v("change", ne);
1967
+ function pe(h) {
1968
+ var O;
1969
+ if (M.value = !1, D.value) {
1970
+ const B = $(o.value);
1971
+ if (B !== null) {
1972
+ const J = F(B);
1973
+ o.value = J, a("update:modelValue", J), a("change", J);
1974
+ } else
1975
+ o.value = void 0, a("update:modelValue", void 0), a("change", void 0);
1976
+ } else {
1977
+ const B = o.value;
1978
+ a("change", B === "" ? void 0 : B);
1979
+ }
1980
+ a("blur", h), (O = i == null ? void 0 : i.onBlur) == null || O.call(i);
1883
1981
  }
1884
- function F() {
1885
- o.value = void 0, v("update:modelValue", void 0), v("input", void 0), v("change", void 0), v("clear"), Be(() => {
1982
+ function $e() {
1983
+ o.value = void 0, a("update:modelValue", void 0), a("input", void 0), a("change", void 0), a("clear"), Ie(() => {
1886
1984
  var h;
1887
- (h = d.value) == null || h.focus();
1985
+ (h = u.value) == null || h.focus();
1888
1986
  });
1889
1987
  }
1890
- function U() {
1891
- B.value = !B.value;
1988
+ function Re() {
1989
+ x.value = !x.value;
1892
1990
  }
1893
- function S(h) {
1894
- if (v("keydown", h), h.key === "Enter" && t.type !== "textarea") {
1895
- const X = o.value;
1896
- v("change", X === "" ? void 0 : X);
1991
+ function Fe() {
1992
+ var J;
1993
+ if (e.disabled || e.readonly || A.value) return;
1994
+ const h = $(o.value), O = e.step ?? 1;
1995
+ let B;
1996
+ h === null ? B = F(e.min ?? 0) ?? 0 : B = F(h + O) ?? h, o.value = B, a("update:modelValue", B), a("input", B), a("change", B), (J = i == null ? void 0 : i.onChange) == null || J.call(i);
1997
+ }
1998
+ function I() {
1999
+ var J;
2000
+ if (e.disabled || e.readonly || H.value) return;
2001
+ const h = $(o.value), O = e.step ?? 1;
2002
+ let B;
2003
+ h === null ? B = F(e.max ?? 0) ?? 0 : B = F(h - O) ?? h, o.value = B, a("update:modelValue", B), a("input", B), a("change", B), (J = i == null ? void 0 : i.onChange) == null || J.call(i);
2004
+ }
2005
+ function N(h) {
2006
+ if (a("keydown", h), D.value && !e.disabled && !e.readonly) {
2007
+ const O = e.step ?? 1, B = $(o.value);
2008
+ if (h.key === "ArrowUp") {
2009
+ h.preventDefault(), Fe();
2010
+ return;
2011
+ }
2012
+ if (h.key === "ArrowDown") {
2013
+ h.preventDefault(), I();
2014
+ return;
2015
+ }
2016
+ if (h.key === "PageUp") {
2017
+ if (h.preventDefault(), B !== null) {
2018
+ const J = F(B + O * 10);
2019
+ o.value = J, a("update:modelValue", J), a("input", J), a("change", J);
2020
+ }
2021
+ return;
2022
+ }
2023
+ if (h.key === "PageDown") {
2024
+ if (h.preventDefault(), B !== null) {
2025
+ const J = F(B - O * 10);
2026
+ o.value = J, a("update:modelValue", J), a("input", J), a("change", J);
2027
+ }
2028
+ return;
2029
+ }
2030
+ }
2031
+ if (h.key === "Enter" && e.type !== "textarea") {
2032
+ const O = o.value;
2033
+ a("change", O === "" ? void 0 : O);
1897
2034
  }
1898
2035
  }
1899
- function T(h) {
1900
- v("mouseenter", h);
2036
+ function X(h) {
2037
+ a("mouseenter", h);
1901
2038
  }
1902
- function M(h) {
1903
- v("mouseleave", h);
2039
+ function de(h) {
2040
+ a("mouseleave", h);
1904
2041
  }
1905
- function Y(h) {
1906
- x.value = !0, v("compositionstart", h);
2042
+ function _e(h) {
2043
+ k.value = !0, a("compositionstart", h);
1907
2044
  }
1908
- function me(h) {
1909
- v("compositionupdate", h);
2045
+ function xe(h) {
2046
+ a("compositionupdate", h);
1910
2047
  }
1911
- function ge(h) {
1912
- x.value = !1, v("compositionend", h), h.target && H(h);
2048
+ function Se(h) {
2049
+ k.value = !1, a("compositionend", h), h.target && z(h);
1913
2050
  }
1914
- function we() {
2051
+ function s() {
1915
2052
  var h;
1916
- t.disabled || t.readonly || (h = d.value) == null || h.focus();
2053
+ e.disabled || e.readonly || (h = u.value) == null || h.focus();
1917
2054
  }
1918
- function $e() {
1919
- if (t.type !== "textarea" || !d.value) return;
1920
- const h = d.value;
1921
- if (t.autosize) {
2055
+ function m() {
2056
+ if (e.type !== "textarea" || !u.value) return;
2057
+ const h = u.value;
2058
+ if (e.autosize) {
1922
2059
  h.style.height = "auto";
1923
- const X = h.scrollHeight;
1924
- if (typeof t.autosize == "object") {
1925
- const { minRows: ne = 2, maxRows: n } = t.autosize, l = parseInt(getComputedStyle(h).lineHeight) || 20, c = ne * l, $ = n ? n * l : 1 / 0;
1926
- h.style.height = `${Math.min(Math.max(X, c), $)}px`;
2060
+ const O = h.scrollHeight;
2061
+ if (typeof e.autosize == "object") {
2062
+ const { minRows: B = 2, maxRows: J } = e.autosize, Me = parseInt(getComputedStyle(h).lineHeight) || 20, Te = B * Me, Be = J ? J * Me : 1 / 0;
2063
+ h.style.height = `${Math.min(Math.max(O, Te), Be)}px`;
1927
2064
  } else
1928
- h.style.height = `${X}px`;
2065
+ h.style.height = `${O}px`;
1929
2066
  }
1930
2067
  }
1931
- function b() {
2068
+ function w() {
1932
2069
  var h;
1933
- (h = d.value) == null || h.focus();
2070
+ (h = u.value) == null || h.focus();
1934
2071
  }
1935
- function w() {
2072
+ function P() {
1936
2073
  var h;
1937
- (h = d.value) == null || h.blur();
2074
+ (h = u.value) == null || h.blur();
1938
2075
  }
1939
- function L() {
1940
- d.value && "select" in d.value && d.value.select();
2076
+ function ne() {
2077
+ u.value && "select" in u.value && u.value.select();
1941
2078
  }
1942
2079
  function ee() {
1943
- F();
1944
- }
1945
- return nt(() => {
1946
- t.type === "textarea" && t.autosize && $e();
1947
- }), r({
1948
- focus: b,
1949
- blur: w,
1950
- select: L,
2080
+ $e();
2081
+ }
2082
+ return Je(() => {
2083
+ e.type === "textarea" && e.autosize && m();
2084
+ }), d({
2085
+ focus: w,
2086
+ blur: P,
2087
+ select: ne,
1951
2088
  clear: ee,
1952
- resizeTextarea: $e,
1953
- inputRef: d
1954
- }), (h, X) => (s(), f("div", {
1955
- class: j(["rc-input", [
1956
- `rc-input--${e.size}`,
2089
+ resizeTextarea: m,
2090
+ inputRef: u
2091
+ }), (h, O) => (f(), g("div", {
2092
+ class: q(["rc-input", [
2093
+ `rc-input--${t.size}`,
1957
2094
  {
1958
- "is-disabled": e.disabled,
1959
- "is-focused": p.value,
1960
- "is-readonly": e.readonly,
1961
- "rc-input--textarea": e.type === "textarea",
1962
- "has-prepend": h.$slots.prepend,
1963
- "has-append": h.$slots.append
2095
+ "is-disabled": t.disabled,
2096
+ "is-focused": M.value,
2097
+ "is-readonly": t.readonly,
2098
+ "rc-input--textarea": t.type === "textarea",
2099
+ "has-prepend": h.$slots.prepend || D.value && t.controls,
2100
+ "has-append": h.$slots.append || D.value && t.controls
1964
2101
  }
1965
2102
  ]]),
1966
- onClick: we
2103
+ onClick: s
1967
2104
  }, [
1968
- h.$slots.prepend ? (s(), f("div", xa, [
1969
- q(h.$slots, "prepend", {}, void 0, !0)
1970
- ])) : D("", !0),
1971
- C("div", {
1972
- class: j(["rc-input__wrapper", {
1973
- "has-clear": u.value && e.type !== "textarea",
1974
- "has-clear-textarea": u.value && e.type === "textarea",
1975
- "has-clear-mobile": u.value && k.value === "mobile" && e.type !== "textarea",
1976
- "has-clear-textarea-mobile": u.value && k.value === "mobile" && e.type === "textarea"
1977
- }])
1978
- }, [
1979
- e.prefixIcon || h.$slots.prefix ? (s(), f("div", Da, [
1980
- q(h.$slots, "prefix", {}, () => [
1981
- e.prefixIcon ? (s(), te(Q(Z), {
2105
+ D.value && t.controls ? (f(), g("button", {
2106
+ key: 0,
2107
+ type: "button",
2108
+ class: "rc-input__number-btn rc-input__number-btn--decrease rc-input__number-btn--prepend",
2109
+ disabled: e.disabled || e.readonly || H.value,
2110
+ onClick: Ee(I, ["stop"])
2111
+ }, [...O[0] || (O[0] = [
2112
+ T("span", { class: "rc-input__number-text" }, "-", -1)
2113
+ ])], 8, En)) : E("", !0),
2114
+ h.$slots.prepend ? (f(), g("div", In, [
2115
+ Q(h.$slots, "prepend", {}, void 0, !0)
2116
+ ])) : E("", !0),
2117
+ T("div", zn, [
2118
+ t.prefixIcon || h.$slots.prefix ? (f(), g("div", Ln, [
2119
+ Q(h.$slots, "prefix", {}, () => [
2120
+ t.prefixIcon ? (f(), ce(te(re), {
1982
2121
  key: 0,
1983
- name: e.prefixIcon,
2122
+ name: t.prefixIcon,
1984
2123
  class: "rc-input__prefix-icon"
1985
- }, null, 8, ["name"])) : D("", !0)
2124
+ }, null, 8, ["name"])) : E("", !0)
1986
2125
  ], !0)
1987
- ])) : D("", !0),
1988
- e.type === "textarea" ? (s(), f("div", Ca, [
1989
- (s(), te(vt("textarea"), {
2126
+ ])) : E("", !0),
2127
+ t.type === "textarea" ? (f(), g("div", Nn, [
2128
+ (f(), ce(wt("textarea"), {
1990
2129
  ref_key: "inputRef",
1991
- ref: d,
1992
- value: V.value,
2130
+ ref: u,
2131
+ value: _.value,
1993
2132
  class: "rc-input__field rc-input__field--textarea",
1994
- placeholder: e.placeholder,
1995
- disabled: e.disabled,
1996
- readonly: e.readonly,
1997
- maxlength: e.maxlength,
1998
- minlength: e.minlength,
1999
- rows: e.rows,
2000
- autocomplete: e.autocomplete,
2001
- name: e.name,
2002
- autofocus: e.autofocus,
2003
- form: e.form,
2004
- tabindex: e.tabindex,
2005
- style: le(he.value),
2006
- onInput: H,
2007
- onFocus: N,
2008
- onBlur: O,
2009
- onKeydown: S,
2010
- onMouseenter: T,
2011
- onMouseleave: M,
2012
- onCompositionstart: Y,
2013
- onCompositionupdate: me,
2014
- onCompositionend: ge
2133
+ placeholder: t.placeholder,
2134
+ disabled: t.disabled,
2135
+ readonly: t.readonly,
2136
+ maxlength: t.maxlength,
2137
+ minlength: t.minlength,
2138
+ rows: t.rows,
2139
+ autocomplete: t.autocomplete,
2140
+ name: t.name,
2141
+ autofocus: t.autofocus,
2142
+ form: t.form,
2143
+ tabindex: t.tabindex,
2144
+ style: ie(y.value),
2145
+ onInput: z,
2146
+ onFocus: G,
2147
+ onBlur: pe,
2148
+ onKeydown: N,
2149
+ onMouseenter: X,
2150
+ onMouseleave: de,
2151
+ onCompositionstart: _e,
2152
+ onCompositionupdate: xe,
2153
+ onCompositionend: Se
2015
2154
  }, null, 40, ["value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "rows", "autocomplete", "name", "autofocus", "form", "tabindex", "style"])),
2016
- u.value && e.type === "textarea" ? (s(), f("button", {
2155
+ Y.value && t.type === "textarea" ? (f(), g("button", {
2017
2156
  key: 0,
2018
2157
  type: "button",
2019
- class: j(["rc-input__clear rc-input__clear--textarea", { "rc-input__clear--mobile": k.value === "mobile" }]),
2020
- onClick: Fe(F, ["stop"])
2158
+ class: q(["rc-input__clear rc-input__clear--textarea", { "rc-input__clear--mobile": v.value === "mobile" }]),
2159
+ onClick: Ee($e, ["stop"])
2021
2160
  }, [
2022
- G(Q(Z), {
2161
+ ae(te(re), {
2023
2162
  name: "icon_close_circle",
2024
2163
  class: "rc-input__clear-icon"
2025
2164
  })
2026
- ], 2)) : D("", !0)
2027
- ])) : (s(), te(vt("input"), {
2165
+ ], 2)) : E("", !0)
2166
+ ])) : (f(), ce(wt("input"), {
2028
2167
  key: 2,
2029
2168
  ref_key: "inputRef",
2030
- ref: d,
2031
- value: V.value,
2032
- type: _.value,
2033
- class: "rc-input__field",
2034
- placeholder: e.placeholder,
2035
- disabled: e.disabled,
2036
- readonly: e.readonly,
2037
- maxlength: e.maxlength,
2038
- minlength: e.minlength,
2039
- autocomplete: e.autocomplete,
2040
- name: e.name,
2041
- autofocus: e.autofocus,
2042
- form: e.form,
2043
- tabindex: e.tabindex,
2044
- onInput: H,
2045
- onFocus: N,
2046
- onBlur: O,
2047
- onKeydown: S,
2048
- onMouseenter: T,
2049
- onMouseleave: M,
2050
- onCompositionstart: Y,
2051
- onCompositionupdate: me,
2052
- onCompositionend: ge
2053
- }, null, 40, ["value", "type", "placeholder", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "tabindex"])),
2054
- ye.value ? (s(), f("div", Sa, [
2055
- h.$slots.suffix ? (s(), f("div", Ia, [
2056
- q(h.$slots, "suffix", {}, void 0, !0)
2057
- ])) : D("", !0),
2058
- e.showPassword && e.type === "password" && A.value ? (s(), f("button", {
2169
+ ref: u,
2170
+ value: _.value,
2171
+ type: L.value,
2172
+ class: q(["rc-input__field", { "rc-input__field--number": D.value }]),
2173
+ placeholder: t.placeholder,
2174
+ disabled: t.disabled,
2175
+ readonly: t.readonly,
2176
+ maxlength: t.maxlength,
2177
+ minlength: t.minlength,
2178
+ autocomplete: t.autocomplete,
2179
+ name: t.name,
2180
+ autofocus: t.autofocus,
2181
+ form: t.form,
2182
+ tabindex: t.tabindex,
2183
+ min: D.value ? t.min : void 0,
2184
+ max: D.value ? t.max : void 0,
2185
+ step: D.value ? t.step : void 0,
2186
+ onInput: z,
2187
+ onFocus: G,
2188
+ onBlur: pe,
2189
+ onKeydown: N,
2190
+ onMouseenter: X,
2191
+ onMouseleave: de,
2192
+ onCompositionstart: _e,
2193
+ onCompositionupdate: xe,
2194
+ onCompositionend: Se
2195
+ }, null, 40, ["value", "type", "class", "placeholder", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "tabindex", "min", "max", "step"])),
2196
+ R.value ? (f(), g("div", Pn, [
2197
+ h.$slots.suffix ? (f(), g("div", Yn, [
2198
+ Q(h.$slots, "suffix", {}, void 0, !0)
2199
+ ])) : E("", !0),
2200
+ t.showPassword && t.type === "password" && l.value ? (f(), g("button", {
2059
2201
  key: 1,
2060
2202
  type: "button",
2061
2203
  class: "rc-input__password-toggle",
2062
- onClick: Fe(U, ["stop"])
2204
+ onClick: Ee(Re, ["stop"])
2063
2205
  }, [
2064
- G(Q(Z), {
2065
- color: B.value ? "#1677ff" : "#999",
2066
- name: B.value ? "icon_view" : "icon_view-off"
2206
+ ae(te(re), {
2207
+ color: x.value ? "#1677ff" : "#999",
2208
+ name: x.value ? "icon_view" : "icon_view-off"
2067
2209
  }, null, 8, ["color", "name"])
2068
- ])) : D("", !0),
2069
- u.value && e.type !== "textarea" ? (s(), f("button", {
2210
+ ])) : E("", !0),
2211
+ Y.value && t.type !== "textarea" && (!D.value || D.value && (v.value === "mobile" || t.controls)) ? (f(), g("button", {
2070
2212
  key: 2,
2071
2213
  type: "button",
2072
- class: j(["rc-input__clear", { "rc-input__clear--mobile": k.value === "mobile" }]),
2073
- onClick: Fe(F, ["stop"])
2214
+ class: q(["rc-input__clear", { "rc-input__clear--mobile": v.value === "mobile" }]),
2215
+ onClick: Ee($e, ["stop"])
2074
2216
  }, [
2075
- G(Q(Z), {
2217
+ ae(te(re), {
2076
2218
  name: "icon_close_circle",
2077
2219
  class: "rc-input__clear-icon"
2078
2220
  })
2079
- ], 2)) : D("", !0),
2080
- e.suffixIcon && !e.clearable && !e.showPassword ? (s(), te(Q(Z), {
2221
+ ], 2)) : E("", !0),
2222
+ t.suffixIcon && !t.clearable && !t.showPassword && !D.value ? (f(), ce(te(re), {
2081
2223
  key: 3,
2082
- name: e.suffixIcon,
2224
+ name: t.suffixIcon,
2083
2225
  class: "rc-input__suffix-icon"
2084
- }, null, 8, ["name"])) : D("", !0)
2085
- ])) : D("", !0),
2086
- e.showWordLimit && e.maxlength ? (s(), f("span", Ma, P(I.value) + " / " + P(e.maxlength), 1)) : D("", !0)
2087
- ], 2),
2088
- h.$slots.append ? (s(), f("div", Ra, [
2089
- q(h.$slots, "append", {}, void 0, !0)
2090
- ])) : D("", !0)
2226
+ }, null, 8, ["name"])) : E("", !0)
2227
+ ])) : E("", !0),
2228
+ t.showWordLimit && t.maxlength ? (f(), g("span", Wn, K(U.value) + " / " + K(t.maxlength), 1)) : E("", !0)
2229
+ ]),
2230
+ h.$slots.append ? (f(), g("div", On, [
2231
+ Q(h.$slots, "append", {}, void 0, !0)
2232
+ ])) : E("", !0),
2233
+ D.value && t.controls ? (f(), g("button", {
2234
+ key: 3,
2235
+ type: "button",
2236
+ class: "rc-input__number-btn rc-input__number-btn--increase rc-input__number-btn--append",
2237
+ disabled: e.disabled || e.readonly || A.value,
2238
+ onClick: Ee(Fe, ["stop"])
2239
+ }, [...O[1] || (O[1] = [
2240
+ T("span", { class: "rc-input__number-text" }, "+", -1)
2241
+ ])], 8, Hn)) : E("", !0)
2091
2242
  ], 2));
2092
2243
  }
2093
- }), rt = /* @__PURE__ */ se(Va, [["__scopeId", "data-v-050956ab"]]);
2094
- rt.name = "rc-input";
2095
- function Ct(e) {
2096
- return e.component(rt.name, rt), e;
2244
+ }), Ze = /* @__PURE__ */ se(Gn, [["__scopeId", "data-v-6bd7703b"]]);
2245
+ Ze && (Ze.name = "rc-input");
2246
+ function Et(t) {
2247
+ return Ze && t.component(Ze.name || "rc-input", Ze), t;
2097
2248
  }
2098
- const Ta = /* @__PURE__ */ re({
2249
+ const Un = /* @__PURE__ */ oe({
2099
2250
  name: "rc-dropdown-menu",
2100
2251
  __name: "menu",
2101
2252
  props: {
@@ -2104,50 +2255,50 @@ const Ta = /* @__PURE__ */ re({
2104
2255
  maxHeight: { default: "" }
2105
2256
  },
2106
2257
  emits: ["mouseenter", "mouseleave"],
2107
- setup(e, { expose: r, emit: m }) {
2108
- const t = e, g = E(), k = R(() => t.visible === void 0 ? !0 : t.visible), v = R(() => t.visible !== void 0), d = R(() => {
2109
- const o = {};
2110
- return t.maxHeight && (o.maxHeight = typeof t.maxHeight == "number" ? `${t.maxHeight}px` : t.maxHeight, o.overflowY = "auto"), o;
2258
+ setup(t, { expose: d, emit: n }) {
2259
+ const e = t, p = W(), i = C(() => e.visible === void 0 ? !0 : e.visible), v = C(() => e.visible !== void 0), a = C(() => {
2260
+ const u = {};
2261
+ return e.maxHeight && (u.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight, u.overflowY = "auto"), u;
2111
2262
  });
2112
- return r({
2113
- menuRef: g
2114
- }), (o, p) => v.value ? (s(), te(it, {
2263
+ return d({
2264
+ menuRef: p
2265
+ }), (u, o) => v.value ? (f(), ce(yt, {
2115
2266
  key: 0,
2116
2267
  to: "body"
2117
2268
  }, [
2118
- G(Ee, { name: "rc-dropdown-fade" }, {
2119
- default: ae(() => [
2120
- k.value ? (s(), f("ul", {
2269
+ ae(Pe, { name: "rc-dropdown-fade" }, {
2270
+ default: fe(() => [
2271
+ i.value ? (f(), g("ul", {
2121
2272
  key: 0,
2122
2273
  ref_key: "menuRef",
2123
- ref: g,
2124
- class: j(["rc-dropdown-menu", [`rc-dropdown-menu--${e.effect}`]]),
2125
- style: le(d.value),
2126
- onClick: p[0] || (p[0] = Fe(() => {
2274
+ ref: p,
2275
+ class: q(["rc-dropdown-menu", [`rc-dropdown-menu--${t.effect}`]]),
2276
+ style: ie(a.value),
2277
+ onClick: o[0] || (o[0] = Ee(() => {
2127
2278
  }, ["stop"])),
2128
- onMouseenter: p[1] || (p[1] = (B) => o.$emit("mouseenter", B)),
2129
- onMouseleave: p[2] || (p[2] = (B) => o.$emit("mouseleave", B))
2279
+ onMouseenter: o[1] || (o[1] = (M) => u.$emit("mouseenter", M)),
2280
+ onMouseleave: o[2] || (o[2] = (M) => u.$emit("mouseleave", M))
2130
2281
  }, [
2131
- q(o.$slots, "default", {}, void 0, !0)
2132
- ], 38)) : D("", !0)
2282
+ Q(u.$slots, "default", {}, void 0, !0)
2283
+ ], 38)) : E("", !0)
2133
2284
  ]),
2134
2285
  _: 3
2135
2286
  })
2136
- ])) : (s(), f("ul", {
2287
+ ])) : (f(), g("ul", {
2137
2288
  key: 1,
2138
2289
  ref_key: "menuRef",
2139
- ref: g,
2140
- class: j(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${e.effect}`]]),
2141
- style: le(d.value),
2142
- onClick: p[3] || (p[3] = Fe(() => {
2290
+ ref: p,
2291
+ class: q(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${t.effect}`]]),
2292
+ style: ie(a.value),
2293
+ onClick: o[3] || (o[3] = Ee(() => {
2143
2294
  }, ["stop"])),
2144
- onMouseenter: p[4] || (p[4] = (B) => o.$emit("mouseenter", B)),
2145
- onMouseleave: p[5] || (p[5] = (B) => o.$emit("mouseleave", B))
2295
+ onMouseenter: o[4] || (o[4] = (M) => u.$emit("mouseenter", M)),
2296
+ onMouseleave: o[5] || (o[5] = (M) => u.$emit("mouseleave", M))
2146
2297
  }, [
2147
- q(o.$slots, "default", {}, void 0, !0)
2298
+ Q(u.$slots, "default", {}, void 0, !0)
2148
2299
  ], 38));
2149
2300
  }
2150
- }), tt = /* @__PURE__ */ se(Ta, [["__scopeId", "data-v-288e2690"]]), Ea = /* @__PURE__ */ re({
2301
+ }), Oe = /* @__PURE__ */ se(Un, [["__scopeId", "data-v-288e2690"]]), qn = /* @__PURE__ */ oe({
2151
2302
  name: "rc-dropdown",
2152
2303
  __name: "index",
2153
2304
  props: {
@@ -2161,153 +2312,153 @@ const Ta = /* @__PURE__ */ re({
2161
2312
  hideTimeout: { default: 150 }
2162
2313
  },
2163
2314
  emits: ["command", "visible-change"],
2164
- setup(e, { expose: r, emit: m }) {
2165
- const t = e, g = m, k = E(), v = E(), d = E(!1);
2166
- let o = null, p = null;
2167
- function B(F) {
2168
- t.hideOnClick && (d.value = !1), F !== void 0 && g("command", F);
2315
+ setup(t, { expose: d, emit: n }) {
2316
+ const e = t, p = n, i = W(), v = W(), a = W(!1);
2317
+ let u = null, o = null;
2318
+ function M(S) {
2319
+ e.hideOnClick && (a.value = !1), S !== void 0 && p("command", S);
2169
2320
  }
2170
- Ve("handleItemClick", B);
2321
+ we("handleItemClick", M);
2171
2322
  function x() {
2172
- t.disabled || (o && (clearTimeout(o), o = null), p && (clearTimeout(p), p = null), o = setTimeout(() => {
2173
- d.value = !0, requestAnimationFrame(() => {
2174
- Be(() => {
2175
- H();
2323
+ e.disabled || (u && (clearTimeout(u), u = null), o && (clearTimeout(o), o = null), u = setTimeout(() => {
2324
+ a.value = !0, requestAnimationFrame(() => {
2325
+ Ie(() => {
2326
+ R();
2176
2327
  });
2177
2328
  });
2178
- }, t.showTimeout));
2329
+ }, e.showTimeout));
2179
2330
  }
2180
- function _() {
2181
- t.trigger === "hover" && u.value || (p && (clearTimeout(p), p = null), o && (clearTimeout(o), o = null), p = setTimeout(() => {
2182
- d.value = !1, u.value = !1;
2183
- }, t.hideTimeout));
2331
+ function k() {
2332
+ e.trigger === "hover" && l.value || (o && (clearTimeout(o), o = null), u && (clearTimeout(u), u = null), o = setTimeout(() => {
2333
+ a.value = !1, l.value = !1;
2334
+ }, e.hideTimeout));
2184
2335
  }
2185
- function V() {
2186
- t.disabled || (d.value ? _() : x());
2336
+ function D() {
2337
+ e.disabled || (a.value ? k() : x());
2187
2338
  }
2188
- function A() {
2189
- t.trigger === "hover" && !t.disabled && x();
2339
+ function L() {
2340
+ e.trigger === "hover" && !e.disabled && x();
2190
2341
  }
2191
- function I() {
2192
- t.trigger === "hover" && setTimeout(() => {
2193
- u.value || _();
2342
+ function _() {
2343
+ e.trigger === "hover" && setTimeout(() => {
2344
+ l.value || k();
2194
2345
  }, 50);
2195
2346
  }
2196
- const u = E(!1);
2197
- function ve() {
2198
- t.trigger === "hover" && (u.value = !0, o && (clearTimeout(o), o = null), p && (clearTimeout(p), p = null));
2347
+ const l = W(!1);
2348
+ function U() {
2349
+ e.trigger === "hover" && (l.value = !0, u && (clearTimeout(u), u = null), o && (clearTimeout(o), o = null));
2199
2350
  }
2200
- function ye() {
2201
- t.trigger === "hover" && (u.value = !1, _());
2351
+ function Y() {
2352
+ e.trigger === "hover" && (l.value = !1, k());
2202
2353
  }
2203
- function he(F) {
2204
- t.trigger === "click" && !t.disabled && (F.stopPropagation(), V());
2354
+ function c(S) {
2355
+ e.trigger === "click" && !e.disabled && (S.stopPropagation(), D());
2205
2356
  }
2206
- function H() {
2207
- var we;
2208
- if (!k.value || !((we = v.value) != null && we.menuRef)) return;
2209
- const F = k.value, U = v.value.menuRef;
2210
- if (!F || !U) return;
2211
- const S = F.getBoundingClientRect(), T = U.getBoundingClientRect();
2212
- if (T.width === 0 || T.height === 0) {
2357
+ function R() {
2358
+ var Re;
2359
+ if (!i.value || !((Re = v.value) != null && Re.menuRef)) return;
2360
+ const S = i.value, F = v.value.menuRef;
2361
+ if (!S || !F) return;
2362
+ const A = S.getBoundingClientRect(), H = F.getBoundingClientRect();
2363
+ if (H.width === 0 || H.height === 0) {
2213
2364
  setTimeout(() => {
2214
- d.value && H();
2365
+ a.value && R();
2215
2366
  }, 10);
2216
2367
  return;
2217
2368
  }
2218
- let M = 0, Y = 0;
2219
- switch (t.placement) {
2369
+ let z = 0, G = 0;
2370
+ switch (e.placement) {
2220
2371
  case "top":
2221
- M = S.top - T.height, Y = S.left;
2372
+ z = A.top - H.height, G = A.left;
2222
2373
  break;
2223
2374
  case "top-start":
2224
- M = S.top - T.height, Y = S.left;
2375
+ z = A.top - H.height, G = A.left;
2225
2376
  break;
2226
2377
  case "top-end":
2227
- M = S.top - T.height, Y = S.left + S.width - T.width;
2378
+ z = A.top - H.height, G = A.left + A.width - H.width;
2228
2379
  break;
2229
2380
  case "bottom":
2230
- M = S.bottom, Y = S.left + (S.width - T.width) / 2;
2381
+ z = A.bottom, G = A.left + (A.width - H.width) / 2;
2231
2382
  break;
2232
2383
  case "bottom-start":
2233
- M = S.bottom, Y = S.left;
2384
+ z = A.bottom, G = A.left;
2234
2385
  break;
2235
2386
  case "bottom-end":
2236
- M = S.bottom, Y = S.left + S.width - T.width;
2387
+ z = A.bottom, G = A.left + A.width - H.width;
2237
2388
  break;
2238
2389
  case "left":
2239
- M = S.top + (S.height - T.height) / 2, Y = S.left - T.width;
2390
+ z = A.top + (A.height - H.height) / 2, G = A.left - H.width;
2240
2391
  break;
2241
2392
  case "left-start":
2242
- M = S.top, Y = S.left - T.width;
2393
+ z = A.top, G = A.left - H.width;
2243
2394
  break;
2244
2395
  case "left-end":
2245
- M = S.top + S.height - T.height, Y = S.left - T.width;
2396
+ z = A.top + A.height - H.height, G = A.left - H.width;
2246
2397
  break;
2247
2398
  case "right":
2248
- M = S.top + (S.height - T.height) / 2, Y = S.right;
2399
+ z = A.top + (A.height - H.height) / 2, G = A.right;
2249
2400
  break;
2250
2401
  case "right-start":
2251
- M = S.top, Y = S.right;
2402
+ z = A.top, G = A.right;
2252
2403
  break;
2253
2404
  case "right-end":
2254
- M = S.top + S.height - T.height, Y = S.right;
2405
+ z = A.top + A.height - H.height, G = A.right;
2255
2406
  break;
2256
2407
  }
2257
- const me = window.innerWidth, ge = window.innerHeight;
2258
- Y < 0 && (Y = 8), Y + T.width > me && (Y = me - T.width - 8), M < 0 && (M = 8), M + T.height > ge && (M = ge - T.height - 8), U.style.top = `${M}px`, U.style.left = `${Y}px`, U.style.position = "fixed", U.style.visibility = "visible", U.style.display = "block";
2408
+ const pe = window.innerWidth, $e = window.innerHeight;
2409
+ G < 0 && (G = 8), G + H.width > pe && (G = pe - H.width - 8), z < 0 && (z = 8), z + H.height > $e && (z = $e - H.height - 8), F.style.top = `${z}px`, F.style.left = `${G}px`, F.style.position = "fixed", F.style.visibility = "visible", F.style.display = "block";
2259
2410
  }
2260
- Se(d, (F) => {
2261
- g("visible-change", F), F ? (requestAnimationFrame(() => {
2262
- Be(() => {
2263
- H();
2411
+ me(a, (S) => {
2412
+ p("visible-change", S), S ? (requestAnimationFrame(() => {
2413
+ Ie(() => {
2414
+ R();
2264
2415
  });
2265
- }), document.addEventListener("click", N)) : document.removeEventListener("click", N);
2416
+ }), document.addEventListener("click", y)) : document.removeEventListener("click", y);
2266
2417
  });
2267
- function N(F) {
2268
- if (t.trigger === "click" && !t.disabled) {
2269
- const U = F.target;
2270
- k.value && !k.value.contains(U) && _();
2418
+ function y(S) {
2419
+ if (e.trigger === "click" && !e.disabled) {
2420
+ const F = S.target;
2421
+ i.value && !i.value.contains(F) && k();
2271
2422
  }
2272
2423
  }
2273
- function O() {
2274
- d.value && H();
2424
+ function $() {
2425
+ a.value && R();
2275
2426
  }
2276
- return nt(() => {
2277
- window.addEventListener("resize", O), window.addEventListener("scroll", O, !0);
2427
+ return Je(() => {
2428
+ window.addEventListener("resize", $), window.addEventListener("scroll", $, !0);
2278
2429
  }), at(() => {
2279
- o && clearTimeout(o), p && clearTimeout(p), document.removeEventListener("click", N), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
2280
- }), r({
2430
+ u && clearTimeout(u), o && clearTimeout(o), document.removeEventListener("click", y), window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0);
2431
+ }), d({
2281
2432
  show: x,
2282
- hide: _,
2283
- toggle: V,
2284
- visible: d
2285
- }), (F, U) => (s(), f("div", {
2433
+ hide: k,
2434
+ toggle: D,
2435
+ visible: a
2436
+ }), (S, F) => (f(), g("div", {
2286
2437
  ref_key: "dropdownRef",
2287
- ref: k,
2288
- class: j(["rc-dropdown", { "is-disabled": e.disabled }]),
2289
- onMouseenter: A,
2290
- onMouseleave: I,
2291
- onClick: he
2438
+ ref: i,
2439
+ class: q(["rc-dropdown", { "is-disabled": t.disabled }]),
2440
+ onMouseenter: L,
2441
+ onMouseleave: _,
2442
+ onClick: c
2292
2443
  }, [
2293
- q(F.$slots, "default", {}, void 0, !0),
2294
- G(tt, {
2444
+ Q(S.$slots, "default", {}, void 0, !0),
2445
+ ae(Oe, {
2295
2446
  ref_key: "menuRef",
2296
2447
  ref: v,
2297
- visible: d.value,
2298
- effect: e.effect,
2299
- "max-height": e.maxHeight,
2300
- onMouseenter: ve,
2301
- onMouseleave: ye
2448
+ visible: a.value,
2449
+ effect: t.effect,
2450
+ "max-height": t.maxHeight,
2451
+ onMouseenter: U,
2452
+ onMouseleave: Y
2302
2453
  }, {
2303
- default: ae(() => [
2304
- q(F.$slots, "dropdown", {}, void 0, !0)
2454
+ default: fe(() => [
2455
+ Q(S.$slots, "dropdown", {}, void 0, !0)
2305
2456
  ]),
2306
2457
  _: 3
2307
2458
  }, 8, ["visible", "effect", "max-height"])
2308
2459
  ], 34));
2309
2460
  }
2310
- }), st = /* @__PURE__ */ se(Ea, [["__scopeId", "data-v-30feb4c4"]]), Ba = { class: "rc-dropdown-item__text" }, Aa = /* @__PURE__ */ re({
2461
+ }), Ue = /* @__PURE__ */ se(qn, [["__scopeId", "data-v-d6804671"]]), Kn = { class: "rc-dropdown-item__text" }, jn = /* @__PURE__ */ oe({
2311
2462
  name: "rc-dropdown-item",
2312
2463
  __name: "item",
2313
2464
  props: {
@@ -2316,44 +2467,902 @@ const Ta = /* @__PURE__ */ re({
2316
2467
  divided: { type: Boolean, default: !1 },
2317
2468
  icon: { default: "" }
2318
2469
  },
2319
- setup(e) {
2320
- const r = e, m = Ce("handleItemClick", () => {
2470
+ setup(t) {
2471
+ const d = t, n = le("handleItemClick", () => {
2321
2472
  });
2322
- function t(g) {
2323
- if (r.disabled) {
2324
- g.stopPropagation();
2473
+ function e(p) {
2474
+ if (d.disabled) {
2475
+ p.stopPropagation();
2325
2476
  return;
2326
2477
  }
2327
- m(r.command);
2478
+ n(d.command);
2328
2479
  }
2329
- return (g, k) => (s(), f("li", {
2330
- class: j(["rc-dropdown-item", {
2331
- "is-disabled": e.disabled,
2332
- "is-divided": e.divided
2480
+ return (p, i) => (f(), g("li", {
2481
+ class: q(["rc-dropdown-item", {
2482
+ "is-disabled": t.disabled,
2483
+ "is-divided": t.divided
2333
2484
  }]),
2334
- onClick: t
2485
+ onClick: e
2335
2486
  }, [
2336
- e.icon ? (s(), te(Z, {
2487
+ t.icon ? (f(), ce(re, {
2337
2488
  key: 0,
2338
- name: e.icon,
2489
+ name: t.icon,
2339
2490
  class: "rc-dropdown-item__icon"
2340
- }, null, 8, ["name"])) : D("", !0),
2341
- C("span", Ba, [
2342
- q(g.$slots, "default", {}, void 0, !0)
2491
+ }, null, 8, ["name"])) : E("", !0),
2492
+ T("span", Kn, [
2493
+ Q(p.$slots, "default", {}, void 0, !0)
2343
2494
  ])
2344
2495
  ], 2));
2345
2496
  }
2346
- }), ut = /* @__PURE__ */ se(Aa, [["__scopeId", "data-v-7c739fdf"]]);
2347
- st.name = "rc-dropdown";
2348
- tt.name = "rc-dropdown-menu";
2349
- ut.name = "rc-dropdown-item";
2350
- function St(e) {
2351
- return e.component(st.name, st), e.component(tt.name, tt), e.component(ut.name, ut), e;
2497
+ }), qe = /* @__PURE__ */ se(jn, [["__scopeId", "data-v-7c739fdf"]]);
2498
+ Ue && (Ue.name = "rc-dropdown");
2499
+ Oe && (Oe.name = "rc-dropdown-menu");
2500
+ qe && (qe.name = "rc-dropdown-item");
2501
+ function It(t) {
2502
+ return Ue && (t.component(Ue.name || "rc-dropdown", Ue), t.component("RcDropdown", Ue)), Oe && (t.component(Oe.name || "rc-dropdown-menu", Oe), t.component("RcDropdownMenu", Oe)), qe && (t.component(qe.name || "rc-dropdown-item", qe), t.component("RcDropdownItem", qe)), t;
2503
+ }
2504
+ const Jn = /* @__PURE__ */ oe({
2505
+ __name: "index",
2506
+ props: {
2507
+ model: { default: () => ({}) },
2508
+ rules: { default: () => ({}) },
2509
+ labelWidth: { default: void 0 },
2510
+ labelPosition: { default: "left" },
2511
+ inline: { type: Boolean, default: !1 },
2512
+ size: { default: "default" },
2513
+ disabled: { type: Boolean, default: !1 },
2514
+ validateOnRuleChange: { type: Boolean, default: !0 },
2515
+ hideRequiredAsterisk: { type: Boolean, default: !1 },
2516
+ showMessage: { type: Boolean, default: !0 }
2517
+ },
2518
+ emits: ["validate"],
2519
+ setup(t, { expose: d, emit: n }) {
2520
+ const e = t, p = n, i = W(), v = W(/* @__PURE__ */ new Map()), a = W({}), u = (y) => {
2521
+ if (y === null || typeof y != "object")
2522
+ return y;
2523
+ if (y instanceof Date)
2524
+ return new Date(y.getTime());
2525
+ if (y instanceof Array)
2526
+ return y.map(($) => u($));
2527
+ if (typeof y == "object") {
2528
+ const $ = {};
2529
+ for (const S in y)
2530
+ y.hasOwnProperty(S) && ($[S] = u(y[S]));
2531
+ return $;
2532
+ }
2533
+ return y;
2534
+ }, o = () => {
2535
+ e.model && (a.value = u(e.model));
2536
+ }, M = (y, $) => {
2537
+ v.value.set(y, $);
2538
+ }, x = (y) => {
2539
+ v.value.delete(y);
2540
+ };
2541
+ we("rcForm", {
2542
+ model: e.model,
2543
+ rules: e.rules,
2544
+ labelWidth: e.labelWidth,
2545
+ labelPosition: e.labelPosition,
2546
+ size: e.size,
2547
+ disabled: e.disabled,
2548
+ hideRequiredAsterisk: e.hideRequiredAsterisk,
2549
+ showMessage: e.showMessage,
2550
+ registerFormItem: M,
2551
+ unregisterFormItem: x,
2552
+ validateField: (y, $) => {
2553
+ const S = v.value.get(y);
2554
+ return S ? S.validate($) : Promise.resolve();
2555
+ }
2556
+ });
2557
+ let k = !1;
2558
+ const D = () => {
2559
+ k || (k = !0, l((y) => {
2560
+ k = !1, y ? console.log("表单验证通过", e.model) : console.log("表单验证失败");
2561
+ }).catch(() => {
2562
+ k = !1;
2563
+ }));
2564
+ };
2565
+ we("rcFormActions", {
2566
+ submit: D,
2567
+ reset: () => {
2568
+ Y();
2569
+ }
2570
+ });
2571
+ let _ = !1;
2572
+ me(
2573
+ () => e.model,
2574
+ () => {
2575
+ !_ && e.model && (o(), _ = !0);
2576
+ },
2577
+ { immediate: !0, deep: !0 }
2578
+ ), Je(() => {
2579
+ !_ && e.model && (o(), _ = !0);
2580
+ }), me(
2581
+ () => e.rules,
2582
+ () => {
2583
+ e.validateOnRuleChange && Ie(() => {
2584
+ l().catch(() => {
2585
+ });
2586
+ });
2587
+ },
2588
+ { deep: !0 }
2589
+ );
2590
+ const l = (y) => new Promise(($) => {
2591
+ const S = [], F = {};
2592
+ v.value.forEach((A, H) => {
2593
+ const z = A.validate().then(() => {
2594
+ p("validate", H, !0, "");
2595
+ }).catch((G) => {
2596
+ G && (F[H] = [G], p("validate", H, !1, G));
2597
+ });
2598
+ S.push(z);
2599
+ }), Promise.all(S).then(() => {
2600
+ const A = Object.keys(F).length === 0;
2601
+ y && y(A, A ? void 0 : F), $(A);
2602
+ }).catch(() => {
2603
+ const A = Object.keys(F).length === 0;
2604
+ y && y(A, A ? void 0 : F), $(A);
2605
+ });
2606
+ }), U = (y, $) => {
2607
+ const S = v.value.get(y);
2608
+ return S ? S.validate($) : Promise.resolve();
2609
+ }, Y = () => {
2610
+ v.value.forEach((y) => {
2611
+ y.resetField();
2612
+ }), e.model && a.value && (Object.keys(e.model).forEach((y) => {
2613
+ delete e.model[y];
2614
+ }), Object.keys(a.value).forEach((y) => {
2615
+ e.model[y] = u(a.value[y]);
2616
+ }));
2617
+ }, c = (y) => {
2618
+ const $ = y ? Array.isArray(y) ? y : [y] : void 0;
2619
+ v.value.forEach((S, F) => {
2620
+ (!$ || $.includes(F)) && S.clearValidate();
2621
+ });
2622
+ }, R = (y) => {
2623
+ y.preventDefault(), D();
2624
+ };
2625
+ return d({
2626
+ validate: l,
2627
+ validateField: U,
2628
+ resetFields: Y,
2629
+ clearValidate: c,
2630
+ formRef: i
2631
+ }), (y, $) => (f(), g("form", {
2632
+ ref_key: "formRef",
2633
+ ref: i,
2634
+ class: q(["rc-form", [
2635
+ `rc-form--${t.labelPosition}`,
2636
+ {
2637
+ "rc-form--inline": t.inline
2638
+ }
2639
+ ]]),
2640
+ onSubmit: Ee(R, ["prevent"])
2641
+ }, [
2642
+ Q(y.$slots, "default", {}, void 0, !0)
2643
+ ], 34));
2644
+ }
2645
+ }), et = /* @__PURE__ */ se(Jn, [["__scopeId", "data-v-194b6d22"]]), Qn = ["for"], Xn = { key: 0 }, Zn = { class: "rc-form-item__content" }, el = { class: "rc-form-item__control" }, tl = {
2646
+ key: 0,
2647
+ class: "rc-form-item__error"
2648
+ }, al = /* @__PURE__ */ oe({
2649
+ __name: "item",
2650
+ props: {
2651
+ prop: { default: "" },
2652
+ label: { default: "" },
2653
+ labelWidth: { default: void 0 },
2654
+ required: { type: Boolean, default: void 0 },
2655
+ rules: { default: void 0 },
2656
+ showMessage: { type: Boolean, default: void 0 },
2657
+ inlineMessage: { type: Boolean, default: !1 },
2658
+ error: { default: "" }
2659
+ },
2660
+ setup(t, { expose: d }) {
2661
+ const n = t, e = le("rcForm", void 0), p = W(""), i = W(""), v = C(() => {
2662
+ const c = n.labelWidth ?? (e == null ? void 0 : e.labelWidth);
2663
+ return c ? {
2664
+ width: typeof c == "number" ? `${c}px` : c
2665
+ } : {};
2666
+ }), a = C(() => {
2667
+ }), u = C(() => n.showMessage ?? (e == null ? void 0 : e.showMessage) ?? !0), o = C(() => (e == null ? void 0 : e.hideRequiredAsterisk) ?? !1), M = C(() => (e == null ? void 0 : e.labelPosition) ?? "left"), x = C(() => {
2668
+ if (n.required !== void 0)
2669
+ return n.required;
2670
+ if (!n.prop || !e)
2671
+ return !1;
2672
+ const c = k();
2673
+ return c && c.length > 0 ? c.some((R) => R.required) : !1;
2674
+ }), k = () => {
2675
+ if (n.rules)
2676
+ return Array.isArray(n.rules) ? n.rules : [n.rules];
2677
+ if (!n.prop || !e)
2678
+ return [];
2679
+ const c = e.rules[n.prop];
2680
+ return c ? Array.isArray(c) ? c : [c] : [];
2681
+ }, D = () => {
2682
+ if (!(!n.prop || !e))
2683
+ return e.model[n.prop];
2684
+ }, L = (c, R) => new Promise((y) => {
2685
+ let $ = R;
2686
+ if (c.transform && ($ = c.transform(R)), c.required && ($ == null || $ === "")) {
2687
+ const S = c.message || `${n.label || n.prop} 是必填项`;
2688
+ y(S);
2689
+ return;
2690
+ }
2691
+ if (c.type && $ !== void 0 && $ !== null && $ !== "" && !_($, c.type)) {
2692
+ const F = c.message || `${n.label || n.prop} 格式不正确`;
2693
+ y(F);
2694
+ return;
2695
+ }
2696
+ if (c.min !== void 0 && $ !== void 0 && $ !== null && $ !== "" && (Array.isArray($) || typeof $ == "string" ? $.length : $) < c.min) {
2697
+ const F = c.message || `${n.label || n.prop} 不能少于 ${c.min} 个字符`;
2698
+ y(F);
2699
+ return;
2700
+ }
2701
+ if (c.max !== void 0 && $ !== void 0 && $ !== null && $ !== "" && (Array.isArray($) || typeof $ == "string" ? $.length : $) > c.max) {
2702
+ const F = c.message || `${n.label || n.prop} 不能超过 ${c.max} 个字符`;
2703
+ y(F);
2704
+ return;
2705
+ }
2706
+ if (c.pattern) {
2707
+ const S = typeof c.pattern == "string" ? new RegExp(c.pattern) : c.pattern;
2708
+ if ($ != null && $ !== "" && !S.test(String($))) {
2709
+ const F = c.message || `${n.label || n.prop} 格式不正确`;
2710
+ y(F);
2711
+ return;
2712
+ }
2713
+ }
2714
+ if (c.validator) {
2715
+ const S = c.validator(c, $, (F) => {
2716
+ y(F ? F.message || c.message || `${n.label || n.prop} 验证失败` : null);
2717
+ });
2718
+ if (S instanceof Promise) {
2719
+ S.then(() => {
2720
+ y(null);
2721
+ }).catch((F) => {
2722
+ y((F == null ? void 0 : F.message) || c.message || `${n.label || n.prop} 验证失败`);
2723
+ });
2724
+ return;
2725
+ }
2726
+ }
2727
+ y(null);
2728
+ }), _ = (c, R) => {
2729
+ switch (R) {
2730
+ case "string":
2731
+ return typeof c == "string";
2732
+ case "number":
2733
+ return typeof c == "number" && !isNaN(c);
2734
+ case "boolean":
2735
+ return typeof c == "boolean";
2736
+ case "integer":
2737
+ return Number.isInteger(c);
2738
+ case "float":
2739
+ return typeof c == "number" && !isNaN(c) && !Number.isInteger(c);
2740
+ case "array":
2741
+ return Array.isArray(c);
2742
+ case "object":
2743
+ return typeof c == "object" && c !== null && !Array.isArray(c);
2744
+ case "email":
2745
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(c));
2746
+ case "url":
2747
+ try {
2748
+ return new URL(String(c)), !0;
2749
+ } catch {
2750
+ return !1;
2751
+ }
2752
+ case "date":
2753
+ return c instanceof Date || !isNaN(Date.parse(String(c)));
2754
+ default:
2755
+ return !0;
2756
+ }
2757
+ }, l = (c, R) => new Promise((y, $) => {
2758
+ if (n.error) {
2759
+ p.value = "error", i.value = n.error, R && R(n.error), $(new Error(n.error));
2760
+ return;
2761
+ }
2762
+ if (!n.prop) {
2763
+ y();
2764
+ return;
2765
+ }
2766
+ const S = k();
2767
+ if (S.length === 0) {
2768
+ p.value = "", i.value = "", y();
2769
+ return;
2770
+ }
2771
+ let F;
2772
+ if (!c || c === "submit" ? F = S : F = S.filter((z) => z.trigger === c), F.length === 0) {
2773
+ y();
2774
+ return;
2775
+ }
2776
+ p.value = "validating", i.value = "";
2777
+ const A = D(), H = F.map((z) => L(z, A));
2778
+ Promise.all(H).then((z) => {
2779
+ const G = z.find((pe) => pe !== null);
2780
+ G ? (p.value = "error", i.value = G, R && R(G), $(new Error(G))) : ((!c || F.length === S.length) && (p.value = "success", i.value = ""), R && R(), y());
2781
+ }).catch((z) => {
2782
+ const G = (z == null ? void 0 : z.message) || "验证失败";
2783
+ p.value = "error", i.value = G, R && R(G), $(z);
2784
+ });
2785
+ }), U = () => {
2786
+ p.value = "", i.value = "";
2787
+ }, Y = () => {
2788
+ p.value = "", i.value = "";
2789
+ };
2790
+ return me(
2791
+ () => D(),
2792
+ () => {
2793
+ const c = k(), R = c.some(($) => $.trigger === "change"), y = c.some(($) => $.trigger === "blur");
2794
+ R ? l("change").catch(() => {
2795
+ }) : y && p.value;
2796
+ }
2797
+ ), me(
2798
+ () => n.error,
2799
+ (c) => {
2800
+ c ? (p.value = "error", i.value = c) : p.value === "error" && !n.prop && Y();
2801
+ }
2802
+ ), we("rcFormItem", {
2803
+ onBlur: () => {
2804
+ k().some((y) => y.trigger === "blur") && l("blur").catch(() => {
2805
+ });
2806
+ },
2807
+ onChange: () => {
2808
+ k().some((y) => y.trigger === "change") && l("change").catch(() => {
2809
+ });
2810
+ }
2811
+ }), Je(() => {
2812
+ n.prop && e && e.registerFormItem(n.prop, {
2813
+ validate: l,
2814
+ resetField: U,
2815
+ clearValidate: Y
2816
+ });
2817
+ }), at(() => {
2818
+ n.prop && e && e.unregisterFormItem(n.prop);
2819
+ }), d({
2820
+ validate: l,
2821
+ resetField: U,
2822
+ clearValidate: Y,
2823
+ validateState: p,
2824
+ validateMessage: i
2825
+ }), (c, R) => (f(), g("div", {
2826
+ class: q(["rc-form-item", [
2827
+ {
2828
+ "is-error": p.value === "error",
2829
+ "is-validating": p.value === "validating",
2830
+ "is-required": x.value,
2831
+ "is-no-asterisk": o.value,
2832
+ "is-label-top": M.value === "top"
2833
+ }
2834
+ ]])
2835
+ }, [
2836
+ t.label || c.$slots.label ? (f(), g("label", {
2837
+ key: 0,
2838
+ class: "rc-form-item__label",
2839
+ style: ie(v.value),
2840
+ for: a.value
2841
+ }, [
2842
+ Q(c.$slots, "label", {}, () => [
2843
+ t.label ? (f(), g("span", Xn, K(t.label), 1)) : E("", !0)
2844
+ ], !0)
2845
+ ], 12, Qn)) : E("", !0),
2846
+ T("div", Zn, [
2847
+ T("div", el, [
2848
+ Q(c.$slots, "default", {}, void 0, !0)
2849
+ ]),
2850
+ ae(Pe, { name: "rc-form-item-error-fade" }, {
2851
+ default: fe(() => [
2852
+ p.value === "error" && u.value && i.value ? (f(), g("div", tl, K(i.value), 1)) : E("", !0)
2853
+ ]),
2854
+ _: 1
2855
+ })
2856
+ ])
2857
+ ], 2));
2858
+ }
2859
+ }), tt = /* @__PURE__ */ se(al, [["__scopeId", "data-v-52add6c3"]]);
2860
+ et && (et.name = "rc-form");
2861
+ tt && (tt.name = "rc-form-item");
2862
+ function zt(t) {
2863
+ return et && t.component(et.name || "rc-form", et), tt && t.component(tt.name || "rc-form-item", tt), t;
2864
+ }
2865
+ const nl = ["value", "name", "disabled"], ll = { class: "rc-radio__label" }, ol = /* @__PURE__ */ oe({
2866
+ name: "rc-radio",
2867
+ __name: "index",
2868
+ props: {
2869
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
2870
+ label: { type: [String, Number, Boolean], default: void 0 },
2871
+ disabled: { type: Boolean, default: !1 },
2872
+ border: { type: Boolean, default: !1 },
2873
+ size: { default: "default" },
2874
+ name: { default: void 0 }
2875
+ },
2876
+ emits: ["update:modelValue", "change", "focus", "blur"],
2877
+ setup(t, { expose: d, emit: n }) {
2878
+ const e = t, p = n, i = W(), v = le("RadioGroup", void 0), a = C(() => !!v), u = C({
2879
+ get() {
2880
+ return a.value ? te(v.modelValue) : e.modelValue;
2881
+ },
2882
+ set(_) {
2883
+ a.value ? v.changeEvent(_) : p("update:modelValue", _);
2884
+ }
2885
+ }), o = C(() => {
2886
+ const _ = u.value, l = e.label;
2887
+ return _ === l;
2888
+ }), M = C(() => e.disabled || (v == null ? void 0 : v.disabled) || !1);
2889
+ C(() => (v == null ? void 0 : v.size) || e.size);
2890
+ const x = le("rcFormItem", void 0), k = (_) => {
2891
+ var U;
2892
+ _.target.checked && (p("change", e.label), (U = x == null ? void 0 : x.onChange) == null || U.call(x));
2893
+ }, D = (_) => {
2894
+ p("focus", _);
2895
+ }, L = (_) => {
2896
+ var l;
2897
+ p("blur", _), (l = x == null ? void 0 : x.onBlur) == null || l.call(x);
2898
+ };
2899
+ return d({
2900
+ radioRef: i,
2901
+ focus: () => {
2902
+ var _;
2903
+ (_ = i.value) == null || _.focus();
2904
+ },
2905
+ blur: () => {
2906
+ var _;
2907
+ (_ = i.value) == null || _.blur();
2908
+ }
2909
+ }), (_, l) => (f(), g("label", {
2910
+ class: q(["rc-radio", [
2911
+ {
2912
+ "is-checked": o.value,
2913
+ "is-disabled": M.value,
2914
+ "is-border": t.border,
2915
+ [`rc-radio--${t.size}`]: t.size
2916
+ }
2917
+ ]])
2918
+ }, [
2919
+ T("span", {
2920
+ class: q(["rc-radio__input", { "is-checked": o.value, "is-disabled": M.value }])
2921
+ }, [
2922
+ l[1] || (l[1] = T("span", { class: "rc-radio__inner" }, null, -1)),
2923
+ pt(T("input", {
2924
+ ref_key: "radioRef",
2925
+ ref: i,
2926
+ "onUpdate:modelValue": l[0] || (l[0] = (U) => u.value = U),
2927
+ value: t.label,
2928
+ class: "rc-radio__original",
2929
+ name: t.name,
2930
+ disabled: M.value,
2931
+ type: "radio",
2932
+ onChange: k,
2933
+ onFocus: D,
2934
+ onBlur: L
2935
+ }, null, 40, nl), [
2936
+ [Wt, u.value]
2937
+ ])
2938
+ ], 2),
2939
+ T("span", ll, [
2940
+ Q(_.$slots, "default", {}, () => [
2941
+ t.label !== void 0 ? (f(), g(ue, { key: 0 }, [
2942
+ ve(K(t.label), 1)
2943
+ ], 64)) : E("", !0)
2944
+ ], !0)
2945
+ ])
2946
+ ], 2));
2947
+ }
2948
+ }), ut = /* @__PURE__ */ se(ol, [["__scopeId", "data-v-57d4d380"]]), sl = /* @__PURE__ */ oe({
2949
+ name: "rc-radio-group",
2950
+ __name: "group",
2951
+ props: {
2952
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
2953
+ size: { default: "default" },
2954
+ disabled: { type: Boolean, default: !1 },
2955
+ textColor: { default: void 0 },
2956
+ fill: { default: void 0 },
2957
+ name: { default: void 0 }
2958
+ },
2959
+ emits: ["update:modelValue", "change"],
2960
+ setup(t, { emit: d }) {
2961
+ const n = t, e = d, p = (v) => {
2962
+ e("update:modelValue", v), e("change", v);
2963
+ }, i = le("rcFormItem", void 0);
2964
+ return me(() => n.modelValue, () => {
2965
+ var v;
2966
+ (v = i == null ? void 0 : i.onChange) == null || v.call(i);
2967
+ }), we("RadioGroup", {
2968
+ modelValue: C(() => n.modelValue),
2969
+ changeEvent: p,
2970
+ size: n.size,
2971
+ disabled: n.disabled,
2972
+ name: n.name,
2973
+ fill: n.fill,
2974
+ textColor: n.textColor
2975
+ }), (v, a) => (f(), g("div", {
2976
+ class: q(["rc-radio-group", [{ "is-disabled": t.disabled }]])
2977
+ }, [
2978
+ Q(v.$slots, "default", {}, void 0, !0)
2979
+ ], 2));
2980
+ }
2981
+ }), it = /* @__PURE__ */ se(sl, [["__scopeId", "data-v-e39301ee"]]), rl = ["value", "name", "disabled"], ul = { class: "rc-radio-button__inner" }, il = /* @__PURE__ */ oe({
2982
+ name: "rc-radio-button",
2983
+ __name: "button",
2984
+ props: {
2985
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
2986
+ label: { type: [String, Number, Boolean], default: void 0 },
2987
+ disabled: { type: Boolean, default: !1 },
2988
+ name: { default: void 0 }
2989
+ },
2990
+ emits: ["update:modelValue", "change", "focus", "blur"],
2991
+ setup(t, { expose: d, emit: n }) {
2992
+ const e = t, p = n, i = W(), v = W(!1), a = le("RadioGroup", void 0), u = C(() => !!a), o = C({
2993
+ get() {
2994
+ return u.value ? te(a.modelValue) : e.modelValue;
2995
+ },
2996
+ set(Y) {
2997
+ u.value ? a.changeEvent(Y) : p("update:modelValue", Y);
2998
+ }
2999
+ }), M = C(() => {
3000
+ const Y = o.value, c = e.label;
3001
+ return Y === c;
3002
+ }), x = C(() => e.disabled || (a == null ? void 0 : a.disabled) || !1), k = C(() => (a == null ? void 0 : a.size) || "default"), D = C(() => {
3003
+ if (!M.value || !a)
3004
+ return {};
3005
+ const Y = {};
3006
+ return a.fill && (Y.backgroundColor = a.fill, Y.borderColor = a.fill), a.textColor && (Y.color = a.textColor), Y;
3007
+ }), L = le("rcFormItem", void 0), _ = (Y) => {
3008
+ var R;
3009
+ Y.target.checked && (p("change", e.label), (R = L == null ? void 0 : L.onChange) == null || R.call(L));
3010
+ }, l = (Y) => {
3011
+ v.value = !0, p("focus", Y);
3012
+ }, U = (Y) => {
3013
+ var c;
3014
+ v.value = !1, p("blur", Y), (c = L == null ? void 0 : L.onBlur) == null || c.call(L);
3015
+ };
3016
+ return d({
3017
+ radioRef: i,
3018
+ focus: () => {
3019
+ var Y;
3020
+ (Y = i.value) == null || Y.focus();
3021
+ },
3022
+ blur: () => {
3023
+ var Y;
3024
+ (Y = i.value) == null || Y.blur();
3025
+ }
3026
+ }), (Y, c) => (f(), g("label", {
3027
+ class: q(["rc-radio-button", [
3028
+ {
3029
+ "is-active": M.value,
3030
+ "is-disabled": x.value,
3031
+ "is-focus": v.value,
3032
+ [`rc-radio-button--${k.value}`]: k.value
3033
+ }
3034
+ ]]),
3035
+ style: ie(D.value)
3036
+ }, [
3037
+ pt(T("input", {
3038
+ ref_key: "radioRef",
3039
+ ref: i,
3040
+ "onUpdate:modelValue": c[0] || (c[0] = (R) => o.value = R),
3041
+ value: t.label,
3042
+ class: "rc-radio-button__original",
3043
+ name: t.name,
3044
+ disabled: x.value,
3045
+ type: "radio",
3046
+ onChange: _,
3047
+ onFocus: l,
3048
+ onBlur: U
3049
+ }, null, 40, rl), [
3050
+ [Wt, o.value]
3051
+ ]),
3052
+ T("span", ul, [
3053
+ Q(Y.$slots, "default", {}, () => [
3054
+ t.label !== void 0 ? (f(), g(ue, { key: 0 }, [
3055
+ ve(K(t.label), 1)
3056
+ ], 64)) : E("", !0)
3057
+ ], !0)
3058
+ ])
3059
+ ], 6));
3060
+ }
3061
+ }), ct = /* @__PURE__ */ se(il, [["__scopeId", "data-v-5b2094ea"]]);
3062
+ ut.name = "rc-radio";
3063
+ it.name = "rc-radio-group";
3064
+ ct.name = "rc-radio-button";
3065
+ function Lt(t) {
3066
+ return t.component(ut.name, ut), t.component("RcRadio", ut), t.component(it.name, it), t.component("RcRadioGroup", it), t.component(ct.name, ct), t.component("RcRadioButton", ct), t;
3067
+ }
3068
+ const cl = { class: "rc-checkbox__inner" }, dl = ["checked", "value", "true-value", "false-value", "name", "disabled"], fl = { class: "rc-checkbox__label" }, vl = /* @__PURE__ */ oe({
3069
+ name: "rc-checkbox",
3070
+ __name: "index",
3071
+ props: {
3072
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
3073
+ label: { type: [String, Number, Boolean], default: void 0 },
3074
+ disabled: { type: Boolean, default: !1 },
3075
+ border: { type: Boolean, default: !1 },
3076
+ size: { default: "default" },
3077
+ name: { default: void 0 },
3078
+ indeterminate: { type: Boolean, default: !1 },
3079
+ checked: { type: Boolean, default: !1 },
3080
+ trueLabel: { default: void 0 },
3081
+ falseLabel: { default: void 0 }
3082
+ },
3083
+ emits: ["update:modelValue", "change", "focus", "blur"],
3084
+ setup(t, { expose: d, emit: n }) {
3085
+ const e = t, p = n, i = W(), v = le("CheckboxGroup", void 0), a = C(() => !!v), u = () => {
3086
+ if (!v) return [];
3087
+ const l = te(v.modelValue);
3088
+ return Array.isArray(l) ? l : [];
3089
+ }, o = C({
3090
+ get() {
3091
+ return a.value ? u().includes(e.label) : e.modelValue ?? e.checked;
3092
+ },
3093
+ set(l) {
3094
+ if (a.value) {
3095
+ const U = [...u()];
3096
+ if (l)
3097
+ U.includes(e.label) || U.push(e.label);
3098
+ else {
3099
+ const Y = U.indexOf(e.label);
3100
+ Y > -1 && U.splice(Y, 1);
3101
+ }
3102
+ v.changeEvent(U);
3103
+ } else {
3104
+ const U = l ? e.trueLabel ?? !0 : e.falseLabel ?? !1;
3105
+ p("update:modelValue", U);
3106
+ }
3107
+ }
3108
+ }), M = C(() => a.value ? u().includes(e.label) : e.trueLabel !== void 0 || e.falseLabel !== void 0 ? e.modelValue === e.trueLabel : !!e.modelValue || e.checked), x = C(() => {
3109
+ if (e.disabled || v != null && v.disabled)
3110
+ return !0;
3111
+ if (a.value && v) {
3112
+ const l = u();
3113
+ if (M.value) {
3114
+ if (v.min !== void 0 && l.length <= v.min)
3115
+ return !0;
3116
+ } else if (v.max !== void 0 && l.length >= v.max)
3117
+ return !0;
3118
+ }
3119
+ return !1;
3120
+ }), k = le("rcFormItem", void 0), D = (l) => {
3121
+ var Y, c;
3122
+ const U = l.target;
3123
+ if (a.value) {
3124
+ const R = [...u()];
3125
+ if (U.checked)
3126
+ R.includes(e.label) || R.push(e.label);
3127
+ else {
3128
+ const y = R.indexOf(e.label);
3129
+ y > -1 && R.splice(y, 1);
3130
+ }
3131
+ v.changeEvent(R), p("change", e.label), (Y = k == null ? void 0 : k.onChange) == null || Y.call(k);
3132
+ } else {
3133
+ const R = U.checked ? e.trueLabel ?? !0 : e.falseLabel ?? !1;
3134
+ p("update:modelValue", R), p("change", R), (c = k == null ? void 0 : k.onChange) == null || c.call(k);
3135
+ }
3136
+ }, L = (l) => {
3137
+ p("focus", l);
3138
+ }, _ = (l) => {
3139
+ var U;
3140
+ p("blur", l), (U = k == null ? void 0 : k.onBlur) == null || U.call(k);
3141
+ };
3142
+ return d({
3143
+ checkboxRef: i,
3144
+ focus: () => {
3145
+ var l;
3146
+ (l = i.value) == null || l.focus();
3147
+ },
3148
+ blur: () => {
3149
+ var l;
3150
+ (l = i.value) == null || l.blur();
3151
+ }
3152
+ }), (l, U) => (f(), g("label", {
3153
+ class: q(["rc-checkbox", [
3154
+ {
3155
+ "is-checked": M.value,
3156
+ "is-disabled": x.value,
3157
+ "is-indeterminate": t.indeterminate,
3158
+ "is-border": t.border,
3159
+ [`rc-checkbox--${t.size}`]: t.size
3160
+ }
3161
+ ]])
3162
+ }, [
3163
+ T("span", {
3164
+ class: q(["rc-checkbox__input", { "is-checked": M.value, "is-disabled": x.value, "is-indeterminate": t.indeterminate }])
3165
+ }, [
3166
+ T("span", cl, [
3167
+ M.value && !t.indeterminate ? (f(), ce(re, {
3168
+ key: 0,
3169
+ name: "icon_select",
3170
+ class: "rc-checkbox__icon",
3171
+ size: 14
3172
+ })) : E("", !0)
3173
+ ]),
3174
+ T("input", {
3175
+ ref_key: "checkboxRef",
3176
+ ref: i,
3177
+ checked: a.value ? M.value : !!o.value,
3178
+ value: t.label,
3179
+ "true-value": t.trueLabel,
3180
+ "false-value": t.falseLabel,
3181
+ class: "rc-checkbox__original",
3182
+ name: t.name,
3183
+ disabled: x.value,
3184
+ type: "checkbox",
3185
+ onChange: D,
3186
+ onFocus: L,
3187
+ onBlur: _
3188
+ }, null, 40, dl)
3189
+ ], 2),
3190
+ T("span", fl, [
3191
+ Q(l.$slots, "default", {}, () => [
3192
+ t.label !== void 0 && typeof t.label != "boolean" ? (f(), g(ue, { key: 0 }, [
3193
+ ve(K(t.label), 1)
3194
+ ], 64)) : E("", !0)
3195
+ ], !0)
3196
+ ])
3197
+ ], 2));
3198
+ }
3199
+ }), dt = /* @__PURE__ */ se(vl, [["__scopeId", "data-v-1822e772"]]), ml = /* @__PURE__ */ oe({
3200
+ name: "rc-checkbox-group",
3201
+ __name: "group",
3202
+ props: {
3203
+ modelValue: { default: () => [] },
3204
+ size: { default: "default" },
3205
+ disabled: { type: Boolean, default: !1 },
3206
+ textColor: { default: void 0 },
3207
+ fill: { default: void 0 },
3208
+ name: { default: void 0 },
3209
+ min: { default: void 0 },
3210
+ max: { default: void 0 }
3211
+ },
3212
+ emits: ["update:modelValue", "change"],
3213
+ setup(t, { emit: d }) {
3214
+ const n = t, e = d, p = (v) => {
3215
+ e("update:modelValue", v), e("change", v);
3216
+ }, i = le("rcFormItem", void 0);
3217
+ return me(() => n.modelValue, () => {
3218
+ var v;
3219
+ (v = i == null ? void 0 : i.onChange) == null || v.call(i);
3220
+ }), we("CheckboxGroup", {
3221
+ modelValue: C(() => n.modelValue || []),
3222
+ changeEvent: p,
3223
+ size: n.size,
3224
+ disabled: n.disabled,
3225
+ name: n.name,
3226
+ fill: n.fill,
3227
+ textColor: n.textColor,
3228
+ min: n.min,
3229
+ max: n.max
3230
+ }), (v, a) => (f(), g("div", {
3231
+ class: q(["rc-checkbox-group", [{ "is-disabled": t.disabled }]])
3232
+ }, [
3233
+ Q(v.$slots, "default", {}, void 0, !0)
3234
+ ], 2));
3235
+ }
3236
+ }), ft = /* @__PURE__ */ se(ml, [["__scopeId", "data-v-44296f0f"]]), pl = ["checked", "value", "name", "disabled"], hl = { class: "rc-checkbox-button__inner" }, gl = /* @__PURE__ */ oe({
3237
+ name: "rc-checkbox-button",
3238
+ __name: "button",
3239
+ props: {
3240
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
3241
+ label: { type: [String, Number, Boolean], default: void 0 },
3242
+ disabled: { type: Boolean, default: !1 },
3243
+ name: { default: void 0 },
3244
+ checked: { type: Boolean, default: !1 },
3245
+ trueLabel: { default: void 0 },
3246
+ falseLabel: { default: void 0 }
3247
+ },
3248
+ emits: ["update:modelValue", "change", "focus", "blur"],
3249
+ setup(t, { expose: d, emit: n }) {
3250
+ const e = t, p = n, i = W(), v = W(!1), a = le("CheckboxGroup", void 0), u = C(() => !!a), o = () => {
3251
+ if (!a) return [];
3252
+ const c = te(a.modelValue);
3253
+ return Array.isArray(c) ? c : [];
3254
+ }, M = C({
3255
+ get() {
3256
+ return u.value ? o().includes(e.label) : e.trueLabel !== void 0 || e.falseLabel !== void 0 ? e.modelValue === e.trueLabel : !!e.modelValue || e.checked;
3257
+ },
3258
+ set(c) {
3259
+ if (u.value) {
3260
+ const R = [...o()];
3261
+ if (c)
3262
+ R.includes(e.label) || R.push(e.label);
3263
+ else {
3264
+ const y = R.indexOf(e.label);
3265
+ y > -1 && R.splice(y, 1);
3266
+ }
3267
+ a.changeEvent(R);
3268
+ } else {
3269
+ const R = c ? e.trueLabel ?? !0 : e.falseLabel ?? !1;
3270
+ p("update:modelValue", R);
3271
+ }
3272
+ }
3273
+ }), x = C(() => u.value ? o().includes(e.label) : e.trueLabel !== void 0 || e.falseLabel !== void 0 ? e.modelValue === e.trueLabel : !!e.modelValue || e.checked), k = C(() => {
3274
+ if (e.disabled || a != null && a.disabled)
3275
+ return !0;
3276
+ if (u.value && a) {
3277
+ const c = o();
3278
+ if (x.value) {
3279
+ if (a.min !== void 0 && c.length <= a.min)
3280
+ return !0;
3281
+ } else if (a.max !== void 0 && c.length >= a.max)
3282
+ return !0;
3283
+ }
3284
+ return !1;
3285
+ }), D = C(() => (a == null ? void 0 : a.size) || "default"), L = C(() => {
3286
+ if (!x.value || !a)
3287
+ return {};
3288
+ const c = {};
3289
+ return a.fill && (c.backgroundColor = a.fill, c.borderColor = a.fill), a.textColor && (c.color = a.textColor), c;
3290
+ }), _ = le("rcFormItem", void 0), l = (c) => {
3291
+ var y, $;
3292
+ const R = c.target;
3293
+ if (u.value) {
3294
+ const S = [...o()];
3295
+ if (R.checked)
3296
+ S.includes(e.label) || S.push(e.label);
3297
+ else {
3298
+ const F = S.indexOf(e.label);
3299
+ F > -1 && S.splice(F, 1);
3300
+ }
3301
+ a.changeEvent(S), p("change", e.label), (y = _ == null ? void 0 : _.onChange) == null || y.call(_);
3302
+ } else {
3303
+ const S = R.checked ? e.trueLabel ?? !0 : e.falseLabel ?? !1;
3304
+ p("update:modelValue", S), p("change", S), ($ = _ == null ? void 0 : _.onChange) == null || $.call(_);
3305
+ }
3306
+ }, U = (c) => {
3307
+ v.value = !0, p("focus", c);
3308
+ }, Y = (c) => {
3309
+ var R;
3310
+ v.value = !1, p("blur", c), (R = _ == null ? void 0 : _.onBlur) == null || R.call(_);
3311
+ };
3312
+ return d({
3313
+ checkboxRef: i,
3314
+ focus: () => {
3315
+ var c;
3316
+ (c = i.value) == null || c.focus();
3317
+ },
3318
+ blur: () => {
3319
+ var c;
3320
+ (c = i.value) == null || c.blur();
3321
+ }
3322
+ }), (c, R) => (f(), g("label", {
3323
+ class: q(["rc-checkbox-button", [
3324
+ {
3325
+ "is-checked": x.value,
3326
+ "is-disabled": k.value,
3327
+ "is-focus": v.value,
3328
+ [`rc-checkbox-button--${D.value}`]: D.value
3329
+ }
3330
+ ]]),
3331
+ style: ie(L.value)
3332
+ }, [
3333
+ T("input", {
3334
+ ref_key: "checkboxRef",
3335
+ ref: i,
3336
+ checked: u.value ? x.value : !!M.value,
3337
+ value: t.label,
3338
+ class: "rc-checkbox-button__original",
3339
+ name: t.name,
3340
+ disabled: k.value,
3341
+ type: "checkbox",
3342
+ onChange: l,
3343
+ onFocus: U,
3344
+ onBlur: Y
3345
+ }, null, 40, pl),
3346
+ T("span", hl, [
3347
+ Q(c.$slots, "default", {}, () => [
3348
+ t.label !== void 0 && typeof t.label != "boolean" ? (f(), g(ue, { key: 0 }, [
3349
+ ve(K(t.label), 1)
3350
+ ], 64)) : E("", !0)
3351
+ ], !0)
3352
+ ])
3353
+ ], 6));
3354
+ }
3355
+ }), vt = /* @__PURE__ */ se(gl, [["__scopeId", "data-v-6fdfcb7f"]]);
3356
+ dt.name = "rc-checkbox";
3357
+ ft.name = "rc-checkbox-group";
3358
+ vt.name = "rc-checkbox-button";
3359
+ function Nt(t) {
3360
+ return t.component(dt.name, dt), t.component("RcCheckbox", dt), t.component(ft.name, ft), t.component("RcCheckboxGroup", ft), t.component(vt.name, vt), t.component("RcCheckboxButton", vt), t;
2352
3361
  }
2353
- const lt = Symbol("RECYCLE_UI_CONFIG"), ct = {
3362
+ const ht = Symbol("RECYCLE_UI_CONFIG"), bt = {
2354
3363
  prefix: "rc",
2355
3364
  autoRegister: !0,
2356
- provideKey: lt,
3365
+ provideKey: ht,
2357
3366
  // 预留主题/其他全局配置
2358
3367
  theme: {},
2359
3368
  // IconFont 默认配置(可在 app.use 时覆盖)
@@ -2362,60 +3371,71 @@ const lt = Symbol("RECYCLE_UI_CONFIG"), ct = {
2362
3371
  // 输入框设备类型默认配置
2363
3372
  inputDeviceType: "pc"
2364
3373
  };
2365
- function Fa(e, r) {
2366
- r.autoRegister !== !1 && (typeof mt == "function" && mt(e), typeof pt == "function" && pt(e), typeof yt == "function" && yt(e), typeof gt == "function" && gt(e), typeof bt == "function" && bt(e), typeof kt == "function" && kt(e), typeof Dt == "function" && Dt(e), typeof $t == "function" && $t(e), typeof _t == "function" && _t(e), typeof Ct == "function" && Ct(e), typeof St == "function" && St(e));
3374
+ function yl(t, d) {
3375
+ d.autoRegister !== !1 && (typeof $t == "function" && $t(t), typeof xt == "function" && xt(t), typeof Dt == "function" && Dt(t), typeof Rt == "function" && Rt(t), typeof Vt == "function" && Vt(t), typeof St == "function" && St(t), typeof At == "function" && At(t), typeof Ft == "function" && Ft(t), typeof Mt == "function" && Mt(t), typeof Et == "function" && Et(t), typeof It == "function" && It(t), typeof zt == "function" && zt(t), typeof Lt == "function" && Lt(t), typeof Nt == "function" && Nt(t));
2367
3376
  }
2368
- const Vt = (e, r) => {
2369
- const m = { ...ct, ...r || {} };
2370
- if (e.provide(m.provideKey ?? lt, m), e.config.globalProperties.$recycleUI = m, typeof window < "u" && m.iconCssUrl) {
2371
- const t = `link[rel="stylesheet"][data-rcui-icon="true"][href="${m.iconCssUrl}"]`;
2372
- if (!document.head.querySelector(t)) {
2373
- const k = document.createElement("link");
2374
- k.rel = "stylesheet", k.href = m.iconCssUrl, k.setAttribute("data-rcui-icon", "true"), document.head.appendChild(k);
3377
+ const Ot = (t, d) => {
3378
+ const n = { ...bt, ...d || {} };
3379
+ if (t.provide(n.provideKey ?? ht, n), t.config.globalProperties.$recycleUI = n, typeof window < "u" && n.iconCssUrl) {
3380
+ const e = `link[rel="stylesheet"][data-rcui-icon="true"][href="${n.iconCssUrl}"]`;
3381
+ if (!document.head.querySelector(e)) {
3382
+ const i = document.createElement("link");
3383
+ i.rel = "stylesheet", i.href = n.iconCssUrl, i.setAttribute("data-rcui-icon", "true"), document.head.appendChild(i);
2375
3384
  }
2376
3385
  }
2377
- return Fa(e, m), e;
2378
- }, Na = { install: Vt };
2379
- function Wa(e) {
3386
+ return yl(t, n), t;
3387
+ }, $l = { install: Ot };
3388
+ function xl(t) {
2380
3389
  return {
2381
- install(r) {
2382
- Vt(r, e);
3390
+ install(d) {
3391
+ Ot(d, t);
2383
3392
  }
2384
3393
  };
2385
3394
  }
2386
3395
  export {
2387
- lt as RECYCLE_UI_SYMBOL,
2388
- xe as RcButton,
2389
- He as RcCalendar,
2390
- Ze as RcCard,
2391
- Ya as RcDescriptions,
2392
- La as RcDescriptionsItem,
2393
- st as RcDropdown,
2394
- ut as RcDropdownItem,
2395
- tt as RcDropdownMenu,
2396
- Z as RcIcon,
2397
- rt as RcInput,
2398
- We as RcPopup,
2399
- xt as RcSearchArea,
2400
- et as RcToast,
2401
- Wa as createRecycleUI,
2402
- Na as default,
2403
- ct as defaultRecycleUIConfig,
2404
- dn as hideToast,
2405
- Vt as install,
2406
- mt as installButton,
2407
- $t as installCalendar,
2408
- yt as installCard,
2409
- pt as installDescriptions,
2410
- St as installDropdown,
2411
- bt as installIcon,
2412
- Ct as installInput,
2413
- kt as installMessage,
2414
- _t as installPopup,
2415
- Dt as installSearchArea,
2416
- hn as message,
2417
- Ya as rcDescriptions,
2418
- La as rcDescriptionsItem,
2419
- Pa as showToast
3396
+ ht as RECYCLE_UI_SYMBOL,
3397
+ De as RcButton,
3398
+ We as RcCalendar,
3399
+ rt as RcCard,
3400
+ dt as RcCheckbox,
3401
+ vt as RcCheckboxButton,
3402
+ ft as RcCheckboxGroup,
3403
+ kl as RcDescriptions,
3404
+ _l as RcDescriptionsItem,
3405
+ Ue as RcDropdown,
3406
+ qe as RcDropdownItem,
3407
+ Oe as RcDropdownMenu,
3408
+ et as RcForm,
3409
+ tt as RcFormItem,
3410
+ re as RcIcon,
3411
+ Ze as RcInput,
3412
+ Ye as RcPopup,
3413
+ ut as RcRadio,
3414
+ ct as RcRadioButton,
3415
+ it as RcRadioGroup,
3416
+ Tt as RcSearchArea,
3417
+ mt as RcToast,
3418
+ xl as createRecycleUI,
3419
+ $l as default,
3420
+ bt as defaultRecycleUIConfig,
3421
+ _a as hideToast,
3422
+ Ot as install,
3423
+ $t as installButton,
3424
+ Ft as installCalendar,
3425
+ Dt as installCard,
3426
+ Nt as installCheckbox,
3427
+ xt as installDescriptions,
3428
+ It as installDropdown,
3429
+ zt as installForm,
3430
+ Vt as installIcon,
3431
+ Et as installInput,
3432
+ St as installMessage,
3433
+ Mt as installPopup,
3434
+ Lt as installRadio,
3435
+ At as installSearchArea,
3436
+ Ca as message,
3437
+ kl as rcDescriptions,
3438
+ _l as rcDescriptionsItem,
3439
+ wl as showToast
2420
3440
  };
2421
3441
  //# sourceMappingURL=index.mjs.map