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

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