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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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";
1
+ import { defineComponent as se, inject as Me, computed as R, onMounted as at, createElementBlock as f, openBlock as u, normalizeStyle as le, normalizeClass as G, createCommentVNode as D, toDisplayString as P, renderSlot as q, Fragment as oe, createBlock as ne, createTextVNode as _e, createElementVNode as S, ref as E, watchEffect as Vt, provide as Te, renderList as ve, onUnmounted as lt, Teleport as it, createVNode as K, Transition as Be, withCtx as ae, createApp as Tt, reactive as Et, TransitionGroup as Bt, render as Mt, watch as Ie, withModifiers as Ye, unref as J, nextTick as Fe, withDirectives as Ft, vModelText as At, useSlots as zt, resolveDynamicComponent as vt } from "vue";
2
2
  const Yt = {
3
3
  key: 0,
4
4
  class: "rc-icon__unicode"
5
- }, Lt = /* @__PURE__ */ re({
5
+ }, Lt = /* @__PURE__ */ se({
6
6
  name: "rc-icon",
7
7
  __name: "index",
8
8
  props: {
@@ -13,42 +13,42 @@ const Yt = {
13
13
  code: { default: "" }
14
14
  },
15
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(() => ({
16
+ const s = e, m = Me(ot, {}), t = R(() => (m == null ? void 0 : m.iconClass) || "iconfont"), y = R(() => s.name || ""), k = R(() => typeof s.size == "number" ? `${s.size}px` : s.size || "16px"), v = R(() => ({
17
17
  fontSize: k.value,
18
- color: r.color || void 0,
18
+ color: s.color || void 0,
19
19
  lineHeight: 1,
20
20
  fontFamily: (m == null ? void 0 : m.iconClass) || "iconfont"
21
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);
22
+ const r = s.code;
23
+ if (r == null || r === "" || r === 0) return "";
24
+ if (typeof r == "number")
25
+ return String.fromCharCode(r);
26
+ const p = String(r).replace(/^0x/i, ""), B = parseInt(p, 16);
27
27
  return Number.isNaN(B) ? "" : String.fromCharCode(B);
28
28
  });
29
- return nt(() => {
29
+ return at(() => {
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}"]`;
31
+ const r = m && m.iconCssUrl || ct.iconCssUrl;
32
+ if (!r) return;
33
+ const p = `link[rel="stylesheet"][data-rcui-icon="true"][href="${r}"]`;
34
34
  if (!document.head.querySelector(p)) {
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 = r, 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 }]]),
38
+ }), (r, p) => (u(), f("i", {
39
+ class: G(["rc-icon", [t.value, y.value, { "rc-icon--spin": e.spin }]]),
40
40
  style: le(v.value),
41
41
  "aria-hidden": "true"
42
42
  }, [
43
- d.value ? (s(), f("span", Yt, P(d.value), 1)) : D("", !0)
43
+ d.value ? (u(), f("span", Yt, P(d.value), 1)) : D("", !0)
44
44
  ], 6));
45
45
  }
46
- }), se = (e, r) => {
46
+ }), ue = (e, s) => {
47
47
  const m = e.__vccOpts || e;
48
- for (const [t, g] of r)
49
- m[t] = g;
48
+ for (const [t, y] of s)
49
+ m[t] = y;
50
50
  return m;
51
- }, Z = /* @__PURE__ */ se(Lt, [["__scopeId", "data-v-3857a892"]]), Pt = ["disabled"], Nt = {
51
+ }, X = /* @__PURE__ */ ue(Lt, [["__scopeId", "data-v-3857a892"]]), Nt = ["disabled"], Pt = {
52
52
  key: 0,
53
53
  class: "rc-button__spinner"
54
54
  }, Wt = {
@@ -57,7 +57,7 @@ const Yt = {
57
57
  }, Ht = {
58
58
  key: 2,
59
59
  class: "rc-button__icon rc-button__icon--suffix"
60
- }, Ot = /* @__PURE__ */ re({
60
+ }, Ot = /* @__PURE__ */ se({
61
61
  __name: "index",
62
62
  props: {
63
63
  type: { default: "default" },
@@ -72,23 +72,23 @@ const Yt = {
72
72
  suffixIcon: { default: "" }
73
73
  },
74
74
  emits: ["click"],
75
- setup(e, { emit: r }) {
76
- const m = e, t = r, g = (v) => {
75
+ setup(e, { emit: s }) {
76
+ const m = e, t = s, y = (v) => {
77
77
  !m.disabled && !m.loading && t("click", v);
78
78
  }, k = R(() => {
79
79
  const v = m.round;
80
80
  return typeof v == "boolean" ? v ? "999px" : "6px" : typeof v == "number" ? `${v}px` : String(v);
81
81
  });
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 }]]),
82
+ return (v, d) => (u(), f("button", {
83
+ class: G(["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
84
  style: le({ borderRadius: k.value }),
85
85
  disabled: e.disabled || e.loading,
86
- onClick: g
86
+ onClick: y
87
87
  }, [
88
- e.loading ? (s(), f("span", Nt)) : (s(), f(oe, { key: 1 }, [
89
- e.preIcon || v.$slots.preIcon ? (s(), f("span", Wt, [
88
+ e.loading ? (u(), f("span", Pt)) : (u(), f(oe, { key: 1 }, [
89
+ e.preIcon || v.$slots.preIcon ? (u(), f("span", Wt, [
90
90
  q(v.$slots, "preIcon", {}, () => [
91
- e.preIcon ? (s(), te(Z, {
91
+ e.preIcon ? (u(), ne(X, {
92
92
  key: 0,
93
93
  name: e.preIcon
94
94
  }, null, 8, ["name"])) : D("", !0)
@@ -98,22 +98,22 @@ const Yt = {
98
98
  q(v.$slots, "default", {}, () => [
99
99
  _e(P(e.label), 1)
100
100
  ], !0),
101
- !e.loading && (e.suffixIcon || v.$slots.suffixIcon) ? (s(), f("span", Ht, [
101
+ !e.loading && (e.suffixIcon || v.$slots.suffixIcon) ? (u(), f("span", Ht, [
102
102
  q(v.$slots, "suffixIcon", {}, () => [
103
- e.suffixIcon ? (s(), te(Z, {
103
+ e.suffixIcon ? (u(), ne(X, {
104
104
  key: 0,
105
105
  name: e.suffixIcon
106
106
  }, null, 8, ["name"])) : D("", !0)
107
107
  ], !0)
108
108
  ])) : D("", !0)
109
- ], 14, Pt));
109
+ ], 14, Nt));
110
110
  }
111
- }), xe = /* @__PURE__ */ se(Ot, [["__scopeId", "data-v-4c6a5e4f"]]);
112
- xe.name = "rc-button";
111
+ }), De = /* @__PURE__ */ ue(Ot, [["__scopeId", "data-v-4c6a5e4f"]]);
112
+ De.name = "rc-button";
113
113
  function mt(e) {
114
- return e.component(xe.name, xe), e;
114
+ return e.component(De.name, De), e;
115
115
  }
116
- const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
116
+ const Ut = { class: "rc-desc-item__value" }, jt = /* @__PURE__ */ se({
117
117
  name: "rc-descriptions-item",
118
118
  __name: "item",
119
119
  props: {
@@ -123,43 +123,43 @@ const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
123
123
  span: { default: 1 }
124
124
  },
125
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;
126
+ const s = e;
127
+ Me("rcDescItemWidth", void 0), Me("rcDescSingleWidth", ""), Me("rcDescGap", "0px");
128
+ const m = Me("rcDescGapPx", 0), t = Me("rcDescColCount", 1), y = Me("rcDescLabelWidth", ""), k = R(() => {
129
+ const r = typeof s.span == "string" ? parseInt(s.span, 10) : s.span, p = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, B = !Number.isNaN(r) && r > 0 ? r : 1;
130
130
  return Math.min(B, p || 1);
131
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)`;
132
+ const r = 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 (!r || r <= 1 || B >= r) return "100%";
134
+ const x = (r - 1) * p, b = (B - 1) * p;
135
+ return `calc((100% - ${x}px) * ${B} / ${r} + ${b}px)`;
136
136
  }), d = R(() => {
137
- const o = typeof (g == null ? void 0 : g.value) == "string" ? g.value : g, p = r.labelWidth !== "" ? r.labelWidth : o || "";
137
+ const r = typeof (y == null ? void 0 : y.value) == "string" ? y.value : y, p = s.labelWidth !== "" ? s.labelWidth : r || "";
138
138
  return p ? { width: typeof p == "number" ? `${p}px` : String(p), flex: "0 0 auto" } : {};
139
139
  });
140
- return (o, p) => (s(), f("div", {
140
+ return (r, p) => (u(), f("div", {
141
141
  class: "rc-desc-item",
142
142
  style: le({ width: v.value, flex: `0 0 ${v.value}` })
143
143
  }, [
144
- C("div", {
144
+ S("div", {
145
145
  class: "rc-desc-item__label",
146
146
  style: le(d.value)
147
147
  }, [
148
- q(o.$slots, "label", {}, () => [
148
+ q(r.$slots, "label", {}, () => [
149
149
  _e(P(e.label), 1)
150
150
  ], !0)
151
151
  ], 4),
152
- C("div", Ut, [
153
- q(o.$slots, "default", {}, () => [
152
+ S("div", Ut, [
153
+ q(r.$slots, "default", {}, () => [
154
154
  _e(P(e.value), 1)
155
155
  ], !0)
156
156
  ])
157
157
  ], 4));
158
158
  }
159
- }), ze = /* @__PURE__ */ se(Kt, [["__scopeId", "data-v-970d0b99"]]), jt = { class: "rc-descriptions" }, Gt = {
159
+ }), Le = /* @__PURE__ */ ue(jt, [["__scopeId", "data-v-970d0b99"]]), Kt = { class: "rc-descriptions" }, Gt = {
160
160
  key: 0,
161
161
  class: "rc-descriptions__title"
162
- }, qt = /* @__PURE__ */ re({
162
+ }, qt = /* @__PURE__ */ se({
163
163
  name: "rc-descriptions",
164
164
  __name: "index",
165
165
  props: {
@@ -171,43 +171,43 @@ const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
171
171
  keyMap: {}
172
172
  },
173
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;
174
+ const s = e, m = E(null), t = R(() => typeof s.gap == "number" ? `${s.gap}px` : String(s.gap)), y = R(() => {
175
+ const p = typeof s.column == "string" ? Number.parseInt(s.column, 10) : s.column ?? 1;
176
176
  return !Number.isNaN(p) && p > 0 ? p : 1;
177
177
  }), k = E("100%"), v = E("100%");
178
- Et(() => {
179
- const p = g.value;
178
+ Vt(() => {
179
+ const p = y.value;
180
180
  if (p <= 1)
181
181
  k.value = "100%", v.value = "100%";
182
182
  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 = _;
183
+ const B = typeof s.gap == "number" ? s.gap : parseFloat(String(s.gap)) || 0, b = `calc((100% - ${(p - 1) * B}px) / ${p})`;
184
+ v.value = b, k.value = b;
185
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) => ({
186
+ }), Te("rcDescItemWidth", k), Te("rcDescSingleWidth", v), Te("rcDescColCount", y), Te("rcDescGapPx", R(() => typeof s.gap == "number" ? s.gap : parseFloat(String(s.gap)) || 0));
187
+ const d = R(() => s.labelWidth === "" || s.labelWidth === void 0 ? "" : typeof s.labelWidth == "number" ? `${s.labelWidth}px` : String(s.labelWidth));
188
+ Te("rcDescLabelWidth", d), Te("rcDescGap", R(() => typeof s.gap == "number" ? `${s.gap}px` : String(s.gap)));
189
+ const r = R(() => {
190
+ var x, b, V;
191
+ const p = ((x = s.keyMap) == null ? void 0 : x.key) ?? "label", B = ((b = s.keyMap) == null ? void 0 : b.value) ?? "value";
192
+ return (V = s.data) != null && V.length ? s.data.map((A) => ({
193
193
  label: A == null ? void 0 : A[p],
194
194
  value: A == null ? void 0 : A[B]
195
195
  })) : [];
196
196
  });
197
- return (p, B) => (s(), f("div", jt, [
198
- p.$slots.title || e.title ? (s(), f("div", Gt, [
197
+ return (p, B) => (u(), f("div", Kt, [
198
+ p.$slots.title || e.title ? (u(), f("div", Gt, [
199
199
  q(p.$slots, "title", {}, () => [
200
200
  _e(P(e.title), 1)
201
201
  ], !0)
202
202
  ])) : D("", !0),
203
- C("div", {
203
+ S("div", {
204
204
  class: "rc-descriptions__body",
205
205
  style: le({ gap: t.value }),
206
206
  ref_key: "wrapEl",
207
207
  ref: m
208
208
  }, [
209
- o.value.length ? (s(!0), f(oe, { key: 0 }, fe(o.value, (x, _) => (s(), te(ze, {
210
- key: _,
209
+ r.value.length ? (u(!0), f(oe, { key: 0 }, ve(r.value, (x, b) => (u(), ne(Le, {
210
+ key: b,
211
211
  label: x.label,
212
212
  value: x.value,
213
213
  "label-width": e.labelWidth
@@ -215,13 +215,13 @@ const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
215
215
  ], 4)
216
216
  ]));
217
217
  }
218
- }), Ne = /* @__PURE__ */ se(qt, [["__scopeId", "data-v-5fcaa235"]]);
219
- Ne.name = "rc-descriptions";
220
- ze.name = "rc-descriptions-item";
218
+ }), We = /* @__PURE__ */ ue(qt, [["__scopeId", "data-v-5fcaa235"]]);
219
+ We.name = "rc-descriptions";
220
+ Le.name = "rc-descriptions-item";
221
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;
222
+ return e.component(We.name, We), e.component("RcDescriptions", We), e.component(Le.name, Le), e.component("RcDescriptionsItem", Le), e;
223
223
  }
224
- const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card__title-text" }, Xt = {
224
+ const za = We, Ya = Le, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card__title-text" }, Xt = {
225
225
  key: 0,
226
226
  class: "rc-card__status"
227
227
  }, Zt = {
@@ -230,7 +230,7 @@ const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card
230
230
  }, en = {
231
231
  key: 2,
232
232
  class: "rc-card__action"
233
- }, tn = /* @__PURE__ */ re({
233
+ }, tn = /* @__PURE__ */ se({
234
234
  name: "rc-card",
235
235
  __name: "index",
236
236
  props: {
@@ -248,69 +248,69 @@ const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card
248
248
  height: { default: "" }
249
249
  },
250
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);
251
+ const s = e, m = R(() => {
252
+ const d = typeof s.round == "boolean" ? s.round ? "12px" : "0" : typeof s.round == "number" ? `${s.round}px` : String(s.round);
253
253
  return {
254
- backgroundColor: r.color || "var(--rc-white)",
254
+ backgroundColor: s.color || "var(--rc-white)",
255
255
  borderRadius: d,
256
- boxShadow: v(r.elevation),
257
- width: k(r.width),
258
- height: k(r.height)
256
+ boxShadow: v(s.elevation),
257
+ width: k(s.width),
258
+ height: k(s.height)
259
259
  };
260
- }), t = R(() => r.padding || "16px"), g = R(
261
- () => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)
260
+ }), t = R(() => s.padding || "16px"), y = R(
261
+ () => typeof s.gap == "number" ? `${s.gap}px` : String(s.gap)
262
262
  );
263
263
  function k(d) {
264
264
  return d == null || d === "" ? "" : typeof d == "number" ? `${d}px` : String(d);
265
265
  }
266
266
  function v(d) {
267
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)`;
268
+ const r = 4 * d;
269
+ return `0 ${Math.round(r / 2)}px ${r}px rgba(0,0,0,0.06), 0 ${Math.round(
270
+ r / 4
271
+ )}px ${Math.round(r / 2)}px rgba(0,0,0,0.04)`;
272
272
  }
273
- return (d, o) => (s(), f("div", {
274
- class: j(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
273
+ return (d, r) => (u(), f("div", {
274
+ class: G(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
275
275
  style: le(m.value)
276
276
  }, [
277
- d.$slots.title || e.title || d.$slots.status || e.status ? (s(), f("div", {
277
+ d.$slots.title || e.title || d.$slots.status || e.status ? (u(), f("div", {
278
278
  key: 0,
279
279
  class: "rc-card__top",
280
280
  style: le({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
281
281
  }, [
282
- C("div", Jt, [
282
+ S("div", Jt, [
283
283
  q(d.$slots, "title", {}, () => [
284
- C("span", Qt, P(e.title), 1)
284
+ S("span", Qt, P(e.title), 1)
285
285
  ], !0)
286
286
  ]),
287
- d.$slots.status || e.status ? (s(), f("div", Xt, [
287
+ d.$slots.status || e.status ? (u(), f("div", Xt, [
288
288
  q(d.$slots, "status", {}, () => [
289
- C("span", {
289
+ S("span", {
290
290
  class: "rc-card__status-text",
291
291
  style: le({ color: e.statusColor || "var(--rc-primary)" })
292
292
  }, P(e.status), 5)
293
293
  ], !0)
294
294
  ])) : D("", !0)
295
295
  ], 4)) : D("", !0),
296
- C("div", {
296
+ S("div", {
297
297
  class: "rc-card__body",
298
- style: le({ padding: t.value, gap: g.value })
298
+ style: le({ padding: t.value, gap: y.value })
299
299
  }, [
300
300
  q(d.$slots, "content", {}, () => [
301
301
  q(d.$slots, "default", {}, void 0, !0)
302
302
  ], !0)
303
303
  ], 4),
304
- d.$slots.action ? (s(), f("div", Zt)) : D("", !0),
305
- d.$slots.action ? (s(), f("div", en, [
304
+ d.$slots.action ? (u(), f("div", Zt)) : D("", !0),
305
+ d.$slots.action ? (u(), f("div", en, [
306
306
  q(d.$slots, "action", {}, void 0, !0)
307
307
  ])) : D("", !0)
308
308
  ], 6));
309
309
  }
310
- }), Ze = /* @__PURE__ */ se(tn, [["__scopeId", "data-v-a7b95214"]]);
310
+ }), Ze = /* @__PURE__ */ ue(tn, [["__scopeId", "data-v-a7b95214"]]);
311
311
  Ze.name = "rc-card";
312
312
  const nn = "RcCard";
313
- function yt(e) {
313
+ function ht(e) {
314
314
  return e.component(Ze.name, Ze), e.component(nn, Ze), e;
315
315
  }
316
316
  const an = {
@@ -325,7 +325,7 @@ const an = {
325
325
  }, sn = {
326
326
  key: 2,
327
327
  class: "rc-toast__icon rc-toast__icon--fail"
328
- }, un = { class: "rc-toast__text" }, cn = /* @__PURE__ */ re({
328
+ }, un = { class: "rc-toast__text" }, cn = /* @__PURE__ */ se({
329
329
  __name: "index",
330
330
  props: {
331
331
  message: { default: "" },
@@ -334,36 +334,36 @@ const an = {
334
334
  mask: { type: Boolean, default: !1 },
335
335
  onAfterLeave: {}
336
336
  },
337
- setup(e, { expose: r }) {
337
+ setup(e, { expose: s }) {
338
338
  const m = e, t = E(!0);
339
- let g;
339
+ let y;
340
340
  function k() {
341
- g && (clearTimeout(g), g = null);
341
+ y && (clearTimeout(y), y = null);
342
342
  }
343
343
  function v() {
344
344
  k(), t.value = !1;
345
345
  }
346
- return r({ close: v }), nt(() => {
347
- m.duration && m.duration > 0 && (g = setTimeout(() => {
346
+ return s({ close: v }), at(() => {
347
+ m.duration && m.duration > 0 && (y = setTimeout(() => {
348
348
  v();
349
349
  }, m.duration));
350
- }), at(() => {
350
+ }), lt(() => {
351
351
  k();
352
- }), (d, o) => (s(), f(oe, null, [
353
- (s(), te(it, { to: "body" }, [
354
- G(Ee, {
352
+ }), (d, r) => (u(), f(oe, null, [
353
+ (u(), ne(it, { to: "body" }, [
354
+ K(Be, {
355
355
  name: "rc-toast-fade",
356
356
  onAfterLeave: e.onAfterLeave
357
357
  }, {
358
358
  default: ae(() => [
359
- t.value ? (s(), f("div", {
359
+ t.value ? (u(), f("div", {
360
360
  key: 0,
361
- class: j(["rc-toast", [`rc-toast--${e.type}`]])
361
+ class: G(["rc-toast", [`rc-toast--${e.type}`]])
362
362
  }, [
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)
363
+ e.mask ? (u(), f("div", an)) : D("", !0),
364
+ S("div", ln, [
365
+ e.type === "loading" ? (u(), f("div", on)) : e.type === "success" ? (u(), f("div", rn)) : e.type === "fail" ? (u(), f("div", sn)) : D("", !0),
366
+ S("div", un, P(e.message), 1)
367
367
  ])
368
368
  ], 2)) : D("", !0)
369
369
  ]),
@@ -373,31 +373,31 @@ const an = {
373
373
  q(d.$slots, "default", {}, void 0, !0)
374
374
  ], 64));
375
375
  }
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);
376
+ }), et = /* @__PURE__ */ ue(cn, [["__scopeId", "data-v-d234c9c5"]]);
377
+ let Ee = null, Ne = null;
378
+ function yt() {
379
+ Ee && (Ee.unmount(), Ee = null), Ne && (document.body.removeChild(Ne), Ne = null);
380
380
  }
381
- function Pa(e) {
382
- const r = typeof e == "string" ? { message: e } : e || {};
383
- ht(), Ye = document.createElement("div"), document.body.appendChild(Ye);
381
+ function La(e) {
382
+ const s = typeof e == "string" ? { message: e } : e || {};
383
+ yt(), Ne = document.createElement("div"), document.body.appendChild(Ne);
384
384
  const m = {
385
- message: r.message,
386
- type: r.type ?? "text",
387
- duration: r.duration ?? 2e3,
388
- mask: r.mask ?? !1,
385
+ message: s.message,
386
+ type: s.type ?? "text",
387
+ duration: s.duration ?? 2e3,
388
+ mask: s.mask ?? !1,
389
389
  onAfterLeave: () => {
390
390
  var t;
391
- ht(), (t = r.onClose) == null || t.call(r);
391
+ yt(), (t = s.onClose) == null || t.call(s);
392
392
  }
393
393
  };
394
- return Te = Bt(et, m), Te.mount(Ye), {
394
+ return Ee = Tt(et, m), Ee.mount(Ne), {
395
395
  close: dn
396
396
  };
397
397
  }
398
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));
399
+ var e, s, m;
400
+ Ee && ((m = (s = (e = Ee._instance) == null ? void 0 : e.exposed) == null ? void 0 : s.close) == null || m.call(s));
401
401
  }
402
402
  et.name = "rc-toast";
403
403
  function gt(e) {
@@ -407,82 +407,82 @@ const fn = {
407
407
  class: "rc-message",
408
408
  role: "alert",
409
409
  "aria-live": "polite"
410
- }, vn = { class: "rc-message__content" }, mn = /* @__PURE__ */ re({
410
+ }, vn = { class: "rc-message__content" }, mn = /* @__PURE__ */ se({
411
411
  __name: "index",
412
- setup(e, { expose: r }) {
413
- const m = At([]);
412
+ setup(e, { expose: s }) {
413
+ const m = Et([]);
414
414
  let t = 1;
415
- function g(v) {
416
- const d = m.findIndex((o) => o.id === v);
415
+ function y(v) {
416
+ const d = m.findIndex((r) => r.id === v);
417
417
  d >= 0 && m.splice(d, 1);
418
418
  }
419
- function k(v, d, o) {
419
+ function k(v, d, r) {
420
420
  const p = t++;
421
- return m.push({ id: p, type: v, content: d, duration: o }), o > 0 && window.setTimeout(() => g(p), o), p;
421
+ return m.push({ id: p, type: v, content: d, duration: r }), r > 0 && window.setTimeout(() => y(p), r), p;
422
422
  }
423
- return r({ add: k, remove: g }), (v, d) => (s(), f("div", fn, [
424
- G(Ft, {
423
+ return s({ add: k, remove: y }), (v, d) => (u(), f("div", fn, [
424
+ K(Bt, {
425
425
  name: "rc-message-fade",
426
426
  tag: "div"
427
427
  }, {
428
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}`])
429
+ (u(!0), f(oe, null, ve(m, (r) => (u(), f("div", {
430
+ key: r.id,
431
+ class: G(["rc-message__item", `rc-message--${r.type}`])
432
432
  }, [
433
- C("span", vn, P(o.content), 1)
433
+ S("span", vn, P(r.content), 1)
434
434
  ], 2))), 128))
435
435
  ]),
436
436
  _: 1
437
437
  })
438
438
  ]));
439
439
  }
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;
440
+ }), pn = /* @__PURE__ */ ue(mn, [["__scopeId", "data-v-87811df0"]]);
441
+ let Ve = null, Re = null;
442
+ function hn() {
443
+ var s;
444
+ if (Ve && Re) return;
445
+ Ve = document.createElement("div"), document.body.appendChild(Ve);
446
+ const e = K(pn, {});
447
+ Mt(e, Ve), Re = (s = e.component) == null ? void 0 : s.exposed;
448
448
  }
449
- function Ae(e, r, m) {
450
- var g;
451
- yn();
449
+ function ze(e, s, m) {
450
+ var y;
451
+ hn();
452
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);
453
+ return (y = Re == null ? void 0 : Re.add) == null ? void 0 : y.call(Re, e, s, t);
454
454
  }
455
- const hn = {
455
+ const yn = {
456
456
  open(e) {
457
- return Ae(e.type || "info", e.content, e.duration);
457
+ return ze(e.type || "info", e.content, e.duration);
458
458
  },
459
- info(e, r) {
460
- return Ae("info", e, r);
459
+ info(e, s) {
460
+ return ze("info", e, s);
461
461
  },
462
- success(e, r) {
463
- return Ae("success", e, r);
462
+ success(e, s) {
463
+ return ze("success", e, s);
464
464
  },
465
- warning(e, r) {
466
- return Ae("warning", e, r);
465
+ warning(e, s) {
466
+ return ze("warning", e, s);
467
467
  },
468
- error(e, r) {
469
- return Ae("error", e, r);
468
+ error(e, s) {
469
+ return ze("error", e, s);
470
470
  },
471
- loading(e, r) {
472
- return Ae("loading", e, r);
471
+ loading(e, s) {
472
+ return ze("loading", e, s);
473
473
  },
474
474
  destroy() {
475
- Re && (It(null, Re), Re.remove(), Re = null, Me = null);
475
+ Ve && (Mt(null, Ve), Ve.remove(), Ve = null, Re = null);
476
476
  }
477
477
  };
478
478
  function kt(e) {
479
- return e.config.globalProperties.$message = hn, e;
479
+ return e.config.globalProperties.$message = yn, e;
480
480
  }
481
- Z.name = "rc-icon";
481
+ X.name = "rc-icon";
482
482
  function bt(e) {
483
- return e.component(Z.name, Z), e.component("RcIcon", Z), e;
483
+ return e.component(X.name, X), e.component("RcIcon", X), e;
484
484
  }
485
- const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
485
+ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ se({
486
486
  name: "rc-popup",
487
487
  __name: "index",
488
488
  props: {
@@ -500,18 +500,18 @@ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
500
500
  lockScroll: { type: Boolean, default: !0 }
501
501
  },
502
502
  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(
503
+ setup(e, { expose: s, emit: m }) {
504
+ const t = e, y = m, k = E(), v = E(t.modelValue);
505
+ Ie(
506
506
  () => t.modelValue,
507
- (u) => {
508
- v.value = u, u ? (g("open"), t.lockScroll && B()) : (g("close"), t.lockScroll && x());
507
+ (i) => {
508
+ v.value = i, i ? (y("open"), t.lockScroll && B()) : (y("close"), t.lockScroll && x());
509
509
  },
510
510
  { immediate: !0 }
511
- ), Se(v, (u) => {
512
- u !== t.modelValue && g("update:modelValue", u);
511
+ ), Ie(v, (i) => {
512
+ i !== t.modelValue && y("update:modelValue", i);
513
513
  });
514
- const d = R(() => `rc-popup-slide-${t.position}`), o = R(() => ({ ...t.popupStyle || {} }));
514
+ const d = R(() => `rc-popup-slide-${t.position}`), r = R(() => ({ ...t.popupStyle || {} }));
515
515
  let p = !1;
516
516
  function B() {
517
517
  p || (p = !0, document.body.style.overflow = "hidden");
@@ -519,8 +519,8 @@ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
519
519
  function x() {
520
520
  p && (p = !1, document.body.style.overflow = "");
521
521
  }
522
- function _() {
523
- g("click-overlay"), t.closeOnClickOverlay && A();
522
+ function b() {
523
+ y("click-overlay"), t.closeOnClickOverlay && A();
524
524
  }
525
525
  function V() {
526
526
  A();
@@ -528,53 +528,53 @@ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
528
528
  function A() {
529
529
  v.value = !1;
530
530
  }
531
- function I() {
531
+ function M() {
532
532
  v.value = !0;
533
533
  }
534
- return at(() => {
534
+ return lt(() => {
535
535
  x();
536
- }), r({
537
- open: I,
536
+ }), s({
537
+ open: M,
538
538
  close: A,
539
539
  visible: v
540
- }), (u, ve) => (s(), te(it, { to: "body" }, [
541
- G(Ee, { name: "rc-popup-fade" }, {
540
+ }), (i, pe) => (u(), ne(it, { to: "body" }, [
541
+ K(Be, { name: "rc-popup-fade" }, {
542
542
  default: ae(() => [
543
- v.value && t.overlay ? (s(), f("div", {
543
+ v.value && t.overlay ? (u(), f("div", {
544
544
  key: 0,
545
- class: j(["rc-popup__overlay", { "rc-popup__overlay--transparent": t.overlayClass === "transparent" }]),
545
+ class: G(["rc-popup__overlay", { "rc-popup__overlay--transparent": t.overlayClass === "transparent" }]),
546
546
  style: le(t.overlayStyle),
547
- onClick: _
547
+ onClick: b
548
548
  }, null, 6)) : D("", !0)
549
549
  ]),
550
550
  _: 1
551
551
  }),
552
- G(Ee, { name: d.value }, {
552
+ K(Be, { name: d.value }, {
553
553
  default: ae(() => [
554
- v.value ? (s(), f("div", {
554
+ v.value ? (u(), f("div", {
555
555
  key: 0,
556
556
  ref_key: "popupRef",
557
557
  ref: k,
558
- class: j(["rc-popup", [
558
+ class: G(["rc-popup", [
559
559
  `rc-popup--${e.position}`,
560
560
  { "rc-popup--round": e.round }
561
561
  ]]),
562
- style: le(o.value),
563
- onClick: ve[0] || (ve[0] = Fe(() => {
562
+ style: le(r.value),
563
+ onClick: pe[0] || (pe[0] = Ye(() => {
564
564
  }, ["stop"]))
565
565
  }, [
566
- e.closeable ? (s(), f("div", {
566
+ e.closeable ? (u(), f("div", {
567
567
  key: 0,
568
- class: j(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
568
+ class: G(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
569
569
  onClick: V
570
570
  }, [
571
- G(Z, {
571
+ K(X, {
572
572
  name: e.closeIcon,
573
573
  class: "rc-popup__close-icon"
574
574
  }, null, 8, ["name"])
575
575
  ], 2)) : D("", !0),
576
- C("div", gn, [
577
- q(u.$slots, "default", {}, void 0, !0)
576
+ S("div", gn, [
577
+ q(i.$slots, "default", {}, void 0, !0)
578
578
  ])
579
579
  ], 6)) : D("", !0)
580
580
  ]),
@@ -582,11 +582,11 @@ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
582
582
  }, 8, ["name"])
583
583
  ]));
584
584
  }
585
- }), We = /* @__PURE__ */ se(kn, [["__scopeId", "data-v-f1696784"]]);
586
- We.name = "rc-popup";
585
+ }), He = /* @__PURE__ */ ue(kn, [["__scopeId", "data-v-f1696784"]]);
586
+ He.name = "rc-popup";
587
587
  const bn = "RcPopup";
588
588
  function _t(e) {
589
- return e.component(We.name, We), e.component(bn, We), e;
589
+ return e.component(He.name, He), e.component(bn, He), e;
590
590
  }
591
591
  const _n = {
592
592
  key: 0,
@@ -594,7 +594,7 @@ const _n = {
594
594
  }, wn = { class: "rc-calendar__header-title" }, $n = {
595
595
  key: 1,
596
596
  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 = {
597
+ }, xn = { class: "rc-calendar__shortcuts-scroll" }, Dn = ["onClick"], Cn = { class: "rc-calendar__month-title" }, Sn = { class: "rc-calendar__weekdays" }, Mn = { class: "rc-calendar__days" }, In = ["onClick"], Rn = { class: "rc-calendar__day-content" }, Vn = { class: "rc-calendar__day-text" }, Tn = {
598
598
  key: 0,
599
599
  class: "rc-calendar__day-bottom"
600
600
  }, En = {
@@ -603,13 +603,13 @@ const _n = {
603
603
  }, Bn = {
604
604
  key: 0,
605
605
  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 = {
606
+ }, Fn = { class: "rc-calendar__month-picker" }, An = { class: "rc-calendar__month-picker-header" }, zn = { class: "rc-calendar__month-picker-title" }, Yn = { key: 0 }, Ln = {
607
607
  key: 0,
608
608
  class: "rc-calendar__year-picker-content"
609
- }, Pn = { class: "rc-calendar__year-picker-grid" }, Nn = ["onClick"], Wn = {
609
+ }, Nn = { class: "rc-calendar__year-picker-grid" }, Pn = ["onClick"], Wn = {
610
610
  key: 1,
611
611
  class: "rc-calendar__month-picker-content"
612
- }, Hn = ["onClick"], Xe = 48, de = 3, ot = 7, On = /* @__PURE__ */ re({
612
+ }, Hn = ["onClick"], Xe = 48, fe = 3, rt = 7, On = /* @__PURE__ */ se({
613
613
  __name: "panel-content",
614
614
  props: {
615
615
  showTitle: { type: Boolean },
@@ -626,215 +626,215 @@ const _n = {
626
626
  maxRangeDays: {}
627
627
  },
628
628
  emits: ["select-day", "clear", "confirm", "shortcut-select"],
629
- setup(e, { expose: r, emit: m }) {
630
- const t = e, g = m, k = ["日", "一", "二", "三", "四", "五", "六"];
629
+ setup(e, { expose: s, emit: m }) {
630
+ const t = e, y = m, k = ["日", "一", "二", "三", "四", "五", "六"];
631
631
  function v(a) {
632
632
  if (!a) return null;
633
- const i = new Date(a);
634
- return isNaN(i.getTime()) ? null : i;
633
+ const o = new Date(a);
634
+ return isNaN(o.getTime()) ? null : o;
635
635
  }
636
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}`;
637
+ const o = a.getFullYear(), g = String(a.getMonth() + 1).padStart(2, "0"), F = String(a.getDate()).padStart(2, "0");
638
+ return `${o}-${g}-${F}`;
639
639
  }
640
- const o = E(/* @__PURE__ */ new Date());
641
- Se(
640
+ const r = E(/* @__PURE__ */ new Date());
641
+ Ie(
642
642
  () => [t.selectedDate, t.rangeStart],
643
643
  () => {
644
644
  if (t.range && t.rangeStart) {
645
645
  const a = v(t.rangeStart);
646
- a && (o.value = a);
646
+ a && (r.value = a);
647
647
  } else if (!t.range && t.selectedDate) {
648
648
  const a = v(t.selectedDate);
649
- a && (o.value = a);
649
+ a && (r.value = a);
650
650
  }
651
651
  },
652
652
  { immediate: !0 }
653
653
  );
654
654
  function p(a) {
655
- const i = /* @__PURE__ */ new Date();
656
- return a.getFullYear() === i.getFullYear() && a.getMonth() === i.getMonth() && a.getDate() === i.getDate();
655
+ const o = /* @__PURE__ */ new Date();
656
+ return a.getFullYear() === o.getFullYear() && a.getMonth() === o.getMonth() && a.getDate() === o.getDate();
657
657
  }
658
658
  function B(a) {
659
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;
660
+ const o = d(a), g = t.rangeStart, F = t.rangeEnd;
661
+ return o > g && o < F;
662
662
  }
663
663
  function x(a) {
664
664
  if (t.disabledDate && t.disabledDate(a))
665
665
  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),
666
+ const o = d(a);
667
+ return !!(t.minDate && o < t.minDate || t.maxDate && o > t.maxDate);
668
+ }
669
+ function b(a, o) {
670
+ const g = new Date(a, o, 1), F = new Date(a, o + 1, 0), Q = g.getDay(), Ce = F.getDate(), Se = [], dt = new Date(a, o, 0).getDate();
671
+ for (let ie = Q - 1; ie >= 0; ie--) {
672
+ const ce = {
673
+ date: new Date(a, o - 1, dt - ie),
674
674
  type: "prev-month",
675
- text: String(dt - ue)
675
+ text: String(dt - ie)
676
676
  };
677
677
  if (t.formatter) {
678
- const ce = t.formatter(ie);
679
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
678
+ const de = t.formatter(ce);
679
+ de.text && (ce.text = de.text), de.bottomInfo && (ce.bottomInfo = de.bottomInfo);
680
680
  }
681
- be.push(ie);
681
+ Se.push(ce);
682
682
  }
683
- for (let ue = 1; ue <= ke; ue++) {
684
- const ie = {
685
- date: new Date(a, i, ue),
683
+ for (let ie = 1; ie <= Ce; ie++) {
684
+ const ce = {
685
+ date: new Date(a, o, ie),
686
686
  type: "current-month",
687
- text: String(ue)
687
+ text: String(ie)
688
688
  };
689
689
  if (t.formatter) {
690
- const ce = t.formatter(ie);
691
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
690
+ const de = t.formatter(ce);
691
+ de.text && (ce.text = de.text), de.bottomInfo && (ce.bottomInfo = de.bottomInfo);
692
692
  }
693
- be.push(ie);
693
+ Se.push(ce);
694
694
  }
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),
695
+ const Rt = 42 - Se.length;
696
+ for (let ie = 1; ie <= Rt; ie++) {
697
+ const ce = {
698
+ date: new Date(a, o + 1, ie),
699
699
  type: "next-month",
700
- text: String(ue)
700
+ text: String(ie)
701
701
  };
702
702
  if (t.formatter) {
703
- const ce = t.formatter(ie);
704
- ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
703
+ const de = t.formatter(ce);
704
+ de.text && (ce.text = de.text), de.bottomInfo && (ce.bottomInfo = de.bottomInfo);
705
705
  }
706
- be.push(ie);
706
+ Se.push(ce);
707
707
  }
708
- return be;
708
+ return Se;
709
709
  }
710
710
  const V = R(() => {
711
- const a = o.value.getFullYear(), i = o.value.getMonth();
712
- return _(a, i);
711
+ const a = r.value.getFullYear(), o = r.value.getMonth();
712
+ return b(a, o);
713
713
  }), A = R(() => {
714
- const a = o.value.getFullYear(), i = o.value.getMonth() + 1;
715
- return `${a}年${i}月`;
714
+ const a = r.value.getFullYear(), o = r.value.getMonth() + 1;
715
+ return `${a}年${o}月`;
716
716
  });
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) {
717
+ function M(a) {
718
+ const o = [];
719
+ if (a.type !== "current-month" && o.push("is-other-month"), p(a.date) && o.push("is-today"), x(a.date))
720
+ return o.push("is-disabled"), o;
721
+ const g = d(a.date);
722
+ return t.range ? (t.rangeStart === g && o.push("is-start"), t.rangeEnd === g && o.push("is-end"), B(a.date) && o.push("is-in-range")) : t.selectedDate === g && o.push("is-selected"), o;
723
+ }
724
+ const i = R(() => !!(t.rangeStart && t.rangeEnd)), pe = R(() => t.rangeStart && t.rangeEnd ? 2 : t.rangeStart || t.rangeEnd ? 1 : 0);
725
+ function he(a) {
726
726
  if (!t.minDate && !t.maxDate)
727
727
  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)
728
+ const o = t.minDate ? v(t.minDate) : null, g = t.maxDate ? v(t.maxDate) : null;
729
+ return !!(o && a < o.getFullYear() || g && a > g.getFullYear());
730
+ }
731
+ function ye(a, o) {
732
+ const g = t.minDate ? v(t.minDate) : null, F = t.maxDate ? v(t.maxDate) : null;
733
+ if (g) {
734
+ const Q = g.getFullYear(), Ce = g.getMonth() + 1;
735
+ if (a < Q || a === Q && o < Ce)
736
736
  return !0;
737
737
  }
738
- if (z) {
739
- const W = z.getFullYear(), ke = z.getMonth() + 1;
740
- if (a > W || a === W && i > ke)
738
+ if (F) {
739
+ const Q = F.getFullYear(), Ce = F.getMonth() + 1;
740
+ if (a > Q || a === Q && o > Ce)
741
741
  return !0;
742
742
  }
743
743
  return !1;
744
744
  }
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);
745
+ const O = E(!1), H = E("year"), U = E(r.value.getFullYear()), z = E(r.value.getMonth() + 1), j = E(), C = E(1900), T = E(1920), I = E(1900), Y = E(2100), ge = R(() => {
746
+ const a = [], g = Math.floor((C.value - I.value) / fe) - 3, F = Math.ceil((T.value - I.value) / fe) + 3, Q = I.value + Math.max(0, g) * fe, Ce = I.value + F * fe - 1;
747
+ for (let Se = Q; Se <= Ce; Se++)
748
+ a.push(Se);
749
749
  return a;
750
750
  });
751
- Se(() => o.value, (a) => {
752
- O.value = a.getFullYear(), F.value = a.getMonth() + 1;
751
+ Ie(() => r.value, (a) => {
752
+ U.value = a.getFullYear(), z.value = a.getMonth() + 1;
753
753
  }, { 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);
754
+ function ke() {
755
+ if (!j.value) return;
756
+ const a = j.value.scrollTop, g = Math.max(0, Math.floor(a / Xe)), F = I.value + g * fe, Q = F + rt * fe - 1;
757
+ F < I.value ? I.value = F - 100 : Q > Y.value && (Y.value = Q + 100), (F !== C.value || Q !== T.value) && (C.value = F, T.value = Q);
758
+ }
759
+ function be() {
760
+ U.value = r.value.getFullYear(), z.value = r.value.getMonth() + 1, H.value = "year", O.value = !0;
761
+ const a = U.value;
762
+ a < I.value ? I.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99), Fe(() => {
763
+ if (j.value) {
764
+ const o = Math.floor((a - I.value) / fe), g = Math.max(0, o - 2);
765
+ C.value = I.value + g * fe, T.value = C.value + rt * fe - 1, we(a);
766
766
  }
767
767
  });
768
768
  }
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;
776
- }
777
- function b() {
778
- const a = new Date(o.value);
779
- a.setMonth(a.getMonth() - 1), o.value = a;
769
+ function we(a) {
770
+ if (!j.value) return;
771
+ a < I.value ? I.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99);
772
+ const o = Math.floor((a - I.value) / fe), g = o * Xe;
773
+ j.value.scrollTop = g;
774
+ const F = Math.max(0, o - 2);
775
+ C.value = I.value + F * fe, T.value = C.value + rt * fe - 1;
780
776
  }
781
777
  function w() {
782
- const a = new Date(o.value);
783
- a.setMonth(a.getMonth() + 1), o.value = a;
778
+ const a = new Date(r.value);
779
+ a.setMonth(a.getMonth() - 1), r.value = a;
780
+ }
781
+ function $() {
782
+ const a = new Date(r.value);
783
+ a.setMonth(a.getMonth() + 1), r.value = a;
784
784
  }
785
785
  function L(a) {
786
- ye(a) || (O.value = a, N.value = "month");
786
+ he(a) || (U.value = a, H.value = "month");
787
787
  }
788
- function ee(a) {
789
- he(O.value, a) || (F.value = a, h());
788
+ function te(a) {
789
+ ye(U.value, a) || (z.value = a, h());
790
790
  }
791
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";
794
- }
795
- function X(a) {
796
- g("select-day", a);
792
+ const a = new Date(r.value);
793
+ a.setFullYear(U.value), a.setMonth(z.value - 1), r.value = a, O.value = !1, H.value = "year";
797
794
  }
798
- function ne() {
799
- g("clear");
795
+ function Z(a) {
796
+ y("select-day", a);
800
797
  }
801
798
  function n() {
802
- pe.value && ne();
799
+ y("clear");
803
800
  }
804
801
  function l() {
805
- g("confirm");
802
+ re.value && n();
806
803
  }
807
804
  function c() {
808
- H.value = !1;
805
+ y("confirm");
809
806
  }
810
- function $(a) {
811
- N.value = a;
807
+ function _() {
808
+ O.value = !1;
809
+ }
810
+ function W(a) {
811
+ H.value = a;
812
812
  }
813
- function J() {
814
- const i = (/* @__PURE__ */ new Date()).getFullYear();
815
- ye(i) || (O.value = i, N.value = "month");
813
+ function N() {
814
+ const o = (/* @__PURE__ */ new Date()).getFullYear();
815
+ he(o) || (U.value = o, H.value = "month");
816
816
  }
817
- function K() {
818
- const i = (/* @__PURE__ */ new Date()).getMonth() + 1;
819
- he(O.value, i) || (F.value = i, h());
817
+ function ee() {
818
+ const o = (/* @__PURE__ */ new Date()).getMonth() + 1;
819
+ ye(U.value, o) || (z.value = o, h());
820
820
  }
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;
821
+ const re = R(() => t.range ? !!(t.rangeStart || t.rangeEnd) : !!t.selectedDate);
822
+ function me(a, o) {
823
+ const g = v(a), F = v(o);
824
+ if (!g || !F) return 0;
825
+ const Q = Math.abs(F.getTime() - g.getTime());
826
+ return Math.ceil(Q / (1e3 * 60 * 60 * 24)) + 1;
827
827
  }
828
- function De() {
828
+ function $e() {
829
829
  return d(/* @__PURE__ */ new Date());
830
830
  }
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);
831
+ function Ae() {
832
+ const a = /* @__PURE__ */ new Date(), o = a.getDay(), g = a.getDate() - o + (o === 0 ? -6 : 1);
833
+ return new Date(a.getFullYear(), a.getMonth(), g);
834
834
  }
835
- function Oe() {
836
- const a = Le(), i = new Date(a);
837
- return i.setDate(a.getDate() + 6), i;
835
+ function xe() {
836
+ const a = Ae(), o = new Date(a);
837
+ return o.setDate(a.getDate() + 6), o;
838
838
  }
839
839
  function Ue() {
840
840
  const a = /* @__PURE__ */ new Date();
@@ -844,11 +844,11 @@ const _n = {
844
844
  const a = /* @__PURE__ */ new Date();
845
845
  return new Date(a.getFullYear(), a.getMonth() + 1, 0);
846
846
  }
847
- function Ke() {
847
+ function je() {
848
848
  const a = /* @__PURE__ */ new Date();
849
849
  return new Date(a.getFullYear(), a.getMonth() - 2, 1);
850
850
  }
851
- function je() {
851
+ function Ke() {
852
852
  const a = /* @__PURE__ */ new Date();
853
853
  return new Date(a.getFullYear(), 0, 1);
854
854
  }
@@ -862,7 +862,7 @@ const _n = {
862
862
  label: "本日",
863
863
  days: 1,
864
864
  getRange: () => {
865
- const a = De();
865
+ const a = $e();
866
866
  return [a, a];
867
867
  }
868
868
  },
@@ -871,32 +871,32 @@ const _n = {
871
871
  label: "本周",
872
872
  days: 7,
873
873
  getRange: () => {
874
- const a = d(Le()), i = d(Oe());
875
- return [a, i];
874
+ const a = d(Ae()), o = d(xe());
875
+ return [a, o];
876
876
  }
877
877
  },
878
878
  {
879
879
  key: "month",
880
880
  label: "本月",
881
881
  getRange: () => {
882
- const a = d(Ue()), i = d(Pe());
883
- return [a, i];
882
+ const a = d(Ue()), o = d(Pe());
883
+ return [a, o];
884
884
  }
885
885
  },
886
886
  {
887
887
  key: "threeMonths",
888
888
  label: "近三月",
889
889
  getRange: () => {
890
- const a = d(Ke()), i = d(Pe());
891
- return [a, i];
890
+ const a = d(je()), o = d(Pe());
891
+ return [a, o];
892
892
  }
893
893
  },
894
894
  {
895
895
  key: "year",
896
896
  label: "本年",
897
897
  getRange: () => {
898
- const a = d(je()), i = d(Ge());
899
- return [a, i];
898
+ const a = d(Ke()), o = d(Ge());
899
+ return [a, o];
900
900
  }
901
901
  },
902
902
  {
@@ -904,8 +904,8 @@ const _n = {
904
904
  label: "近7天",
905
905
  days: 7,
906
906
  getRange: () => {
907
- const a = /* @__PURE__ */ new Date(), i = new Date(a);
908
- return i.setDate(a.getDate() - 6), [d(i), De()];
907
+ const a = /* @__PURE__ */ new Date(), o = new Date(a);
908
+ return o.setDate(a.getDate() - 6), [d(o), $e()];
909
909
  }
910
910
  },
911
911
  {
@@ -913,8 +913,8 @@ const _n = {
913
913
  label: "近30天",
914
914
  days: 30,
915
915
  getRange: () => {
916
- const a = /* @__PURE__ */ new Date(), i = new Date(a);
917
- return i.setDate(a.getDate() - 29), [d(i), De()];
916
+ const a = /* @__PURE__ */ new Date(), o = new Date(a);
917
+ return o.setDate(a.getDate() - 29), [d(o), $e()];
918
918
  }
919
919
  }
920
920
  ], Je = R(() => qe.filter((a) => {
@@ -922,192 +922,192 @@ const _n = {
922
922
  if (a.days !== void 0)
923
923
  return a.days <= t.maxRangeDays;
924
924
  {
925
- const i = a.getRange();
926
- if (i)
927
- return Ie(i[0], i[1]) <= t.maxRangeDays;
925
+ const o = a.getRange();
926
+ if (o)
927
+ return me(o[0], o[1]) <= t.maxRangeDays;
928
928
  }
929
929
  }
930
930
  return !0;
931
931
  }));
932
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)
933
+ const o = a.getRange();
934
+ if (o) {
935
+ if (t.minDate && o[0] < t.minDate || t.maxDate && o[1] > t.maxDate)
936
936
  return;
937
- g("shortcut-select", i);
937
+ y("shortcut-select", o);
938
938
  }
939
939
  }
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
940
+ return s({
941
+ yearScrollRef: j
942
+ }), (a, o) => (u(), f("div", null, [
943
+ e.showTitle ? (u(), f("div", _n, [
944
+ S("div", wn, P(e.title), 1),
945
+ S("span", {
946
+ class: G(["rc-calendar__header-clear", { "is-disabled": !re.value }]),
947
+ onClick: l
948
948
  }, " 清空 ", 2)
949
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,
950
+ e.range ? (u(), f("div", $n, [
951
+ S("div", xn, [
952
+ (u(!0), f(oe, null, ve(Je.value, (g) => (u(), f("div", {
953
+ key: g.key,
954
954
  class: "rc-calendar__shortcut-item",
955
- onClick: (z) => Qe(y)
956
- }, P(y.label), 9, Dn))), 128))
955
+ onClick: (F) => Qe(g)
956
+ }, P(g.label), 9, Dn))), 128))
957
957
  ])
958
958
  ])) : D("", !0),
959
- C("div", Cn, [
960
- C("div", {
959
+ S("div", Cn, [
960
+ S("div", {
961
961
  class: "rc-calendar__nav-button",
962
- onClick: b
962
+ onClick: w
963
963
  }, [
964
- G(Q(Z), {
964
+ K(J(X), {
965
965
  name: "icon_caret-left",
966
966
  class: "rc-calendar__nav-icon"
967
967
  })
968
968
  ]),
969
- C("div", {
969
+ S("div", {
970
970
  class: "rc-calendar__month-text",
971
- onClick: we
971
+ onClick: be
972
972
  }, P(A.value), 1),
973
- C("div", {
973
+ S("div", {
974
974
  class: "rc-calendar__nav-button",
975
- onClick: w
975
+ onClick: $
976
976
  }, [
977
- G(Q(Z), {
977
+ K(J(X), {
978
978
  name: "icon_caret-right",
979
979
  class: "rc-calendar__nav-icon"
980
980
  })
981
981
  ])
982
982
  ]),
983
- C("div", Sn, [
984
- (s(), f(oe, null, fe(k, (y) => C("div", {
985
- key: y,
983
+ S("div", Sn, [
984
+ (u(), f(oe, null, ve(k, (g) => S("div", {
985
+ key: g,
986
986
  class: "rc-calendar__weekday"
987
- }, P(y), 1)), 64))
987
+ }, P(g), 1)), 64))
988
988
  ]),
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)
989
+ S("div", Mn, [
990
+ (u(!0), f(oe, null, ve(V.value, (g, F) => (u(), f("div", {
991
+ key: F,
992
+ class: G(["rc-calendar__day", M(g)]),
993
+ onClick: (Q) => Z(g)
994
994
  }, [
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)
995
+ S("div", Rn, [
996
+ S("span", Vn, P(g.text), 1),
997
+ g.bottomInfo ? (u(), f("span", Tn, P(g.bottomInfo), 1)) : D("", !0)
998
998
  ])
999
- ], 10, Mn))), 128))
999
+ ], 10, In))), 128))
1000
1000
  ]),
1001
- e.range && e.showFooter ? (s(), f("div", En, [
1002
- G(Q(xe), {
1001
+ e.range && e.showFooter ? (u(), f("div", En, [
1002
+ K(J(De), {
1003
1003
  type: "default",
1004
1004
  class: "rc-calendar__footer-reset",
1005
- onClick: ne
1005
+ onClick: n
1006
1006
  }, {
1007
- default: ae(() => [...i[2] || (i[2] = [
1007
+ default: ae(() => [...o[2] || (o[2] = [
1008
1008
  _e("取消", -1)
1009
1009
  ])]),
1010
1010
  _: 1
1011
1011
  }),
1012
- G(Q(xe), {
1012
+ K(J(De), {
1013
1013
  type: "primary",
1014
1014
  class: "rc-calendar__footer-confirm",
1015
- disabled: !u.value,
1016
- onClick: l
1015
+ disabled: !i.value,
1016
+ onClick: c
1017
1017
  }, {
1018
1018
  default: ae(() => [
1019
- _e(P(u.value ? `确定(${ve.value}项)` : "确定"), 1)
1019
+ _e(P(i.value ? `确定(${pe.value}项)` : "确定"), 1)
1020
1020
  ]),
1021
1021
  _: 1
1022
1022
  }, 8, ["disabled"])
1023
1023
  ])) : D("", !0),
1024
- G(Ee, { name: "rc-calendar-fade" }, {
1024
+ K(Be, { name: "rc-calendar-fade" }, {
1025
1025
  default: ae(() => [
1026
- H.value ? (s(), f("div", Bn, [
1027
- C("div", An, [
1028
- C("div", Fn, [
1029
- G(Q(xe), {
1026
+ O.value ? (u(), f("div", Bn, [
1027
+ S("div", Fn, [
1028
+ S("div", An, [
1029
+ K(J(De), {
1030
1030
  type: "default",
1031
1031
  mode: "text",
1032
1032
  size: "small",
1033
- onClick: c
1033
+ onClick: _
1034
1034
  }, {
1035
- default: ae(() => [...i[3] || (i[3] = [
1035
+ default: ae(() => [...o[3] || (o[3] = [
1036
1036
  _e("取消", -1)
1037
1037
  ])]),
1038
1038
  _: 1
1039
1039
  }),
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", {
1040
+ S("div", zn, [
1041
+ S("span", {
1042
+ onClick: o[0] || (o[0] = (g) => W("year"))
1043
+ }, P(U.value) + "年", 1),
1044
+ H.value === "month" ? (u(), f("span", Yn, " - ")) : D("", !0),
1045
+ H.value === "month" ? (u(), f("span", {
1046
1046
  key: 1,
1047
- onClick: i[1] || (i[1] = (y) => $("month"))
1048
- }, P(F.value) + "月", 1)) : D("", !0)
1047
+ onClick: o[1] || (o[1] = (g) => W("month"))
1048
+ }, P(z.value) + "月", 1)) : D("", !0)
1049
1049
  ]),
1050
- N.value === "year" ? (s(), te(Q(xe), {
1050
+ H.value === "year" ? (u(), ne(J(De), {
1051
1051
  key: 0,
1052
1052
  type: "primary",
1053
1053
  mode: "text",
1054
1054
  size: "small",
1055
- onClick: J
1055
+ onClick: N
1056
1056
  }, {
1057
- default: ae(() => [...i[4] || (i[4] = [
1057
+ default: ae(() => [...o[4] || (o[4] = [
1058
1058
  _e(" 本年 ", -1)
1059
1059
  ])]),
1060
1060
  _: 1
1061
1061
  })) : D("", !0),
1062
- N.value === "month" ? (s(), te(Q(xe), {
1062
+ H.value === "month" ? (u(), ne(J(De), {
1063
1063
  key: 1,
1064
1064
  type: "primary",
1065
1065
  mode: "text",
1066
1066
  size: "small",
1067
- onClick: K
1067
+ onClick: ee
1068
1068
  }, {
1069
- default: ae(() => [...i[5] || (i[5] = [
1069
+ default: ae(() => [...o[5] || (o[5] = [
1070
1070
  _e(" 本月 ", -1)
1071
1071
  ])]),
1072
1072
  _: 1
1073
1073
  })) : D("", !0)
1074
1074
  ]),
1075
- N.value === "year" ? (s(), f("div", Ln, [
1076
- C("div", {
1075
+ H.value === "year" ? (u(), f("div", Ln, [
1076
+ S("div", {
1077
1077
  class: "rc-calendar__year-picker-scroll",
1078
1078
  ref_key: "yearScrollRef",
1079
- ref: U,
1080
- onScroll: ge
1079
+ ref: j,
1080
+ onScroll: ke
1081
1081
  }, [
1082
- C("div", {
1082
+ S("div", {
1083
1083
  class: "rc-calendar__year-picker-spacer",
1084
- style: le({ height: `${Math.floor((S.value - M.value) / de) * Xe}px` })
1084
+ style: le({ height: `${Math.floor((C.value - I.value) / fe) * Xe}px` })
1085
1085
  }, 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)
1086
+ S("div", Nn, [
1087
+ (u(!0), f(oe, null, ve(ge.value, (g) => (u(), f("div", {
1088
+ key: g,
1089
+ class: G(["rc-calendar__year-picker-item", {
1090
+ "is-selected": U.value === g,
1091
+ "is-disabled": he(g)
1092
1092
  }]),
1093
- onClick: (z) => L(y)
1094
- }, P(y), 11, Nn))), 128))
1093
+ onClick: (F) => L(g)
1094
+ }, P(g), 11, Pn))), 128))
1095
1095
  ]),
1096
- C("div", {
1096
+ S("div", {
1097
1097
  class: "rc-calendar__year-picker-spacer",
1098
- style: le({ height: `${Math.ceil((Y.value - T.value) / de) * Xe}px` })
1098
+ style: le({ height: `${Math.ceil((Y.value - T.value) / fe) * Xe}px` })
1099
1099
  }, null, 4)
1100
1100
  ], 544)
1101
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)
1102
+ H.value === "month" ? (u(), f("div", Wn, [
1103
+ (u(), f(oe, null, ve(12, (g) => S("div", {
1104
+ key: g,
1105
+ class: G(["rc-calendar__month-picker-item", {
1106
+ "is-selected": z.value === g,
1107
+ "is-disabled": ye(U.value, g)
1108
1108
  }]),
1109
- onClick: (z) => ee(y)
1110
- }, P(y) + "月 ", 11, Hn)), 64))
1109
+ onClick: (F) => te(g)
1110
+ }, P(g) + "月 ", 11, Hn)), 64))
1111
1111
  ])) : D("", !0)
1112
1112
  ])
1113
1113
  ])) : D("", !0)
@@ -1116,10 +1116,10 @@ const _n = {
1116
1116
  })
1117
1117
  ]));
1118
1118
  }
1119
- }), wt = /* @__PURE__ */ se(On, [["__scopeId", "data-v-0bf1834b"]]), Un = { class: "rc-calendar" }, Kn = ["placeholder"], jn = { class: "rc-calendar__input-actions" }, Gn = {
1119
+ }), wt = /* @__PURE__ */ ue(On, [["__scopeId", "data-v-0bf1834b"]]), Un = { class: "rc-calendar" }, jn = ["placeholder"], Kn = { class: "rc-calendar__input-actions" }, Gn = {
1120
1120
  key: 1,
1121
1121
  class: "rc-calendar__panel"
1122
- }, qn = /* @__PURE__ */ re({
1122
+ }, qn = /* @__PURE__ */ se({
1123
1123
  name: "rc-calendar",
1124
1124
  __name: "index",
1125
1125
  props: {
@@ -1137,171 +1137,171 @@ const _n = {
1137
1137
  endDateOffset: { type: Boolean, default: !1 }
1138
1138
  },
1139
1139
  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))
1140
+ setup(e, { emit: s }) {
1141
+ const m = e, t = s, y = E(), k = E(), v = E(!1), d = E(""), r = R(() => m.range === !0 || typeof m.range == "number"), p = R(() => typeof m.range == "number" ? m.range : void 0), B = R(() => (w) => {
1142
+ if (m.disabledDate && m.disabledDate(w))
1143
1143
  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)
1144
+ if (p.value !== void 0 && b.value && !V.value) {
1145
+ const $ = i(w);
1146
+ if (M(b.value) && pe(b.value, $) > p.value)
1147
1147
  return !0;
1148
1148
  }
1149
1149
  return !1;
1150
- }), x = E(null), _ = E(null), V = E(null);
1151
- Se(
1150
+ }), x = E(null), b = E(null), V = E(null);
1151
+ Ie(
1152
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();
1153
+ (w) => {
1154
+ r.value ? Array.isArray(w) && w.length === 2 ? (b.value = w[0], V.value = H(w[1])) : (b.value = null, V.value = null) : x.value = typeof w == "string" ? w : null, A();
1155
1155
  },
1156
1156
  { immediate: !0 }
1157
1157
  );
1158
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 || "");
1159
+ m.mode === "popup" && (r.value ? b.value && V.value ? d.value = `${b.value} ~ ${V.value}` : b.value ? d.value = `${b.value} ~ ` : d.value = "" : d.value = x.value || "");
1160
1160
  }
1161
- function I(b) {
1162
- if (!b) return null;
1163
- const w = new Date(b);
1164
- return isNaN(w.getTime()) ? null : w;
1161
+ function M(w) {
1162
+ if (!w) return null;
1163
+ const $ = new Date(w);
1164
+ return isNaN($.getTime()) ? null : $;
1165
1165
  }
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}`;
1166
+ function i(w) {
1167
+ const $ = w.getFullYear(), L = String(w.getMonth() + 1).padStart(2, "0"), te = String(w.getDate()).padStart(2, "0");
1168
+ return `${$}-${L}-${te}`;
1169
1169
  }
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());
1170
+ function pe(w, $) {
1171
+ const L = M(w), te = M($);
1172
+ if (!L || !te) return 0;
1173
+ const h = Math.abs(te.getTime() - L.getTime());
1174
1174
  return Math.ceil(h / (1e3 * 60 * 60 * 24));
1175
1175
  }
1176
- function ye(b) {
1177
- const w = I(b);
1178
- return w ? (w.setDate(w.getDate() + 1), u(w)) : b;
1176
+ function he(w) {
1177
+ const $ = M(w);
1178
+ return $ ? ($.setDate($.getDate() + 1), i($)) : w;
1179
1179
  }
1180
- function he(b) {
1181
- const w = I(b);
1182
- return w ? (w.setDate(w.getDate() - 1), u(w)) : b;
1180
+ function ye(w) {
1181
+ const $ = M(w);
1182
+ return $ ? ($.setDate($.getDate() - 1), i($)) : w;
1183
1183
  }
1184
- function H(b) {
1185
- return m.endDateOffset && o.value ? ye(b) : b;
1184
+ function O(w) {
1185
+ return m.endDateOffset && r.value ? he(w) : w;
1186
1186
  }
1187
- function N(b) {
1188
- return m.endDateOffset && o.value ? he(b) : b;
1187
+ function H(w) {
1188
+ return m.endDateOffset && r.value ? ye(w) : w;
1189
1189
  }
1190
- function O(b) {
1191
- if (b.type !== "current-month" || m.disabledDate && m.disabledDate(b.date))
1190
+ function U(w) {
1191
+ if (w.type !== "current-month" || m.disabledDate && m.disabledDate(w.date))
1192
1192
  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;
1193
+ const $ = i(w.date);
1194
+ if (!(m.minDate && $ < m.minDate) && !(m.maxDate && $ > m.maxDate)) {
1195
+ if (r.value)
1196
+ if (!b.value || b.value && V.value)
1197
+ b.value = $, V.value = null;
1198
1198
  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();
1199
+ let L = b.value, te = $;
1200
+ if ($ < b.value && (te = b.value, L = $), b.value = L, V.value = te, b.value && V.value) {
1201
+ const h = O(V.value), Z = [b.value, h];
1202
+ t("update:modelValue", Z), t("change", Z), m.showFooter || z();
1203
1203
  }
1204
1204
  }
1205
1205
  else {
1206
- x.value = w;
1207
- const L = w;
1208
- t("update:modelValue", L), t("change", L), m.mode && M();
1206
+ x.value = $;
1207
+ const L = $;
1208
+ t("update:modelValue", L), t("change", L), m.mode && I();
1209
1209
  }
1210
1210
  A();
1211
1211
  }
1212
1212
  }
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();
1213
+ function z() {
1214
+ if (b.value && V.value) {
1215
+ const w = O(V.value), $ = [b.value, w];
1216
+ t("update:modelValue", $), t("change", $), t("confirm", $), I();
1217
1217
  }
1218
1218
  }
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();
1219
+ function j() {
1220
+ r.value ? (b.value = null, V.value = null) : x.value = null;
1221
+ const w = null;
1222
+ t("update:modelValue", w), t("change", w), A();
1223
1223
  }
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();
1224
+ function C(w) {
1225
+ b.value = w[0], V.value = w[1];
1226
+ const $ = O(w[1]), L = [w[0], $];
1227
+ t("update:modelValue", L), t("change", L), m.showFooter ? A() : z();
1228
1228
  }
1229
1229
  function T() {
1230
1230
  v.value = !0;
1231
1231
  }
1232
- function M() {
1232
+ function I() {
1233
1233
  v.value = !1;
1234
1234
  }
1235
- function Y(b) {
1236
- v.value = b;
1235
+ function Y(w) {
1236
+ v.value = w;
1237
1237
  }
1238
- function me() {
1238
+ function ge() {
1239
1239
  T();
1240
1240
  }
1241
- function ge() {
1242
- m.mode === "popup" && $e();
1241
+ function ke() {
1242
+ m.mode === "popup" && we();
1243
1243
  }
1244
- function we() {
1244
+ function be() {
1245
1245
  v.value || T();
1246
1246
  }
1247
- 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);
1247
+ function we() {
1248
+ const w = d.value.trim();
1249
+ if (r.value) {
1250
+ const $ = w.split("~").map((L) => L.trim());
1251
+ if ($.length === 2 && $[0] && $[1]) {
1252
+ const L = M($[0]), te = M($[1]);
1253
+ if (L && te && !isNaN(L.getTime()) && !isNaN(te.getTime())) {
1254
+ b.value = i(L);
1255
+ const h = i(te);
1256
+ V.value = H(h);
1257
+ const Z = O(V.value), n = [b.value, Z];
1258
+ t("update:modelValue", n), t("change", n);
1259
1259
  return;
1260
1260
  }
1261
1261
  }
1262
1262
  } 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);
1263
+ const $ = M(w);
1264
+ if ($ && !isNaN($.getTime())) {
1265
+ x.value = i($), t("update:modelValue", x.value), t("change", x.value);
1266
1266
  return;
1267
1267
  }
1268
1268
  }
1269
1269
  A();
1270
1270
  }
1271
- return (b, w) => (s(), f("div", Un, [
1272
- e.mode === "popup" ? (s(), f("div", {
1271
+ return (w, $) => (u(), f("div", Un, [
1272
+ e.mode === "popup" ? (u(), f("div", {
1273
1273
  key: 0,
1274
1274
  class: "rc-calendar__input",
1275
1275
  onClick: T
1276
1276
  }, [
1277
- Mt(C("input", {
1277
+ Ft(S("input", {
1278
1278
  ref_key: "inputRef",
1279
- ref: g,
1280
- "onUpdate:modelValue": w[0] || (w[0] = (L) => d.value = L),
1279
+ ref: y,
1280
+ "onUpdate:modelValue": $[0] || ($[0] = (L) => d.value = L),
1281
1281
  type: "text",
1282
1282
  class: "rc-calendar__input-field",
1283
1283
  placeholder: e.placeholder,
1284
1284
  readonly: "",
1285
- onFocus: me,
1286
- onBlur: ge,
1287
- onInput: we
1288
- }, null, 40, Kn), [
1289
- [Rt, d.value]
1285
+ onFocus: ge,
1286
+ onBlur: ke,
1287
+ onInput: be
1288
+ }, null, 40, jn), [
1289
+ [At, d.value]
1290
1290
  ]),
1291
- C("div", jn, [
1292
- G(Q(Z), {
1291
+ S("div", Kn, [
1292
+ K(J(X), {
1293
1293
  name: "icon_a-rili",
1294
1294
  class: "rc-calendar__input-icon"
1295
1295
  })
1296
1296
  ])
1297
1297
  ])) : D("", !0),
1298
- e.mode === "default" ? (s(), f("div", Gn, [
1299
- G(wt, {
1298
+ e.mode === "default" ? (u(), f("div", Gn, [
1299
+ K(wt, {
1300
1300
  "show-title": e.showTitle,
1301
1301
  title: e.title,
1302
- range: o.value,
1302
+ range: r.value,
1303
1303
  "selected-date": x.value,
1304
- "range-start": _.value,
1304
+ "range-start": b.value,
1305
1305
  "range-end": V.value,
1306
1306
  "min-date": e.minDate,
1307
1307
  "max-date": e.maxDate,
@@ -1309,17 +1309,17 @@ const _n = {
1309
1309
  formatter: e.formatter,
1310
1310
  "show-footer": !1,
1311
1311
  "max-range-days": p.value,
1312
- onSelectDay: O,
1313
- onClear: U,
1314
- onConfirm: F,
1315
- onShortcutSelect: S
1312
+ onSelectDay: U,
1313
+ onClear: j,
1314
+ onConfirm: z,
1315
+ onShortcutSelect: C
1316
1316
  }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "max-range-days"])
1317
1317
  ])) : D("", !0),
1318
- e.mode === "popup" ? (s(), te(Q(We), {
1318
+ e.mode === "popup" ? (u(), ne(J(He), {
1319
1319
  key: 2,
1320
1320
  modelValue: v.value,
1321
1321
  "onUpdate:modelValue": [
1322
- w[1] || (w[1] = (L) => v.value = L),
1322
+ $[1] || ($[1] = (L) => v.value = L),
1323
1323
  Y
1324
1324
  ],
1325
1325
  position: "bottom",
@@ -1329,17 +1329,17 @@ const _n = {
1329
1329
  "lock-scroll": !0
1330
1330
  }, {
1331
1331
  default: ae(() => [
1332
- C("div", {
1332
+ S("div", {
1333
1333
  ref_key: "popupPanelRef",
1334
1334
  ref: k,
1335
1335
  class: "rc-calendar__panel"
1336
1336
  }, [
1337
- G(wt, {
1337
+ K(wt, {
1338
1338
  "show-title": e.showTitle,
1339
1339
  title: e.title,
1340
- range: o.value,
1340
+ range: r.value,
1341
1341
  "selected-date": x.value,
1342
- "range-start": _.value,
1342
+ "range-start": b.value,
1343
1343
  "range-end": V.value,
1344
1344
  "min-date": e.minDate,
1345
1345
  "max-date": e.maxDate,
@@ -1347,10 +1347,10 @@ const _n = {
1347
1347
  formatter: e.formatter,
1348
1348
  "show-footer": e.showFooter,
1349
1349
  "max-range-days": p.value,
1350
- onSelectDay: O,
1351
- onClear: U,
1352
- onConfirm: F,
1353
- onShortcutSelect: S
1350
+ onSelectDay: U,
1351
+ onClear: j,
1352
+ onConfirm: z,
1353
+ onShortcutSelect: C
1354
1354
  }, 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
1355
  ], 512)
1356
1356
  ]),
@@ -1358,37 +1358,336 @@ const _n = {
1358
1358
  }, 8, ["modelValue"])) : D("", !0)
1359
1359
  ]));
1360
1360
  }
1361
- }), He = /* @__PURE__ */ se(qn, [["__scopeId", "data-v-96b29c22"]]);
1362
- He.name = "rc-calendar";
1361
+ }), Oe = /* @__PURE__ */ ue(qn, [["__scopeId", "data-v-96b29c22"]]);
1362
+ Oe.name = "rc-calendar";
1363
1363
  const Jn = "RcCalendar";
1364
1364
  function $t(e) {
1365
- return e.component(He.name, He), e.component(Jn, He), e;
1365
+ return e.component(Oe.name, Oe), e.component(Jn, Oe), e;
1366
1366
  }
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 = {
1367
+ const Qn = {
1368
+ key: 0,
1369
+ class: "rc-input__prepend"
1370
+ }, Xn = {
1371
+ key: 0,
1372
+ class: "rc-input__prefix"
1373
+ }, Zn = {
1374
+ key: 1,
1375
+ class: "rc-input__textarea-wrapper"
1376
+ }, ea = {
1377
+ key: 3,
1378
+ class: "rc-input__suffix"
1379
+ }, ta = {
1380
+ key: 0,
1381
+ class: "rc-input__suffix-inner"
1382
+ }, na = {
1383
+ key: 4,
1384
+ class: "rc-input__count"
1385
+ }, aa = {
1386
+ key: 1,
1387
+ class: "rc-input__append"
1388
+ }, la = /* @__PURE__ */ se({
1389
+ __name: "index",
1390
+ props: {
1391
+ modelValue: { default: "" },
1392
+ type: { default: "text" },
1393
+ size: { default: "default" },
1394
+ placeholder: { default: "请输入" },
1395
+ disabled: { type: Boolean, default: !1 },
1396
+ clearable: { type: Boolean, default: !0 },
1397
+ showPassword: { type: Boolean, default: !1 },
1398
+ readonly: { type: Boolean, default: !1 },
1399
+ maxlength: { default: void 0 },
1400
+ minlength: { default: void 0 },
1401
+ showWordLimit: { type: Boolean, default: !1 },
1402
+ rows: { default: 2 },
1403
+ autosize: { type: [Boolean, Object], default: !1 },
1404
+ resize: { default: void 0 },
1405
+ prefixIcon: { default: "" },
1406
+ suffixIcon: { default: "" },
1407
+ autocomplete: { default: "off" },
1408
+ name: { default: void 0 },
1409
+ autofocus: { type: Boolean, default: !1 },
1410
+ form: { default: void 0 },
1411
+ tabindex: { default: void 0 },
1412
+ formatter: { type: Function, default: void 0 },
1413
+ parser: { type: Function, default: void 0 },
1414
+ deviceType: { default: void 0 }
1415
+ },
1416
+ emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "keydown", "mouseenter", "mouseleave", "compositionstart", "compositionupdate", "compositionend"],
1417
+ setup(e, { expose: s, emit: m }) {
1418
+ const t = e, y = Me(ot, {}), k = R(() => t.deviceType || (y == null ? void 0 : y.inputDeviceType) || ct.inputDeviceType || "pc"), v = m, d = E(), r = E(t.modelValue ?? ""), p = E(!1), B = E(!1), x = E(!1);
1419
+ Ie(
1420
+ () => t.modelValue,
1421
+ (h) => {
1422
+ r.value = h ?? "";
1423
+ }
1424
+ );
1425
+ const b = R(() => t.type === "password" ? B.value ? "text" : "password" : t.type), V = R(() => {
1426
+ const h = String(r.value ?? "");
1427
+ return t.formatter && !x.value ? t.formatter(h) : h;
1428
+ }), A = R(() => {
1429
+ const h = r.value;
1430
+ return h !== "" && h !== null && h !== void 0;
1431
+ }), M = R(() => String(r.value ?? "").length), i = R(() => !t.clearable || !A.value || t.disabled || t.readonly ? !1 : (k.value === "mobile", !0)), pe = zt(), he = R(() => !!(t.suffixIcon || t.showPassword && t.type === "password" || i.value && t.type !== "textarea" || pe.suffix)), ye = R(() => {
1432
+ if (t.type !== "textarea") return {};
1433
+ const h = {};
1434
+ return t.autosize ? h.resize = "none" : t.resize !== void 0 ? h.resize = t.resize : h.resize = "vertical", h;
1435
+ });
1436
+ function O(h) {
1437
+ let n = h.target.value;
1438
+ t.parser && !x.value && (n = t.parser(n));
1439
+ const l = n === "" ? void 0 : n;
1440
+ r.value = l, v("update:modelValue", l), v("input", l), t.type === "textarea" && t.autosize && Fe(() => {
1441
+ we();
1442
+ });
1443
+ }
1444
+ function H(h) {
1445
+ p.value = !0, v("focus", h);
1446
+ }
1447
+ function U(h) {
1448
+ p.value = !1;
1449
+ const Z = r.value, n = Z === "" ? void 0 : Z;
1450
+ v("blur", h), v("change", n);
1451
+ }
1452
+ function z() {
1453
+ r.value = void 0, v("update:modelValue", void 0), v("input", void 0), v("change", void 0), v("clear"), Fe(() => {
1454
+ var h;
1455
+ (h = d.value) == null || h.focus();
1456
+ });
1457
+ }
1458
+ function j() {
1459
+ B.value = !B.value;
1460
+ }
1461
+ function C(h) {
1462
+ if (v("keydown", h), h.key === "Enter" && t.type !== "textarea") {
1463
+ const Z = r.value;
1464
+ v("change", Z === "" ? void 0 : Z);
1465
+ }
1466
+ }
1467
+ function T(h) {
1468
+ v("mouseenter", h);
1469
+ }
1470
+ function I(h) {
1471
+ v("mouseleave", h);
1472
+ }
1473
+ function Y(h) {
1474
+ x.value = !0, v("compositionstart", h);
1475
+ }
1476
+ function ge(h) {
1477
+ v("compositionupdate", h);
1478
+ }
1479
+ function ke(h) {
1480
+ x.value = !1, v("compositionend", h), h.target && O(h);
1481
+ }
1482
+ function be() {
1483
+ var h;
1484
+ t.disabled || t.readonly || (h = d.value) == null || h.focus();
1485
+ }
1486
+ function we() {
1487
+ if (t.type !== "textarea" || !d.value) return;
1488
+ const h = d.value;
1489
+ if (t.autosize) {
1490
+ h.style.height = "auto";
1491
+ const Z = h.scrollHeight;
1492
+ if (typeof t.autosize == "object") {
1493
+ const { minRows: n = 2, maxRows: l } = t.autosize, c = parseInt(getComputedStyle(h).lineHeight) || 20, _ = n * c, W = l ? l * c : 1 / 0;
1494
+ h.style.height = `${Math.min(Math.max(Z, _), W)}px`;
1495
+ } else
1496
+ h.style.height = `${Z}px`;
1497
+ }
1498
+ }
1499
+ function w() {
1500
+ var h;
1501
+ (h = d.value) == null || h.focus();
1502
+ }
1503
+ function $() {
1504
+ var h;
1505
+ (h = d.value) == null || h.blur();
1506
+ }
1507
+ function L() {
1508
+ d.value && "select" in d.value && d.value.select();
1509
+ }
1510
+ function te() {
1511
+ z();
1512
+ }
1513
+ return at(() => {
1514
+ t.type === "textarea" && t.autosize && we();
1515
+ }), s({
1516
+ focus: w,
1517
+ blur: $,
1518
+ select: L,
1519
+ clear: te,
1520
+ resizeTextarea: we,
1521
+ inputRef: d
1522
+ }), (h, Z) => (u(), f("div", {
1523
+ class: G(["rc-input", [
1524
+ `rc-input--${e.size}`,
1525
+ {
1526
+ "is-disabled": e.disabled,
1527
+ "is-focused": p.value,
1528
+ "is-readonly": e.readonly,
1529
+ "rc-input--textarea": e.type === "textarea",
1530
+ "has-prepend": h.$slots.prepend,
1531
+ "has-append": h.$slots.append
1532
+ }
1533
+ ]]),
1534
+ onClick: be
1535
+ }, [
1536
+ h.$slots.prepend ? (u(), f("div", Qn, [
1537
+ q(h.$slots, "prepend", {}, void 0, !0)
1538
+ ])) : D("", !0),
1539
+ S("div", {
1540
+ class: G(["rc-input__wrapper", {
1541
+ "has-clear": i.value && e.type !== "textarea",
1542
+ "has-clear-textarea": i.value && e.type === "textarea",
1543
+ "has-clear-mobile": i.value && k.value === "mobile" && e.type !== "textarea",
1544
+ "has-clear-textarea-mobile": i.value && k.value === "mobile" && e.type === "textarea"
1545
+ }])
1546
+ }, [
1547
+ e.prefixIcon || h.$slots.prefix ? (u(), f("div", Xn, [
1548
+ q(h.$slots, "prefix", {}, () => [
1549
+ e.prefixIcon ? (u(), ne(J(X), {
1550
+ key: 0,
1551
+ name: e.prefixIcon,
1552
+ class: "rc-input__prefix-icon"
1553
+ }, null, 8, ["name"])) : D("", !0)
1554
+ ], !0)
1555
+ ])) : D("", !0),
1556
+ e.type === "textarea" ? (u(), f("div", Zn, [
1557
+ (u(), ne(vt("textarea"), {
1558
+ ref_key: "inputRef",
1559
+ ref: d,
1560
+ value: V.value,
1561
+ class: "rc-input__field rc-input__field--textarea",
1562
+ placeholder: e.placeholder,
1563
+ disabled: e.disabled,
1564
+ readonly: e.readonly,
1565
+ maxlength: e.maxlength,
1566
+ minlength: e.minlength,
1567
+ rows: e.rows,
1568
+ autocomplete: e.autocomplete,
1569
+ name: e.name,
1570
+ autofocus: e.autofocus,
1571
+ form: e.form,
1572
+ tabindex: e.tabindex,
1573
+ style: le(ye.value),
1574
+ onInput: O,
1575
+ onFocus: H,
1576
+ onBlur: U,
1577
+ onKeydown: C,
1578
+ onMouseenter: T,
1579
+ onMouseleave: I,
1580
+ onCompositionstart: Y,
1581
+ onCompositionupdate: ge,
1582
+ onCompositionend: ke
1583
+ }, null, 40, ["value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "rows", "autocomplete", "name", "autofocus", "form", "tabindex", "style"])),
1584
+ i.value && e.type === "textarea" ? (u(), f("button", {
1585
+ key: 0,
1586
+ type: "button",
1587
+ class: G(["rc-input__clear rc-input__clear--textarea", { "rc-input__clear--mobile": k.value === "mobile" }]),
1588
+ onClick: Ye(z, ["stop"])
1589
+ }, [
1590
+ K(J(X), {
1591
+ name: "icon_close_circle",
1592
+ class: "rc-input__clear-icon"
1593
+ })
1594
+ ], 2)) : D("", !0)
1595
+ ])) : (u(), ne(vt("input"), {
1596
+ key: 2,
1597
+ ref_key: "inputRef",
1598
+ ref: d,
1599
+ value: V.value,
1600
+ type: b.value,
1601
+ class: "rc-input__field",
1602
+ placeholder: e.placeholder,
1603
+ disabled: e.disabled,
1604
+ readonly: e.readonly,
1605
+ maxlength: e.maxlength,
1606
+ minlength: e.minlength,
1607
+ autocomplete: e.autocomplete,
1608
+ name: e.name,
1609
+ autofocus: e.autofocus,
1610
+ form: e.form,
1611
+ tabindex: e.tabindex,
1612
+ onInput: O,
1613
+ onFocus: H,
1614
+ onBlur: U,
1615
+ onKeydown: C,
1616
+ onMouseenter: T,
1617
+ onMouseleave: I,
1618
+ onCompositionstart: Y,
1619
+ onCompositionupdate: ge,
1620
+ onCompositionend: ke
1621
+ }, null, 40, ["value", "type", "placeholder", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "tabindex"])),
1622
+ he.value ? (u(), f("div", ea, [
1623
+ h.$slots.suffix ? (u(), f("div", ta, [
1624
+ q(h.$slots, "suffix", {}, void 0, !0)
1625
+ ])) : D("", !0),
1626
+ e.showPassword && e.type === "password" && A.value ? (u(), f("button", {
1627
+ key: 1,
1628
+ type: "button",
1629
+ class: "rc-input__password-toggle",
1630
+ onClick: Ye(j, ["stop"])
1631
+ }, [
1632
+ K(J(X), {
1633
+ color: B.value ? "#1677ff" : "#999",
1634
+ name: B.value ? "icon_view" : "icon_view-off"
1635
+ }, null, 8, ["color", "name"])
1636
+ ])) : D("", !0),
1637
+ i.value && e.type !== "textarea" ? (u(), f("button", {
1638
+ key: 2,
1639
+ type: "button",
1640
+ class: G(["rc-input__clear", { "rc-input__clear--mobile": k.value === "mobile" }]),
1641
+ onClick: Ye(z, ["stop"])
1642
+ }, [
1643
+ K(J(X), {
1644
+ name: "icon_close_circle",
1645
+ class: "rc-input__clear-icon"
1646
+ })
1647
+ ], 2)) : D("", !0),
1648
+ e.suffixIcon && !e.clearable && !e.showPassword ? (u(), ne(J(X), {
1649
+ key: 3,
1650
+ name: e.suffixIcon,
1651
+ class: "rc-input__suffix-icon"
1652
+ }, null, 8, ["name"])) : D("", !0)
1653
+ ])) : D("", !0),
1654
+ e.showWordLimit && e.maxlength ? (u(), f("span", na, P(M.value) + " / " + P(e.maxlength), 1)) : D("", !0)
1655
+ ], 2),
1656
+ h.$slots.append ? (u(), f("div", aa, [
1657
+ q(h.$slots, "append", {}, void 0, !0)
1658
+ ])) : D("", !0)
1659
+ ], 2));
1660
+ }
1661
+ }), tt = /* @__PURE__ */ ue(la, [["__scopeId", "data-v-050956ab"]]);
1662
+ tt.name = "rc-input";
1663
+ function xt(e) {
1664
+ return e.component(tt.name, tt), e;
1665
+ }
1666
+ const oa = { class: "rc-search-area" }, ra = { class: "rc-search-area__bar" }, sa = ["onClick"], ua = { class: "rc-search-area__item-label" }, ia = { class: "rc-search-area__panel-content" }, ca = {
1368
1667
  key: 1,
1369
1668
  class: "rc-search-area__input-wrapper"
1370
- }, aa = ["placeholder"], la = {
1669
+ }, da = {
1371
1670
  key: 2,
1372
1671
  class: "rc-search-area__calendar-wrapper"
1373
- }, oa = {
1672
+ }, fa = {
1374
1673
  key: 3,
1375
1674
  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 = {
1675
+ }, va = { class: "rc-search-area__tree-group-title" }, ma = { class: "rc-search-area__tree-group-options" }, pa = ["onClick"], ha = { class: "rc-search-area__option-label" }, ya = {
1377
1676
  key: 4,
1378
1677
  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 = {
1678
+ }, ga = { class: "rc-search-area__tree-group-title" }, ka = { class: "rc-search-area__tree-group-options" }, ba = ["onClick"], _a = { class: "rc-search-area__option-label" }, wa = {
1380
1679
  key: 5,
1381
1680
  class: "rc-search-area__options-grid"
1382
- }, ya = ["onClick"], ha = { class: "rc-search-area__option-label" }, ga = {
1681
+ }, $a = ["onClick"], xa = { class: "rc-search-area__option-label" }, Da = {
1383
1682
  key: 6,
1384
1683
  class: "rc-search-area__options-grid"
1385
- }, ka = ["onClick"], ba = { class: "rc-search-area__option-label" }, _a = {
1684
+ }, Ca = ["onClick"], Sa = { class: "rc-search-area__option-label" }, Ma = {
1386
1685
  key: 7,
1387
1686
  class: "rc-search-area__empty"
1388
- }, wa = {
1687
+ }, Ia = {
1389
1688
  key: 0,
1390
1689
  class: "rc-search-area__panel-footer"
1391
- }, $a = /* @__PURE__ */ re({
1690
+ }, Ra = /* @__PURE__ */ se({
1392
1691
  name: "rc-search-area",
1393
1692
  __name: "index",
1394
1693
  props: {
@@ -1398,13 +1697,13 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1398
1697
  autoConfirm: { type: Boolean, default: !1 }
1399
1698
  },
1400
1699
  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 () => {
1700
+ setup(e, { expose: s, emit: m }) {
1701
+ const t = e, y = m, k = E(null), v = E(null), d = E(null), r = E({ top: "0px" }), p = async () => {
1403
1702
  if (k.value === null || !v.value)
1404
1703
  return;
1405
- await Be();
1704
+ await Fe();
1406
1705
  const l = v.value.getBoundingClientRect().top;
1407
- o.value = { top: `${l}px` };
1706
+ r.value = { top: `${l}px` };
1408
1707
  }, B = (n) => {
1409
1708
  if (k.value === null || !v.value)
1410
1709
  return;
@@ -1413,27 +1712,27 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1413
1712
  return;
1414
1713
  const c = v.value.closest(".rc-search-area");
1415
1714
  if (c) {
1416
- const $ = c.querySelector(".rc-search-area__bar");
1417
- if ($ && $.contains(l))
1715
+ const _ = c.querySelector(".rc-search-area__bar");
1716
+ if (_ && _.contains(l))
1418
1717
  return;
1419
1718
  }
1420
- H();
1719
+ O();
1421
1720
  };
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));
1424
- }), at(() => {
1721
+ Ie(k, async (n) => {
1722
+ n !== null ? (await Fe(), 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));
1723
+ }), lt(() => {
1425
1724
  window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), document.removeEventListener("click", B, !0);
1426
1725
  });
1427
- const x = E({}), _ = E(""), V = E(null), A = E({}), I = E({ ...t.modelValue });
1428
- Se(() => t.modelValue, (n) => {
1429
- I.value = { ...n || {} };
1726
+ const x = E({}), b = E(""), V = E(null), A = E({}), M = E({ ...t.modelValue });
1727
+ Ie(() => t.modelValue, (n) => {
1728
+ M.value = { ...n || {} };
1430
1729
  }, { 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);
1730
+ const i = R(() => k.value === null ? null : t.items[k.value]), pe = R(() => {
1731
+ if (!i.value) return "";
1732
+ const n = Z(i.value);
1434
1733
  return n > 0 ? `(${n}项)` : "";
1435
- }), ye = (n) => {
1436
- const l = I.value[n.key];
1734
+ }), he = (n) => {
1735
+ const l = M.value[n.key];
1437
1736
  if (l == null || l === "" || n.slot)
1438
1737
  return n.label;
1439
1738
  if (n.type === "input") {
@@ -1447,33 +1746,33 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1447
1746
  return `${n.label}: ${l}`;
1448
1747
  }
1449
1748
  } else if (n.type === "single" || n.type === "tree-single") {
1450
- const c = U(n, l);
1749
+ const c = j(n, l);
1451
1750
  if (c)
1452
- return `${n.label}: ${F(c, n)}`;
1751
+ return `${n.label}: ${z(c, n)}`;
1453
1752
  } else {
1454
1753
  const c = Array.isArray(l) ? l : [l];
1455
1754
  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("、")}`;
1755
+ const _ = c.map((W) => {
1756
+ const N = j(n, W);
1757
+ return N ? z(N, n) : null;
1758
+ }).filter((W) => W !== null);
1759
+ if (_.length > 0)
1760
+ return `${n.label}: ${_.join("、")}`;
1462
1761
  }
1463
1762
  }
1464
1763
  return n.label;
1465
- }, he = (n) => {
1764
+ }, ye = (n) => {
1466
1765
  const l = t.items[n];
1467
1766
  if (!l) return;
1468
1767
  if (k.value === n) {
1469
1768
  k.value = null;
1470
1769
  return;
1471
1770
  }
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 = () => {
1771
+ const c = M.value[l.key];
1772
+ 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" ? b.value = c != null && c !== "" ? String(c) : void 0 : 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;
1773
+ }, O = () => {
1475
1774
  k.value = null;
1476
- }, N = (n, l) => {
1775
+ }, H = (n, l) => {
1477
1776
  if (!l)
1478
1777
  return typeof n == "string" ? n : n.label || String(n.value);
1479
1778
  const c = n;
@@ -1481,293 +1780,303 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1481
1780
  if (typeof l.renderItem == "string")
1482
1781
  return String(typeof c == "object" && c !== null ? c[l.renderItem] ?? "" : c);
1483
1782
  {
1484
- const $ = l.renderItem(c);
1485
- return $ != null ? String($) : "";
1783
+ const _ = l.renderItem(c);
1784
+ return _ != null ? String(_) : "";
1486
1785
  }
1487
1786
  }
1488
1787
  return typeof n == "string" ? n : n.label || String(n.value);
1489
- }, O = (n, l) => {
1788
+ }, U = (n, l) => {
1490
1789
  if (!l)
1491
1790
  return typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
1492
1791
  const c = n;
1493
1792
  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);
1793
+ }, z = (n, l) => {
1794
+ const c = n, _ = l.renderResult || l.renderItem;
1795
+ if (_) {
1796
+ if (typeof _ == "string")
1797
+ return String(typeof c == "object" && c !== null ? c[_] ?? "" : c);
1499
1798
  {
1500
- const J = $(c);
1501
- return J != null ? String(J) : "";
1799
+ const W = _(c);
1800
+ return W != null ? String(W) : "";
1502
1801
  }
1503
1802
  }
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;
1803
+ return H(n, l);
1804
+ }, j = (n, l, c) => {
1805
+ const _ = c || n.options;
1806
+ if (!_) return null;
1807
+ const W = n.childrenKey || "children";
1808
+ for (const N of _) {
1809
+ const ee = U(N, n);
1810
+ if (ee === l || String(ee) === String(l))
1811
+ return N;
1812
+ if (typeof N == "object" && N !== null) {
1813
+ const re = N[W];
1814
+ if (Array.isArray(re) && re.length > 0) {
1815
+ const me = j(n, l, re);
1816
+ if (me) return me;
1518
1817
  }
1519
1818
  }
1520
1819
  }
1521
1820
  return null;
1522
- }, S = (n, l) => {
1821
+ }, C = (n, l) => {
1523
1822
  const c = l || n.options;
1524
1823
  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));
1824
+ const _ = n.childrenKey || "children", W = [];
1825
+ for (const N of c)
1826
+ if (W.push(N), typeof N == "object" && N !== null) {
1827
+ const ee = N[_];
1828
+ Array.isArray(ee) && ee.length > 0 && W.push(...C(n, ee));
1530
1829
  }
1531
- return J;
1830
+ return W;
1532
1831
  }, 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;
1543
- });
1544
- }, me = (n, l) => {
1545
- if (!l || typeof n == "string") return [];
1546
- const c = l.childrenKey || "children", $ = n[c];
1547
- return Array.isArray($) ? $ : [];
1832
+ if (!i.value) return !1;
1833
+ const l = i.value.key, c = x.value[l], _ = U(n, i.value);
1834
+ return i.value.type === "single" || i.value.type === "tree-single" ? c != null && c === _ : (Array.isArray(c) ? c : []).some((N) => N === _ || String(N) === String(_));
1835
+ }, I = (n) => n ? n.childrenKey ? C(n) : n.options || [] : [], Y = (n) => {
1836
+ if (!n || !n.options || n.options.length === 0) return [];
1837
+ const l = n.childrenKey || "children", c = [], _ = /* @__PURE__ */ new Map(), W = (N, ee = []) => {
1838
+ for (const re of N)
1839
+ if (typeof re == "string") {
1840
+ const me = ee.length > 0 ? ee.join("-") : "";
1841
+ _.has(me) || _.set(me, []), _.get(me).push(re);
1842
+ } else {
1843
+ const me = H(re, n), $e = re[l];
1844
+ if (Array.isArray($e) && $e.length > 0) {
1845
+ const xe = [...ee, me];
1846
+ W($e, xe);
1847
+ } else {
1848
+ const xe = ee.length > 0 ? ee.join("-") : "";
1849
+ _.has(xe) || _.set(xe, []), _.get(xe).push(re);
1850
+ }
1851
+ }
1852
+ };
1853
+ W(n.options);
1854
+ for (const [N, ee] of _.entries())
1855
+ c.push({
1856
+ title: N || "全部",
1857
+ children: ee
1858
+ });
1859
+ return c;
1548
1860
  }, ge = (n) => {
1549
1861
  if (n)
1550
- return A.value[n.key] !== void 0 ? A.value[n.key] : I.value[n.key];
1551
- }, we = (n, l) => {
1862
+ return A.value[n.key] !== void 0 ? A.value[n.key] : M.value[n.key];
1863
+ }, ke = (n, l) => {
1552
1864
  if (n && (A.value[n.key] = l, t.autoConfirm)) {
1553
1865
  const c = n.key;
1554
- I.value[c] = l, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, n), H();
1866
+ M.value[c] = l, y("update:modelValue", { ...M.value }), y("change", { ...M.value }, n), O();
1555
1867
  }
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)
1868
+ }, be = (n) => {
1869
+ if (!i.value) return;
1870
+ const l = i.value.key, c = U(n, i.value);
1871
+ M.value[l];
1872
+ let _;
1873
+ x.value[l] === c ? _ = void 0 : _ = c, M.value[l] = _, y("update:modelValue", { ...M.value }), y("change", { ...M.value }, i.value), O();
1874
+ }, we = (n) => {
1875
+ if (!i.value) return;
1876
+ const l = i.value.key, c = U(n, i.value), _ = Array.isArray(x.value[l]) ? [...x.value[l]] : [], W = _.findIndex(
1877
+ (N) => N === c || String(N) === String(c)
1566
1878
  );
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();
1879
+ if (W >= 0 ? _.splice(W, 1) : _.push(c), x.value[l] = _, t.autoConfirm) {
1880
+ const N = _.length > 0 ? _ : void 0;
1881
+ M.value[l] = N, y("update:modelValue", { ...M.value }), y("change", { ...M.value }, i.value), O();
1570
1882
  }
1571
1883
  }, 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();
1884
+ if (!i.value) return;
1885
+ const n = i.value.key;
1886
+ i.value.slot ? A.value[n] = void 0 : i.value.type === "input" ? b.value = void 0 : i.value.type === "calendar" ? V.value = null : i.value.type === "single" || i.value.type === "tree-single" ? x.value[n] = null : x.value[n] = [];
1887
+ }, $ = (n) => {
1888
+ if (t.autoConfirm && i.value) {
1889
+ const l = i.value.key, c = n != null ? String(n) : "", _ = c.trim() ? c.trim() : void 0;
1890
+ M.value[l] = _, y("update:modelValue", { ...M.value }), y("change", { ...M.value }, i.value), O();
1579
1891
  }
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();
1892
+ }, L = (n) => {
1893
+ if (V.value = n, t.autoConfirm && i.value) {
1894
+ const l = i.value.key, c = n ?? void 0;
1895
+ M.value[l] = c, y("update:modelValue", { ...M.value }), y("change", { ...M.value }, i.value), O();
1584
1896
  }
1585
- }, h = () => {
1586
- if (!u.value) return;
1587
- const n = u.value.key;
1588
- I.value[n];
1897
+ }, te = () => {
1898
+ if (!i.value) return;
1899
+ const n = i.value.key;
1900
+ M.value[n];
1589
1901
  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") {
1902
+ if (i.value.slot)
1903
+ l = A.value[n], M.value[n] = l;
1904
+ else if (i.value.type === "input")
1905
+ l = b.value && b.value.trim() ? b.value.trim() : void 0, M.value[n] = l;
1906
+ else if (i.value.type === "calendar")
1907
+ l = V.value !== null && V.value !== void 0 ? V.value : void 0, M.value[n] = l;
1908
+ else if (i.value.type === "single" || i.value.type === "tree-single") {
1597
1909
  const c = x.value[n];
1598
- l = c ?? void 0, I.value[n] = l;
1910
+ l = c ?? void 0, M.value[n] = l;
1599
1911
  } else {
1600
1912
  const c = x.value[n];
1601
- l = Array.isArray(c) && c.length > 0 ? c : void 0, I.value[n] = l;
1913
+ l = Array.isArray(c) && c.length > 0 ? c : void 0, M.value[n] = l;
1602
1914
  }
1603
- g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1604
- }, X = (n) => {
1605
- const l = I.value[n.key];
1915
+ y("update:modelValue", { ...M.value }), y("change", { ...M.value }, i.value), O();
1916
+ }, h = (n) => {
1917
+ const l = M.value[n.key];
1606
1918
  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) => {
1919
+ }, Z = (n) => {
1608
1920
  if (n.slot) {
1609
1921
  const c = A.value[n.key];
1610
1922
  return c != null && c !== "" ? 1 : 0;
1611
1923
  } else {
1612
1924
  if (n.type === "input")
1613
- return _.value.trim() ? 1 : 0;
1925
+ return b.value && b.value.trim() ? 1 : 0;
1614
1926
  if (n.type === "calendar")
1615
1927
  return V.value !== null && V.value !== void 0 ? 1 : 0;
1616
1928
  }
1617
1929
  const l = x.value[n.key];
1618
1930
  return l == null || l === "" ? 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : 0;
1619
1931
  };
1620
- return r({
1932
+ return s({
1621
1933
  /** 获取当前筛选值 */
1622
- getValues: () => ({ ...I.value }),
1934
+ getValues: () => ({ ...M.value }),
1623
1935
  /** 重置所有筛选 */
1624
1936
  reset: () => {
1625
- I.value = {}, x.value = {}, A.value = {}, g("update:modelValue", {});
1937
+ M.value = {}, x.value = {}, A.value = {}, y("update:modelValue", {});
1626
1938
  }
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
1939
+ }), (n, l) => (u(), f("div", oa, [
1940
+ S("div", ra, [
1941
+ (u(!0), f(oe, null, ve(t.items, (c, _) => (u(), f("div", {
1942
+ key: _,
1943
+ class: G(["rc-search-area__item", {
1944
+ "is-active": k.value === _,
1945
+ "has-value": h(c) > 0
1634
1946
  }]),
1635
- onClick: (J) => he($)
1947
+ onClick: (W) => ye(_)
1636
1948
  }, [
1637
- C("span", ea, P(ye(c)), 1),
1638
- G(Q(Z), {
1949
+ S("span", ua, P(he(c)), 1),
1950
+ K(J(X), {
1639
1951
  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 === $ }])
1952
+ color: k.value !== _ && h(c) > 0 ? "#1677ff" : "#969799",
1953
+ class: G(["rc-search-area__item-arrow", { "is-up": k.value === _ }])
1642
1954
  }, null, 8, ["color", "class"])
1643
- ], 10, Zn))), 128))
1955
+ ], 10, sa))), 128))
1644
1956
  ]),
1645
- G(Ee, { name: "rc-search-area-fade" }, {
1957
+ K(Be, { name: "rc-search-area-fade" }, {
1646
1958
  default: ae(() => [
1647
- k.value !== null && t.showMask ? (s(), f("div", {
1959
+ k.value !== null && t.showMask ? (u(), f("div", {
1648
1960
  key: 0,
1649
1961
  ref_key: "maskRef",
1650
1962
  ref: d,
1651
1963
  class: "rc-search-area__mask",
1652
- style: le(o.value),
1653
- onClick: H
1964
+ style: le(r.value),
1965
+ onClick: O
1654
1966
  }, null, 4)) : D("", !0)
1655
1967
  ]),
1656
1968
  _: 1
1657
1969
  }),
1658
- G(Ee, { name: "rc-search-area-slide" }, {
1970
+ K(Be, { name: "rc-search-area-slide" }, {
1659
1971
  default: ae(() => {
1660
- var c, $, J, K, pe, Ie, De, Le, Oe, Ue, Pe, Ke, je, Ge, qe, Je, Qe, a, i;
1972
+ var c, _, W, N, ee, re, me, $e, Ae, xe, Ue, Pe, je, Ke, Ge, qe, Je, Qe, a;
1661
1973
  return [
1662
- k.value !== null ? (s(), f("div", {
1974
+ k.value !== null ? (u(), f("div", {
1663
1975
  key: 0,
1664
1976
  ref_key: "panelRef",
1665
1977
  ref: v,
1666
1978
  class: "rc-search-area__panel"
1667
1979
  }, [
1668
- C("div", ta, [
1669
- (c = u.value) != null && c.slot && n.$slots[u.value.key] ? q(n.$slots, u.value.key, {
1980
+ S("div", ia, [
1981
+ (c = i.value) != null && c.slot && n.$slots[i.value.key] ? q(n.$slots, i.value.key, {
1670
1982
  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),
1676
- type: "text",
1677
- class: "rc-search-area__input",
1678
- placeholder: u.value.placeholder || "请输入",
1679
- onInput: L
1680
- }, null, 40, aa), [
1681
- [Rt, _.value]
1682
- ])
1683
- ])) : ((J = u.value) == null ? void 0 : J.type) === "calendar" ? (s(), f("div", la, [
1684
- G(Q(He), {
1983
+ value: ge(i.value),
1984
+ "update:value": (o) => ke(i.value, o)
1985
+ }, void 0, !0) : ((_ = i.value) == null ? void 0 : _.type) === "input" ? (u(), f("div", ca, [
1986
+ K(J(tt), {
1987
+ modelValue: b.value,
1988
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => b.value = o),
1989
+ placeholder: i.value.placeholder || "请输入",
1990
+ onChange: $
1991
+ }, null, 8, ["modelValue", "placeholder"])
1992
+ ])) : ((W = i.value) == null ? void 0 : W.type) === "calendar" ? (u(), f("div", da, [
1993
+ K(J(Oe), {
1685
1994
  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,
1995
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => V.value = o),
1996
+ range: ((N = i.value.calendarConfig) == null ? void 0 : N.range) || !1,
1688
1997
  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
1998
+ "min-date": (ee = i.value.calendarConfig) == null ? void 0 : ee.minDate,
1999
+ "max-date": (re = i.value.calendarConfig) == null ? void 0 : re.maxDate,
2000
+ "disabled-date": (me = i.value.calendarConfig) == null ? void 0 : me.disabledDate,
2001
+ formatter: ($e = i.value.calendarConfig) == null ? void 0 : $e.formatter,
2002
+ "end-date-offset": ((Ae = i.value.calendarConfig) == null ? void 0 : Ae.endDateOffset) || !1,
2003
+ onChange: L
1695
2004
  }, 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,
2005
+ ])) : ((xe = i.value) == null ? void 0 : xe.type) === "tree-single" ? (u(), f("div", fa, [
2006
+ (u(!0), f(oe, null, ve(Y(i.value), (o, g) => (u(), f("div", {
2007
+ key: g,
1699
2008
  class: "rc-search-area__tree-group"
1700
2009
  }, [
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)
2010
+ S("div", va, P(o.title), 1),
2011
+ S("div", ma, [
2012
+ (u(!0), f(oe, null, ve(o.children, (F, Q) => (u(), f("div", {
2013
+ key: Q,
2014
+ class: G(["rc-search-area__option", { "is-selected": T(F) }]),
2015
+ onClick: (Ce) => be(F)
1707
2016
  }, [
1708
- C("span", ia, P(N(W, u.value || void 0)), 1),
1709
- T(W) ? (s(), te(Q(Z), {
2017
+ S("span", ha, P(H(F, i.value || void 0)), 1),
2018
+ T(F) ? (u(), ne(J(X), {
1710
2019
  key: 0,
1711
2020
  name: "icon_check",
1712
2021
  class: "rc-search-area__option-check"
1713
2022
  })) : D("", !0)
1714
- ], 10, ua))), 128))
2023
+ ], 10, pa))), 128))
1715
2024
  ])
1716
2025
  ]))), 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,
2026
+ ])) : ((Ue = i.value) == null ? void 0 : Ue.type) === "tree-multiple" ? (u(), f("div", ya, [
2027
+ (u(!0), f(oe, null, ve(Y(i.value), (o, g) => (u(), f("div", {
2028
+ key: g,
1720
2029
  class: "rc-search-area__tree-group"
1721
2030
  }, [
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)
2031
+ S("div", ga, P(o.title), 1),
2032
+ S("div", ka, [
2033
+ (u(!0), f(oe, null, ve(o.children, (F, Q) => (u(), f("div", {
2034
+ key: Q,
2035
+ class: G(["rc-search-area__option", { "is-selected": T(F) }]),
2036
+ onClick: (Ce) => we(F)
1728
2037
  }, [
1729
- C("span", ma, P(N(W, u.value || void 0)), 1),
1730
- T(W) ? (s(), te(Q(Z), {
2038
+ S("span", _a, P(H(F, i.value || void 0)), 1),
2039
+ T(F) ? (u(), ne(J(X), {
1731
2040
  key: 0,
1732
2041
  name: "icon_check",
1733
2042
  class: "rc-search-area__option-check"
1734
2043
  })) : D("", !0)
1735
- ], 10, va))), 128))
2044
+ ], 10, ba))), 128))
1736
2045
  ])
1737
2046
  ]))), 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)
2047
+ ])) : ((Pe = i.value) == null ? void 0 : Pe.type) === "single" ? (u(), f("div", wa, [
2048
+ (u(!0), f(oe, null, ve(I(i.value), (o, g) => (u(), f("div", {
2049
+ key: g,
2050
+ class: G(["rc-search-area__option", { "is-selected": T(o) }]),
2051
+ onClick: (F) => be(o)
1743
2052
  }, [
1744
- C("span", ha, P(N(y, u.value || void 0)), 1),
1745
- T(y) ? (s(), te(Q(Z), {
2053
+ S("span", xa, P(H(o, i.value || void 0)), 1),
2054
+ T(o) ? (u(), ne(J(X), {
1746
2055
  key: 0,
1747
2056
  name: "icon_check",
1748
2057
  class: "rc-search-area__option-check"
1749
2058
  })) : 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)
2059
+ ], 10, $a))), 128))
2060
+ ])) : (u(), f("div", Da, [
2061
+ (u(!0), f(oe, null, ve(I(i.value), (o, g) => (u(), f("div", {
2062
+ key: g,
2063
+ class: G(["rc-search-area__option", { "is-selected": T(o) }]),
2064
+ onClick: (F) => we(o)
1756
2065
  }, [
1757
- C("span", ba, P(N(y, u.value || void 0)), 1),
1758
- T(y) ? (s(), te(Q(Z), {
2066
+ S("span", Sa, P(H(o, i.value || void 0)), 1),
2067
+ T(o) ? (u(), ne(J(X), {
1759
2068
  key: 0,
1760
2069
  name: "icon_check",
1761
2070
  class: "rc-search-area__option-check"
1762
2071
  })) : D("", !0)
1763
- ], 10, ka))), 128))
2072
+ ], 10, Ca))), 128))
1764
2073
  ])),
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)
2074
+ ((je = i.value) == null ? void 0 : je.type) !== "input" && ((Ke = i.value) == null ? void 0 : Ke.type) !== "calendar" && !((Ge = i.value) != null && Ge.slot) && ((Je = (qe = i.value) == null ? void 0 : qe.options) == null ? void 0 : Je.length) === 0 ? (u(), f("div", Ma, [...l[2] || (l[2] = [
2075
+ S("p", null, "暂无选项", -1)
1767
2076
  ])])) : D("", !0)
1768
2077
  ]),
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), {
2078
+ !t.autoConfirm && ((Qe = i.value) == null ? void 0 : Qe.type) !== "single" && ((a = i.value) == null ? void 0 : a.type) !== "tree-single" ? (u(), f("div", Ia, [
2079
+ K(J(De), {
1771
2080
  block: "",
1772
2081
  onClick: w
1773
2082
  }, {
@@ -1776,13 +2085,13 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1776
2085
  ])]),
1777
2086
  _: 1
1778
2087
  }),
1779
- G(Q(xe), {
2088
+ K(J(De), {
1780
2089
  type: "primary",
1781
2090
  block: "",
1782
- onClick: h
2091
+ onClick: te
1783
2092
  }, {
1784
2093
  default: ae(() => [
1785
- _e(" 确定" + P(ve.value), 1)
2094
+ _e(" 确定" + P(pe.value), 1)
1786
2095
  ]),
1787
2096
  _: 1
1788
2097
  })
@@ -1794,308 +2103,9 @@ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Z
1794
2103
  })
1795
2104
  ]));
1796
2105
  }
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,
1801
- class: "rc-input__prepend"
1802
- }, Da = {
1803
- key: 0,
1804
- class: "rc-input__prefix"
1805
- }, Ca = {
1806
- key: 1,
1807
- class: "rc-input__textarea-wrapper"
1808
- }, Sa = {
1809
- key: 3,
1810
- class: "rc-input__suffix"
1811
- }, Ia = {
1812
- key: 0,
1813
- class: "rc-input__suffix-inner"
1814
- }, Ma = {
1815
- key: 4,
1816
- class: "rc-input__count"
1817
- }, Ra = {
1818
- key: 1,
1819
- class: "rc-input__append"
1820
- }, Va = /* @__PURE__ */ re({
1821
- __name: "index",
1822
- props: {
1823
- modelValue: { default: "" },
1824
- type: { default: "text" },
1825
- size: { default: "default" },
1826
- placeholder: { default: "请输入" },
1827
- disabled: { type: Boolean, default: !1 },
1828
- clearable: { type: Boolean, default: !0 },
1829
- showPassword: { type: Boolean, default: !1 },
1830
- readonly: { type: Boolean, default: !1 },
1831
- maxlength: { default: void 0 },
1832
- minlength: { default: void 0 },
1833
- showWordLimit: { type: Boolean, default: !1 },
1834
- rows: { default: 2 },
1835
- autosize: { type: [Boolean, Object], default: !1 },
1836
- resize: { default: void 0 },
1837
- prefixIcon: { default: "" },
1838
- suffixIcon: { default: "" },
1839
- autocomplete: { default: "off" },
1840
- name: { default: void 0 },
1841
- autofocus: { type: Boolean, default: !1 },
1842
- form: { default: void 0 },
1843
- tabindex: { default: void 0 },
1844
- formatter: { type: Function, default: void 0 },
1845
- parser: { type: Function, default: void 0 },
1846
- deviceType: { default: void 0 }
1847
- },
1848
- 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,
1853
- (h) => {
1854
- o.value = h ?? "";
1855
- }
1856
- );
1857
- const _ = R(() => t.type === "password" ? B.value ? "text" : "password" : t.type), V = R(() => {
1858
- const h = String(o.value ?? "");
1859
- return t.formatter && !x.value ? t.formatter(h) : h;
1860
- }), A = R(() => {
1861
- const h = o.value;
1862
- 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 {};
1865
- const h = {};
1866
- return t.autosize ? h.resize = "none" : t.resize !== void 0 ? h.resize = t.resize : h.resize = "vertical", h;
1867
- });
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();
1874
- });
1875
- }
1876
- function N(h) {
1877
- p.value = !0, v("focus", h);
1878
- }
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);
1883
- }
1884
- function F() {
1885
- o.value = void 0, v("update:modelValue", void 0), v("input", void 0), v("change", void 0), v("clear"), Be(() => {
1886
- var h;
1887
- (h = d.value) == null || h.focus();
1888
- });
1889
- }
1890
- function U() {
1891
- B.value = !B.value;
1892
- }
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);
1897
- }
1898
- }
1899
- function T(h) {
1900
- v("mouseenter", h);
1901
- }
1902
- function M(h) {
1903
- v("mouseleave", h);
1904
- }
1905
- function Y(h) {
1906
- x.value = !0, v("compositionstart", h);
1907
- }
1908
- function me(h) {
1909
- v("compositionupdate", h);
1910
- }
1911
- function ge(h) {
1912
- x.value = !1, v("compositionend", h), h.target && H(h);
1913
- }
1914
- function we() {
1915
- var h;
1916
- t.disabled || t.readonly || (h = d.value) == null || h.focus();
1917
- }
1918
- function $e() {
1919
- if (t.type !== "textarea" || !d.value) return;
1920
- const h = d.value;
1921
- if (t.autosize) {
1922
- 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`;
1927
- } else
1928
- h.style.height = `${X}px`;
1929
- }
1930
- }
1931
- function b() {
1932
- var h;
1933
- (h = d.value) == null || h.focus();
1934
- }
1935
- function w() {
1936
- var h;
1937
- (h = d.value) == null || h.blur();
1938
- }
1939
- function L() {
1940
- d.value && "select" in d.value && d.value.select();
1941
- }
1942
- 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,
1951
- clear: ee,
1952
- resizeTextarea: $e,
1953
- inputRef: d
1954
- }), (h, X) => (s(), f("div", {
1955
- class: j(["rc-input", [
1956
- `rc-input--${e.size}`,
1957
- {
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
1964
- }
1965
- ]]),
1966
- onClick: we
1967
- }, [
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), {
1982
- key: 0,
1983
- name: e.prefixIcon,
1984
- class: "rc-input__prefix-icon"
1985
- }, null, 8, ["name"])) : D("", !0)
1986
- ], !0)
1987
- ])) : D("", !0),
1988
- e.type === "textarea" ? (s(), f("div", Ca, [
1989
- (s(), te(vt("textarea"), {
1990
- ref_key: "inputRef",
1991
- ref: d,
1992
- value: V.value,
1993
- 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
2015
- }, null, 40, ["value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "rows", "autocomplete", "name", "autofocus", "form", "tabindex", "style"])),
2016
- u.value && e.type === "textarea" ? (s(), f("button", {
2017
- key: 0,
2018
- type: "button",
2019
- class: j(["rc-input__clear rc-input__clear--textarea", { "rc-input__clear--mobile": k.value === "mobile" }]),
2020
- onClick: Fe(F, ["stop"])
2021
- }, [
2022
- G(Q(Z), {
2023
- name: "icon_close_circle",
2024
- class: "rc-input__clear-icon"
2025
- })
2026
- ], 2)) : D("", !0)
2027
- ])) : (s(), te(vt("input"), {
2028
- key: 2,
2029
- 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", {
2059
- key: 1,
2060
- type: "button",
2061
- class: "rc-input__password-toggle",
2062
- onClick: Fe(U, ["stop"])
2063
- }, [
2064
- G(Q(Z), {
2065
- color: B.value ? "#1677ff" : "#999",
2066
- name: B.value ? "icon_view" : "icon_view-off"
2067
- }, null, 8, ["color", "name"])
2068
- ])) : D("", !0),
2069
- u.value && e.type !== "textarea" ? (s(), f("button", {
2070
- key: 2,
2071
- type: "button",
2072
- class: j(["rc-input__clear", { "rc-input__clear--mobile": k.value === "mobile" }]),
2073
- onClick: Fe(F, ["stop"])
2074
- }, [
2075
- G(Q(Z), {
2076
- name: "icon_close_circle",
2077
- class: "rc-input__clear-icon"
2078
- })
2079
- ], 2)) : D("", !0),
2080
- e.suffixIcon && !e.clearable && !e.showPassword ? (s(), te(Q(Z), {
2081
- key: 3,
2082
- name: e.suffixIcon,
2083
- 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)
2091
- ], 2));
2092
- }
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;
2097
- }
2098
- const Ta = /* @__PURE__ */ re({
2106
+ }), Dt = /* @__PURE__ */ ue(Ra, [["__scopeId", "data-v-4977b35c"]]), Ct = (e) => {
2107
+ e.component("RcSearchArea", Dt), e.component("rc-search-area", Dt);
2108
+ }, Va = /* @__PURE__ */ se({
2099
2109
  name: "rc-dropdown-menu",
2100
2110
  __name: "menu",
2101
2111
  props: {
@@ -2104,50 +2114,50 @@ const Ta = /* @__PURE__ */ re({
2104
2114
  maxHeight: { default: "" }
2105
2115
  },
2106
2116
  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;
2117
+ setup(e, { expose: s, emit: m }) {
2118
+ const t = e, y = E(), k = R(() => t.visible === void 0 ? !0 : t.visible), v = R(() => t.visible !== void 0), d = R(() => {
2119
+ const r = {};
2120
+ return t.maxHeight && (r.maxHeight = typeof t.maxHeight == "number" ? `${t.maxHeight}px` : t.maxHeight, r.overflowY = "auto"), r;
2111
2121
  });
2112
- return r({
2113
- menuRef: g
2114
- }), (o, p) => v.value ? (s(), te(it, {
2122
+ return s({
2123
+ menuRef: y
2124
+ }), (r, p) => v.value ? (u(), ne(it, {
2115
2125
  key: 0,
2116
2126
  to: "body"
2117
2127
  }, [
2118
- G(Ee, { name: "rc-dropdown-fade" }, {
2128
+ K(Be, { name: "rc-dropdown-fade" }, {
2119
2129
  default: ae(() => [
2120
- k.value ? (s(), f("ul", {
2130
+ k.value ? (u(), f("ul", {
2121
2131
  key: 0,
2122
2132
  ref_key: "menuRef",
2123
- ref: g,
2124
- class: j(["rc-dropdown-menu", [`rc-dropdown-menu--${e.effect}`]]),
2133
+ ref: y,
2134
+ class: G(["rc-dropdown-menu", [`rc-dropdown-menu--${e.effect}`]]),
2125
2135
  style: le(d.value),
2126
- onClick: p[0] || (p[0] = Fe(() => {
2136
+ onClick: p[0] || (p[0] = Ye(() => {
2127
2137
  }, ["stop"])),
2128
- onMouseenter: p[1] || (p[1] = (B) => o.$emit("mouseenter", B)),
2129
- onMouseleave: p[2] || (p[2] = (B) => o.$emit("mouseleave", B))
2138
+ onMouseenter: p[1] || (p[1] = (B) => r.$emit("mouseenter", B)),
2139
+ onMouseleave: p[2] || (p[2] = (B) => r.$emit("mouseleave", B))
2130
2140
  }, [
2131
- q(o.$slots, "default", {}, void 0, !0)
2141
+ q(r.$slots, "default", {}, void 0, !0)
2132
2142
  ], 38)) : D("", !0)
2133
2143
  ]),
2134
2144
  _: 3
2135
2145
  })
2136
- ])) : (s(), f("ul", {
2146
+ ])) : (u(), f("ul", {
2137
2147
  key: 1,
2138
2148
  ref_key: "menuRef",
2139
- ref: g,
2140
- class: j(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${e.effect}`]]),
2149
+ ref: y,
2150
+ class: G(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${e.effect}`]]),
2141
2151
  style: le(d.value),
2142
- onClick: p[3] || (p[3] = Fe(() => {
2152
+ onClick: p[3] || (p[3] = Ye(() => {
2143
2153
  }, ["stop"])),
2144
- onMouseenter: p[4] || (p[4] = (B) => o.$emit("mouseenter", B)),
2145
- onMouseleave: p[5] || (p[5] = (B) => o.$emit("mouseleave", B))
2154
+ onMouseenter: p[4] || (p[4] = (B) => r.$emit("mouseenter", B)),
2155
+ onMouseleave: p[5] || (p[5] = (B) => r.$emit("mouseleave", B))
2146
2156
  }, [
2147
- q(o.$slots, "default", {}, void 0, !0)
2157
+ q(r.$slots, "default", {}, void 0, !0)
2148
2158
  ], 38));
2149
2159
  }
2150
- }), tt = /* @__PURE__ */ se(Ta, [["__scopeId", "data-v-288e2690"]]), Ea = /* @__PURE__ */ re({
2160
+ }), nt = /* @__PURE__ */ ue(Va, [["__scopeId", "data-v-288e2690"]]), Ta = /* @__PURE__ */ se({
2151
2161
  name: "rc-dropdown",
2152
2162
  __name: "index",
2153
2163
  props: {
@@ -2161,153 +2171,153 @@ const Ta = /* @__PURE__ */ re({
2161
2171
  hideTimeout: { default: 150 }
2162
2172
  },
2163
2173
  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);
2174
+ setup(e, { expose: s, emit: m }) {
2175
+ const t = e, y = m, k = E(), v = E(), d = E(!1);
2176
+ let r = null, p = null;
2177
+ function B(z) {
2178
+ t.hideOnClick && (d.value = !1), z !== void 0 && y("command", z);
2169
2179
  }
2170
- Ve("handleItemClick", B);
2180
+ Te("handleItemClick", B);
2171
2181
  function x() {
2172
- t.disabled || (o && (clearTimeout(o), o = null), p && (clearTimeout(p), p = null), o = setTimeout(() => {
2182
+ t.disabled || (r && (clearTimeout(r), r = null), p && (clearTimeout(p), p = null), r = setTimeout(() => {
2173
2183
  d.value = !0, requestAnimationFrame(() => {
2174
- Be(() => {
2175
- H();
2184
+ Fe(() => {
2185
+ O();
2176
2186
  });
2177
2187
  });
2178
2188
  }, t.showTimeout));
2179
2189
  }
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;
2190
+ function b() {
2191
+ t.trigger === "hover" && i.value || (p && (clearTimeout(p), p = null), r && (clearTimeout(r), r = null), p = setTimeout(() => {
2192
+ d.value = !1, i.value = !1;
2183
2193
  }, t.hideTimeout));
2184
2194
  }
2185
2195
  function V() {
2186
- t.disabled || (d.value ? _() : x());
2196
+ t.disabled || (d.value ? b() : x());
2187
2197
  }
2188
2198
  function A() {
2189
2199
  t.trigger === "hover" && !t.disabled && x();
2190
2200
  }
2191
- function I() {
2201
+ function M() {
2192
2202
  t.trigger === "hover" && setTimeout(() => {
2193
- u.value || _();
2203
+ i.value || b();
2194
2204
  }, 50);
2195
2205
  }
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));
2206
+ const i = E(!1);
2207
+ function pe() {
2208
+ t.trigger === "hover" && (i.value = !0, r && (clearTimeout(r), r = null), p && (clearTimeout(p), p = null));
2199
2209
  }
2200
- function ye() {
2201
- t.trigger === "hover" && (u.value = !1, _());
2210
+ function he() {
2211
+ t.trigger === "hover" && (i.value = !1, b());
2202
2212
  }
2203
- function he(F) {
2204
- t.trigger === "click" && !t.disabled && (F.stopPropagation(), V());
2213
+ function ye(z) {
2214
+ t.trigger === "click" && !t.disabled && (z.stopPropagation(), V());
2205
2215
  }
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();
2216
+ function O() {
2217
+ var be;
2218
+ if (!k.value || !((be = v.value) != null && be.menuRef)) return;
2219
+ const z = k.value, j = v.value.menuRef;
2220
+ if (!z || !j) return;
2221
+ const C = z.getBoundingClientRect(), T = j.getBoundingClientRect();
2212
2222
  if (T.width === 0 || T.height === 0) {
2213
2223
  setTimeout(() => {
2214
- d.value && H();
2224
+ d.value && O();
2215
2225
  }, 10);
2216
2226
  return;
2217
2227
  }
2218
- let M = 0, Y = 0;
2228
+ let I = 0, Y = 0;
2219
2229
  switch (t.placement) {
2220
2230
  case "top":
2221
- M = S.top - T.height, Y = S.left;
2231
+ I = C.top - T.height, Y = C.left;
2222
2232
  break;
2223
2233
  case "top-start":
2224
- M = S.top - T.height, Y = S.left;
2234
+ I = C.top - T.height, Y = C.left;
2225
2235
  break;
2226
2236
  case "top-end":
2227
- M = S.top - T.height, Y = S.left + S.width - T.width;
2237
+ I = C.top - T.height, Y = C.left + C.width - T.width;
2228
2238
  break;
2229
2239
  case "bottom":
2230
- M = S.bottom, Y = S.left + (S.width - T.width) / 2;
2240
+ I = C.bottom, Y = C.left + (C.width - T.width) / 2;
2231
2241
  break;
2232
2242
  case "bottom-start":
2233
- M = S.bottom, Y = S.left;
2243
+ I = C.bottom, Y = C.left;
2234
2244
  break;
2235
2245
  case "bottom-end":
2236
- M = S.bottom, Y = S.left + S.width - T.width;
2246
+ I = C.bottom, Y = C.left + C.width - T.width;
2237
2247
  break;
2238
2248
  case "left":
2239
- M = S.top + (S.height - T.height) / 2, Y = S.left - T.width;
2249
+ I = C.top + (C.height - T.height) / 2, Y = C.left - T.width;
2240
2250
  break;
2241
2251
  case "left-start":
2242
- M = S.top, Y = S.left - T.width;
2252
+ I = C.top, Y = C.left - T.width;
2243
2253
  break;
2244
2254
  case "left-end":
2245
- M = S.top + S.height - T.height, Y = S.left - T.width;
2255
+ I = C.top + C.height - T.height, Y = C.left - T.width;
2246
2256
  break;
2247
2257
  case "right":
2248
- M = S.top + (S.height - T.height) / 2, Y = S.right;
2258
+ I = C.top + (C.height - T.height) / 2, Y = C.right;
2249
2259
  break;
2250
2260
  case "right-start":
2251
- M = S.top, Y = S.right;
2261
+ I = C.top, Y = C.right;
2252
2262
  break;
2253
2263
  case "right-end":
2254
- M = S.top + S.height - T.height, Y = S.right;
2264
+ I = C.top + C.height - T.height, Y = C.right;
2255
2265
  break;
2256
2266
  }
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";
2267
+ const ge = window.innerWidth, ke = window.innerHeight;
2268
+ Y < 0 && (Y = 8), Y + T.width > ge && (Y = ge - T.width - 8), I < 0 && (I = 8), I + T.height > ke && (I = ke - T.height - 8), j.style.top = `${I}px`, j.style.left = `${Y}px`, j.style.position = "fixed", j.style.visibility = "visible", j.style.display = "block";
2259
2269
  }
2260
- Se(d, (F) => {
2261
- g("visible-change", F), F ? (requestAnimationFrame(() => {
2262
- Be(() => {
2263
- H();
2270
+ Ie(d, (z) => {
2271
+ y("visible-change", z), z ? (requestAnimationFrame(() => {
2272
+ Fe(() => {
2273
+ O();
2264
2274
  });
2265
- }), document.addEventListener("click", N)) : document.removeEventListener("click", N);
2275
+ }), document.addEventListener("click", H)) : document.removeEventListener("click", H);
2266
2276
  });
2267
- function N(F) {
2277
+ function H(z) {
2268
2278
  if (t.trigger === "click" && !t.disabled) {
2269
- const U = F.target;
2270
- k.value && !k.value.contains(U) && _();
2279
+ const j = z.target;
2280
+ k.value && !k.value.contains(j) && b();
2271
2281
  }
2272
2282
  }
2273
- function O() {
2274
- d.value && H();
2283
+ function U() {
2284
+ d.value && O();
2275
2285
  }
2276
- return nt(() => {
2277
- window.addEventListener("resize", O), window.addEventListener("scroll", O, !0);
2278
- }), at(() => {
2279
- o && clearTimeout(o), p && clearTimeout(p), document.removeEventListener("click", N), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
2280
- }), r({
2286
+ return at(() => {
2287
+ window.addEventListener("resize", U), window.addEventListener("scroll", U, !0);
2288
+ }), lt(() => {
2289
+ r && clearTimeout(r), p && clearTimeout(p), document.removeEventListener("click", H), window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
2290
+ }), s({
2281
2291
  show: x,
2282
- hide: _,
2292
+ hide: b,
2283
2293
  toggle: V,
2284
2294
  visible: d
2285
- }), (F, U) => (s(), f("div", {
2295
+ }), (z, j) => (u(), f("div", {
2286
2296
  ref_key: "dropdownRef",
2287
2297
  ref: k,
2288
- class: j(["rc-dropdown", { "is-disabled": e.disabled }]),
2298
+ class: G(["rc-dropdown", { "is-disabled": e.disabled }]),
2289
2299
  onMouseenter: A,
2290
- onMouseleave: I,
2291
- onClick: he
2300
+ onMouseleave: M,
2301
+ onClick: ye
2292
2302
  }, [
2293
- q(F.$slots, "default", {}, void 0, !0),
2294
- G(tt, {
2303
+ q(z.$slots, "default", {}, void 0, !0),
2304
+ K(nt, {
2295
2305
  ref_key: "menuRef",
2296
2306
  ref: v,
2297
2307
  visible: d.value,
2298
2308
  effect: e.effect,
2299
2309
  "max-height": e.maxHeight,
2300
- onMouseenter: ve,
2301
- onMouseleave: ye
2310
+ onMouseenter: pe,
2311
+ onMouseleave: he
2302
2312
  }, {
2303
2313
  default: ae(() => [
2304
- q(F.$slots, "dropdown", {}, void 0, !0)
2314
+ q(z.$slots, "dropdown", {}, void 0, !0)
2305
2315
  ]),
2306
2316
  _: 3
2307
2317
  }, 8, ["visible", "effect", "max-height"])
2308
2318
  ], 34));
2309
2319
  }
2310
- }), st = /* @__PURE__ */ se(Ea, [["__scopeId", "data-v-30feb4c4"]]), Ba = { class: "rc-dropdown-item__text" }, Aa = /* @__PURE__ */ re({
2320
+ }), st = /* @__PURE__ */ ue(Ta, [["__scopeId", "data-v-30feb4c4"]]), Ea = { class: "rc-dropdown-item__text" }, Ba = /* @__PURE__ */ se({
2311
2321
  name: "rc-dropdown-item",
2312
2322
  __name: "item",
2313
2323
  props: {
@@ -2317,43 +2327,43 @@ const Ta = /* @__PURE__ */ re({
2317
2327
  icon: { default: "" }
2318
2328
  },
2319
2329
  setup(e) {
2320
- const r = e, m = Ce("handleItemClick", () => {
2330
+ const s = e, m = Me("handleItemClick", () => {
2321
2331
  });
2322
- function t(g) {
2323
- if (r.disabled) {
2324
- g.stopPropagation();
2332
+ function t(y) {
2333
+ if (s.disabled) {
2334
+ y.stopPropagation();
2325
2335
  return;
2326
2336
  }
2327
- m(r.command);
2337
+ m(s.command);
2328
2338
  }
2329
- return (g, k) => (s(), f("li", {
2330
- class: j(["rc-dropdown-item", {
2339
+ return (y, k) => (u(), f("li", {
2340
+ class: G(["rc-dropdown-item", {
2331
2341
  "is-disabled": e.disabled,
2332
2342
  "is-divided": e.divided
2333
2343
  }]),
2334
2344
  onClick: t
2335
2345
  }, [
2336
- e.icon ? (s(), te(Z, {
2346
+ e.icon ? (u(), ne(X, {
2337
2347
  key: 0,
2338
2348
  name: e.icon,
2339
2349
  class: "rc-dropdown-item__icon"
2340
2350
  }, null, 8, ["name"])) : D("", !0),
2341
- C("span", Ba, [
2342
- q(g.$slots, "default", {}, void 0, !0)
2351
+ S("span", Ea, [
2352
+ q(y.$slots, "default", {}, void 0, !0)
2343
2353
  ])
2344
2354
  ], 2));
2345
2355
  }
2346
- }), ut = /* @__PURE__ */ se(Aa, [["__scopeId", "data-v-7c739fdf"]]);
2356
+ }), ut = /* @__PURE__ */ ue(Ba, [["__scopeId", "data-v-7c739fdf"]]);
2347
2357
  st.name = "rc-dropdown";
2348
- tt.name = "rc-dropdown-menu";
2358
+ nt.name = "rc-dropdown-menu";
2349
2359
  ut.name = "rc-dropdown-item";
2350
2360
  function St(e) {
2351
- return e.component(st.name, st), e.component(tt.name, tt), e.component(ut.name, ut), e;
2361
+ return e.component(st.name, st), e.component(nt.name, nt), e.component(ut.name, ut), e;
2352
2362
  }
2353
- const lt = Symbol("RECYCLE_UI_CONFIG"), ct = {
2363
+ const ot = Symbol("RECYCLE_UI_CONFIG"), ct = {
2354
2364
  prefix: "rc",
2355
2365
  autoRegister: !0,
2356
- provideKey: lt,
2366
+ provideKey: ot,
2357
2367
  // 预留主题/其他全局配置
2358
2368
  theme: {},
2359
2369
  // IconFont 默认配置(可在 app.use 时覆盖)
@@ -2362,12 +2372,12 @@ const lt = Symbol("RECYCLE_UI_CONFIG"), ct = {
2362
2372
  // 输入框设备类型默认配置
2363
2373
  inputDeviceType: "pc"
2364
2374
  };
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));
2375
+ function Fa(e, s) {
2376
+ s.autoRegister !== !1 && (typeof mt == "function" && mt(e), typeof pt == "function" && pt(e), typeof ht == "function" && ht(e), typeof gt == "function" && gt(e), typeof bt == "function" && bt(e), typeof kt == "function" && kt(e), typeof Ct == "function" && Ct(e), typeof $t == "function" && $t(e), typeof _t == "function" && _t(e), typeof xt == "function" && xt(e), typeof St == "function" && St(e));
2367
2377
  }
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) {
2378
+ const It = (e, s) => {
2379
+ const m = { ...ct, ...s || {} };
2380
+ if (e.provide(m.provideKey ?? ot, m), e.config.globalProperties.$recycleUI = m, typeof window < "u" && m.iconCssUrl) {
2371
2381
  const t = `link[rel="stylesheet"][data-rcui-icon="true"][href="${m.iconCssUrl}"]`;
2372
2382
  if (!document.head.querySelector(t)) {
2373
2383
  const k = document.createElement("link");
@@ -2375,47 +2385,47 @@ const Vt = (e, r) => {
2375
2385
  }
2376
2386
  }
2377
2387
  return Fa(e, m), e;
2378
- }, Na = { install: Vt };
2379
- function Wa(e) {
2388
+ }, Na = { install: It };
2389
+ function Pa(e) {
2380
2390
  return {
2381
- install(r) {
2382
- Vt(r, e);
2391
+ install(s) {
2392
+ It(s, e);
2383
2393
  }
2384
2394
  };
2385
2395
  }
2386
2396
  export {
2387
- lt as RECYCLE_UI_SYMBOL,
2388
- xe as RcButton,
2389
- He as RcCalendar,
2397
+ ot as RECYCLE_UI_SYMBOL,
2398
+ De as RcButton,
2399
+ Oe as RcCalendar,
2390
2400
  Ze as RcCard,
2391
- Ya as RcDescriptions,
2392
- La as RcDescriptionsItem,
2401
+ za as RcDescriptions,
2402
+ Ya as RcDescriptionsItem,
2393
2403
  st as RcDropdown,
2394
2404
  ut as RcDropdownItem,
2395
- tt as RcDropdownMenu,
2396
- Z as RcIcon,
2397
- rt as RcInput,
2398
- We as RcPopup,
2399
- xt as RcSearchArea,
2405
+ nt as RcDropdownMenu,
2406
+ X as RcIcon,
2407
+ tt as RcInput,
2408
+ He as RcPopup,
2409
+ Dt as RcSearchArea,
2400
2410
  et as RcToast,
2401
- Wa as createRecycleUI,
2411
+ Pa as createRecycleUI,
2402
2412
  Na as default,
2403
2413
  ct as defaultRecycleUIConfig,
2404
2414
  dn as hideToast,
2405
- Vt as install,
2415
+ It as install,
2406
2416
  mt as installButton,
2407
2417
  $t as installCalendar,
2408
- yt as installCard,
2418
+ ht as installCard,
2409
2419
  pt as installDescriptions,
2410
2420
  St as installDropdown,
2411
2421
  bt as installIcon,
2412
- Ct as installInput,
2422
+ xt as installInput,
2413
2423
  kt as installMessage,
2414
2424
  _t as installPopup,
2415
- Dt as installSearchArea,
2416
- hn as message,
2417
- Ya as rcDescriptions,
2418
- La as rcDescriptionsItem,
2419
- Pa as showToast
2425
+ Ct as installSearchArea,
2426
+ yn as message,
2427
+ za as rcDescriptions,
2428
+ Ya as rcDescriptionsItem,
2429
+ La as showToast
2420
2430
  };
2421
2431
  //# sourceMappingURL=index.mjs.map