@rft-rc/recycle-ui 0.0.2-rc.4 → 0.0.2-rc.6

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 ce, inject as _e, computed as M, onMounted as it, createElementBlock as v, openBlock as c, normalizeStyle as X, normalizeClass as O, createCommentVNode as w, toDisplayString as R, renderSlot as q, Fragment as H, createBlock as ie, createTextVNode as de, createElementVNode as k, ref as I, watchEffect as gt, provide as $e, renderList as ae, onUnmounted as Ke, Teleport as dt, createVNode as E, Transition as we, withCtx as ne, createApp as _t, reactive as kt, TransitionGroup as bt, render as ft, watch as be, withModifiers as $t, unref as j, nextTick as Ge, withDirectives as vt, vModelText as pt } from "vue";
2
- const xt = {
1
+ import { defineComponent as de, inject as De, computed as R, onMounted as ht, createElementBlock as f, openBlock as u, normalizeStyle as ae, normalizeClass as z, createCommentVNode as S, toDisplayString as T, renderSlot as q, Fragment as j, createBlock as ue, createTextVNode as ie, createElementVNode as k, ref as M, watchEffect as wt, provide as Ce, renderList as te, onUnmounted as tt, Teleport as gt, createVNode as L, Transition as Re, withCtx as H, createApp as Ct, reactive as St, TransitionGroup as It, render as _t, watch as we, withModifiers as Mt, unref as G, nextTick as et, withDirectives as kt, vModelText as bt } from "vue";
2
+ const Rt = {
3
3
  key: 0,
4
4
  class: "rc-icon__unicode"
5
- }, Ct = /* @__PURE__ */ ce({
5
+ }, Vt = /* @__PURE__ */ de({
6
6
  name: "rc-icon",
7
7
  __name: "index",
8
8
  props: {
@@ -13,51 +13,51 @@ const xt = {
13
13
  code: { default: "" }
14
14
  },
15
15
  setup(e) {
16
- const r = e, d = _e(je, {}), l = M(() => (d == null ? void 0 : d.iconClass) || "iconfont"), y = M(() => r.name || ""), b = M(() => typeof r.size == "number" ? `${r.size}px` : r.size || "16px"), p = M(() => ({
17
- fontSize: b.value,
18
- color: r.color || void 0,
16
+ const o = e, d = De(at, {}), n = R(() => (d == null ? void 0 : d.iconClass) || "iconfont"), y = R(() => o.name || ""), $ = R(() => typeof o.size == "number" ? `${o.size}px` : o.size || "16px"), m = R(() => ({
17
+ fontSize: $.value,
18
+ color: o.color || void 0,
19
19
  lineHeight: 1,
20
20
  fontFamily: (d == null ? void 0 : d.iconClass) || "iconfont"
21
- })), m = M(() => {
22
- const i = r.code;
21
+ })), v = R(() => {
22
+ const i = o.code;
23
23
  if (i == null || i === "" || i === 0) return "";
24
24
  if (typeof i == "number")
25
25
  return String.fromCharCode(i);
26
- const h = String(i).replace(/^0x/i, ""), A = parseInt(h, 16);
27
- return Number.isNaN(A) ? "" : String.fromCharCode(A);
26
+ const h = String(i).replace(/^0x/i, ""), F = parseInt(h, 16);
27
+ return Number.isNaN(F) ? "" : String.fromCharCode(F);
28
28
  });
29
- return it(() => {
29
+ return ht(() => {
30
30
  if (typeof window > "u") return;
31
- const i = d && d.iconCssUrl || mt.iconCssUrl;
31
+ const i = d && d.iconCssUrl || $t.iconCssUrl;
32
32
  if (!i) return;
33
33
  const h = `link[rel="stylesheet"][data-rcui-icon="true"][href="${i}"]`;
34
34
  if (!document.head.querySelector(h)) {
35
- const $ = document.createElement("link");
36
- $.rel = "stylesheet", $.href = i, $.setAttribute("data-rcui-icon", "true"), document.head.appendChild($);
35
+ const D = document.createElement("link");
36
+ D.rel = "stylesheet", D.href = i, D.setAttribute("data-rcui-icon", "true"), document.head.appendChild(D);
37
37
  }
38
- }), (i, h) => (c(), v("i", {
39
- class: O(["rc-icon", [l.value, y.value, { "rc-icon--spin": e.spin }]]),
40
- style: X(p.value),
38
+ }), (i, h) => (u(), f("i", {
39
+ class: z(["rc-icon", [n.value, y.value, { "rc-icon--spin": e.spin }]]),
40
+ style: ae(m.value),
41
41
  "aria-hidden": "true"
42
42
  }, [
43
- m.value ? (c(), v("span", xt, R(m.value), 1)) : w("", !0)
43
+ v.value ? (u(), f("span", Rt, T(v.value), 1)) : S("", !0)
44
44
  ], 6));
45
45
  }
46
- }), ue = (e, r) => {
46
+ }), fe = (e, o) => {
47
47
  const d = e.__vccOpts || e;
48
- for (const [l, y] of r)
49
- d[l] = y;
48
+ for (const [n, y] of o)
49
+ d[n] = y;
50
50
  return d;
51
- }, J = /* @__PURE__ */ ue(Ct, [["__scopeId", "data-v-3857a892"]]), Dt = ["disabled"], wt = {
51
+ }, J = /* @__PURE__ */ fe(Vt, [["__scopeId", "data-v-3857a892"]]), Tt = ["disabled"], At = {
52
52
  key: 0,
53
53
  class: "rc-button__spinner"
54
- }, St = {
54
+ }, Ft = {
55
55
  key: 0,
56
56
  class: "rc-button__icon rc-button__icon--prefix"
57
- }, It = {
57
+ }, Yt = {
58
58
  key: 2,
59
59
  class: "rc-button__icon rc-button__icon--suffix"
60
- }, Mt = /* @__PURE__ */ ce({
60
+ }, Bt = /* @__PURE__ */ de({
61
61
  __name: "index",
62
62
  props: {
63
63
  type: { default: "default" },
@@ -72,48 +72,48 @@ const xt = {
72
72
  suffixIcon: { default: "" }
73
73
  },
74
74
  emits: ["click"],
75
- setup(e, { emit: r }) {
76
- const d = e, l = r, y = (p) => {
77
- !d.disabled && !d.loading && l("click", p);
78
- }, b = M(() => {
79
- const p = d.round;
80
- return typeof p == "boolean" ? p ? "999px" : "6px" : typeof p == "number" ? `${p}px` : String(p);
75
+ setup(e, { emit: o }) {
76
+ const d = e, n = o, y = (m) => {
77
+ !d.disabled && !d.loading && n("click", m);
78
+ }, $ = R(() => {
79
+ const m = d.round;
80
+ return typeof m == "boolean" ? m ? "999px" : "6px" : typeof m == "number" ? `${m}px` : String(m);
81
81
  });
82
- return (p, m) => (c(), v("button", {
83
- class: O(["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: X({ borderRadius: b.value }),
82
+ return (m, v) => (u(), f("button", {
83
+ class: z(["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: ae({ borderRadius: $.value }),
85
85
  disabled: e.disabled || e.loading,
86
86
  onClick: y
87
87
  }, [
88
- e.loading ? (c(), v("span", wt)) : (c(), v(H, { key: 1 }, [
89
- e.preIcon || p.$slots.preIcon ? (c(), v("span", St, [
90
- q(p.$slots, "preIcon", {}, () => [
91
- e.preIcon ? (c(), ie(J, {
88
+ e.loading ? (u(), f("span", At)) : (u(), f(j, { key: 1 }, [
89
+ e.preIcon || m.$slots.preIcon ? (u(), f("span", Ft, [
90
+ q(m.$slots, "preIcon", {}, () => [
91
+ e.preIcon ? (u(), ue(J, {
92
92
  key: 0,
93
93
  name: e.preIcon
94
- }, null, 8, ["name"])) : w("", !0)
94
+ }, null, 8, ["name"])) : S("", !0)
95
95
  ], !0)
96
- ])) : w("", !0)
96
+ ])) : S("", !0)
97
97
  ], 64)),
98
- q(p.$slots, "default", {}, () => [
99
- de(R(e.label), 1)
98
+ q(m.$slots, "default", {}, () => [
99
+ ie(T(e.label), 1)
100
100
  ], !0),
101
- !e.loading && (e.suffixIcon || p.$slots.suffixIcon) ? (c(), v("span", It, [
102
- q(p.$slots, "suffixIcon", {}, () => [
103
- e.suffixIcon ? (c(), ie(J, {
101
+ !e.loading && (e.suffixIcon || m.$slots.suffixIcon) ? (u(), f("span", Yt, [
102
+ q(m.$slots, "suffixIcon", {}, () => [
103
+ e.suffixIcon ? (u(), ue(J, {
104
104
  key: 0,
105
105
  name: e.suffixIcon
106
- }, null, 8, ["name"])) : w("", !0)
106
+ }, null, 8, ["name"])) : S("", !0)
107
107
  ], !0)
108
- ])) : w("", !0)
109
- ], 14, Dt));
108
+ ])) : S("", !0)
109
+ ], 14, Tt));
110
110
  }
111
- }), ye = /* @__PURE__ */ ue(Mt, [["__scopeId", "data-v-3ed3109f"]]);
112
- ye.name = "rc-button";
113
- function Xe(e) {
114
- return e.component(ye.name, ye), e;
111
+ }), pe = /* @__PURE__ */ fe(Bt, [["__scopeId", "data-v-3ed3109f"]]);
112
+ pe.name = "rc-button";
113
+ function rt(e) {
114
+ return e.component(pe.name, pe), e;
115
115
  }
116
- const Vt = { class: "rc-desc-item__value" }, Rt = /* @__PURE__ */ ce({
116
+ const Et = { class: "rc-desc-item__value" }, Nt = /* @__PURE__ */ de({
117
117
  name: "rc-descriptions-item",
118
118
  __name: "item",
119
119
  props: {
@@ -123,43 +123,43 @@ const Vt = { class: "rc-desc-item__value" }, Rt = /* @__PURE__ */ ce({
123
123
  span: { default: 1 }
124
124
  },
125
125
  setup(e) {
126
- const r = e;
127
- _e("rcDescItemWidth", void 0), _e("rcDescSingleWidth", ""), _e("rcDescGap", "0px");
128
- const d = _e("rcDescGapPx", 0), l = _e("rcDescColCount", 1), y = _e("rcDescLabelWidth", ""), b = M(() => {
129
- const i = typeof r.span == "string" ? parseInt(r.span, 10) : r.span, h = typeof (l == null ? void 0 : l.value) == "number" ? l.value : l, A = !Number.isNaN(i) && i > 0 ? i : 1;
130
- return Math.min(A, h || 1);
131
- }), p = M(() => {
132
- const i = typeof (l == null ? void 0 : l.value) == "number" ? l.value : l, h = typeof (d == null ? void 0 : d.value) == "number" ? d.value : d, A = b.value;
133
- if (!i || i <= 1 || A >= i) return "100%";
134
- const $ = (i - 1) * h, g = (A - 1) * h;
135
- return `calc((100% - ${$}px) * ${A} / ${i} + ${g}px)`;
136
- }), m = M(() => {
137
- const i = typeof (y == null ? void 0 : y.value) == "string" ? y.value : y, h = r.labelWidth !== "" ? r.labelWidth : i || "";
126
+ const o = e;
127
+ De("rcDescItemWidth", void 0), De("rcDescSingleWidth", ""), De("rcDescGap", "0px");
128
+ const d = De("rcDescGapPx", 0), n = De("rcDescColCount", 1), y = De("rcDescLabelWidth", ""), $ = R(() => {
129
+ const i = typeof o.span == "string" ? parseInt(o.span, 10) : o.span, h = typeof (n == null ? void 0 : n.value) == "number" ? n.value : n, F = !Number.isNaN(i) && i > 0 ? i : 1;
130
+ return Math.min(F, h || 1);
131
+ }), m = R(() => {
132
+ const i = typeof (n == null ? void 0 : n.value) == "number" ? n.value : n, h = typeof (d == null ? void 0 : d.value) == "number" ? d.value : d, F = $.value;
133
+ if (!i || i <= 1 || F >= i) return "100%";
134
+ const D = (i - 1) * h, _ = (F - 1) * h;
135
+ return `calc((100% - ${D}px) * ${F} / ${i} + ${_}px)`;
136
+ }), v = R(() => {
137
+ const i = typeof (y == null ? void 0 : y.value) == "string" ? y.value : y, h = o.labelWidth !== "" ? o.labelWidth : i || "";
138
138
  return h ? { width: typeof h == "number" ? `${h}px` : String(h), flex: "0 0 auto" } : {};
139
139
  });
140
- return (i, h) => (c(), v("div", {
140
+ return (i, h) => (u(), f("div", {
141
141
  class: "rc-desc-item",
142
- style: X({ width: p.value, flex: `0 0 ${p.value}` })
142
+ style: ae({ width: m.value, flex: `0 0 ${m.value}` })
143
143
  }, [
144
144
  k("div", {
145
145
  class: "rc-desc-item__label",
146
- style: X(m.value)
146
+ style: ae(v.value)
147
147
  }, [
148
148
  q(i.$slots, "label", {}, () => [
149
- de(R(e.label), 1)
149
+ ie(T(e.label), 1)
150
150
  ], !0)
151
151
  ], 4),
152
- k("div", Vt, [
152
+ k("div", Et, [
153
153
  q(i.$slots, "default", {}, () => [
154
- de(R(e.value), 1)
154
+ ie(T(e.value), 1)
155
155
  ], !0)
156
156
  ])
157
157
  ], 4));
158
158
  }
159
- }), Ce = /* @__PURE__ */ ue(Rt, [["__scopeId", "data-v-970d0b99"]]), At = { class: "rc-descriptions" }, Tt = {
159
+ }), Ie = /* @__PURE__ */ fe(Nt, [["__scopeId", "data-v-970d0b99"]]), Pt = { class: "rc-descriptions" }, Lt = {
160
160
  key: 0,
161
161
  class: "rc-descriptions__title"
162
- }, Bt = /* @__PURE__ */ ce({
162
+ }, Wt = /* @__PURE__ */ de({
163
163
  name: "rc-descriptions",
164
164
  __name: "index",
165
165
  props: {
@@ -171,66 +171,66 @@ const Vt = { class: "rc-desc-item__value" }, Rt = /* @__PURE__ */ ce({
171
171
  keyMap: {}
172
172
  },
173
173
  setup(e) {
174
- const r = e, d = I(null), l = M(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)), y = M(() => {
175
- const h = typeof r.column == "string" ? Number.parseInt(r.column, 10) : r.column ?? 1;
174
+ const o = e, d = M(null), n = R(() => typeof o.gap == "number" ? `${o.gap}px` : String(o.gap)), y = R(() => {
175
+ const h = typeof o.column == "string" ? Number.parseInt(o.column, 10) : o.column ?? 1;
176
176
  return !Number.isNaN(h) && h > 0 ? h : 1;
177
- }), b = I("100%"), p = I("100%");
178
- gt(() => {
177
+ }), $ = M("100%"), m = M("100%");
178
+ wt(() => {
179
179
  const h = y.value;
180
180
  if (h <= 1)
181
- b.value = "100%", p.value = "100%";
181
+ $.value = "100%", m.value = "100%";
182
182
  else {
183
- const A = typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0, g = `calc((100% - ${(h - 1) * A}px) / ${h})`;
184
- p.value = g, b.value = g;
183
+ const F = typeof o.gap == "number" ? o.gap : parseFloat(String(o.gap)) || 0, _ = `calc((100% - ${(h - 1) * F}px) / ${h})`;
184
+ m.value = _, $.value = _;
185
185
  }
186
- }), $e("rcDescItemWidth", b), $e("rcDescSingleWidth", p), $e("rcDescColCount", y), $e("rcDescGapPx", M(() => typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0));
187
- const m = M(() => r.labelWidth === "" || r.labelWidth === void 0 ? "" : typeof r.labelWidth == "number" ? `${r.labelWidth}px` : String(r.labelWidth));
188
- $e("rcDescLabelWidth", m), $e("rcDescGap", M(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)));
189
- const i = M(() => {
190
- var $, g, D;
191
- const h = (($ = r.keyMap) == null ? void 0 : $.key) ?? "label", A = ((g = r.keyMap) == null ? void 0 : g.value) ?? "value";
192
- return (D = r.data) != null && D.length ? r.data.map((V) => ({
186
+ }), Ce("rcDescItemWidth", $), Ce("rcDescSingleWidth", m), Ce("rcDescColCount", y), Ce("rcDescGapPx", R(() => typeof o.gap == "number" ? o.gap : parseFloat(String(o.gap)) || 0));
187
+ const v = R(() => o.labelWidth === "" || o.labelWidth === void 0 ? "" : typeof o.labelWidth == "number" ? `${o.labelWidth}px` : String(o.labelWidth));
188
+ Ce("rcDescLabelWidth", v), Ce("rcDescGap", R(() => typeof o.gap == "number" ? `${o.gap}px` : String(o.gap)));
189
+ const i = R(() => {
190
+ var D, _, I;
191
+ const h = ((D = o.keyMap) == null ? void 0 : D.key) ?? "label", F = ((_ = o.keyMap) == null ? void 0 : _.value) ?? "value";
192
+ return (I = o.data) != null && I.length ? o.data.map((V) => ({
193
193
  label: V == null ? void 0 : V[h],
194
- value: V == null ? void 0 : V[A]
194
+ value: V == null ? void 0 : V[F]
195
195
  })) : [];
196
196
  });
197
- return (h, A) => (c(), v("div", At, [
198
- h.$slots.title || e.title ? (c(), v("div", Tt, [
197
+ return (h, F) => (u(), f("div", Pt, [
198
+ h.$slots.title || e.title ? (u(), f("div", Lt, [
199
199
  q(h.$slots, "title", {}, () => [
200
- de(R(e.title), 1)
200
+ ie(T(e.title), 1)
201
201
  ], !0)
202
- ])) : w("", !0),
202
+ ])) : S("", !0),
203
203
  k("div", {
204
204
  class: "rc-descriptions__body",
205
- style: X({ gap: l.value }),
205
+ style: ae({ gap: n.value }),
206
206
  ref_key: "wrapEl",
207
207
  ref: d
208
208
  }, [
209
- i.value.length ? (c(!0), v(H, { key: 0 }, ae(i.value, ($, g) => (c(), ie(Ce, {
210
- key: g,
211
- label: $.label,
212
- value: $.value,
209
+ i.value.length ? (u(!0), f(j, { key: 0 }, te(i.value, (D, _) => (u(), ue(Ie, {
210
+ key: _,
211
+ label: D.label,
212
+ value: D.value,
213
213
  "label-width": e.labelWidth
214
214
  }, null, 8, ["label", "value", "label-width"]))), 128)) : q(h.$slots, "default", { key: 1 }, void 0, !0)
215
215
  ], 4)
216
216
  ]));
217
217
  }
218
- }), Me = /* @__PURE__ */ ue(Bt, [["__scopeId", "data-v-5fcaa235"]]);
219
- Me.name = "rc-descriptions";
220
- Ce.name = "rc-descriptions-item";
221
- function Ze(e) {
222
- return e.component(Me.name, Me), e.component("RcDescriptions", Me), e.component(Ce.name, Ce), e.component("RcDescriptionsItem", Ce), e;
218
+ }), Ae = /* @__PURE__ */ fe(Wt, [["__scopeId", "data-v-5fcaa235"]]);
219
+ Ae.name = "rc-descriptions";
220
+ Ie.name = "rc-descriptions-item";
221
+ function ot(e) {
222
+ return e.component(Ae.name, Ae), e.component("RcDescriptions", Ae), e.component(Ie.name, Ie), e.component("RcDescriptionsItem", Ie), e;
223
223
  }
224
- const on = Me, sn = Ce, Ft = { class: "rc-card__title" }, Nt = { class: "rc-card__title-text" }, Et = {
224
+ const gn = Ae, _n = Ie, zt = { class: "rc-card__title" }, Ut = { class: "rc-card__title-text" }, Ot = {
225
225
  key: 0,
226
226
  class: "rc-card__status"
227
- }, Yt = {
227
+ }, Gt = {
228
228
  key: 1,
229
229
  class: "rc-card__divider"
230
- }, Pt = {
230
+ }, Kt = {
231
231
  key: 2,
232
232
  class: "rc-card__action"
233
- }, Lt = /* @__PURE__ */ ce({
233
+ }, jt = /* @__PURE__ */ de({
234
234
  name: "rc-card",
235
235
  __name: "index",
236
236
  props: {
@@ -248,84 +248,84 @@ const on = Me, sn = Ce, Ft = { class: "rc-card__title" }, Nt = { class: "rc-card
248
248
  height: { default: "" }
249
249
  },
250
250
  setup(e) {
251
- const r = e, d = M(() => {
252
- const m = typeof r.round == "boolean" ? r.round ? "12px" : "0" : typeof r.round == "number" ? `${r.round}px` : String(r.round);
251
+ const o = e, d = R(() => {
252
+ const v = typeof o.round == "boolean" ? o.round ? "12px" : "0" : typeof o.round == "number" ? `${o.round}px` : String(o.round);
253
253
  return {
254
- backgroundColor: r.color || "var(--rc-white)",
255
- borderRadius: m,
256
- boxShadow: p(r.elevation),
257
- width: b(r.width),
258
- height: b(r.height)
254
+ backgroundColor: o.color || "var(--rc-white)",
255
+ borderRadius: v,
256
+ boxShadow: m(o.elevation),
257
+ width: $(o.width),
258
+ height: $(o.height)
259
259
  };
260
- }), l = M(() => r.padding || "16px"), y = M(
261
- () => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)
260
+ }), n = R(() => o.padding || "16px"), y = R(
261
+ () => typeof o.gap == "number" ? `${o.gap}px` : String(o.gap)
262
262
  );
263
- function b(m) {
264
- return m == null || m === "" ? "" : typeof m == "number" ? `${m}px` : String(m);
263
+ function $(v) {
264
+ return v == null || v === "" ? "" : typeof v == "number" ? `${v}px` : String(v);
265
265
  }
266
- function p(m) {
267
- if (!m || m <= 0) return "none";
268
- const i = 4 * m;
266
+ function m(v) {
267
+ if (!v || v <= 0) return "none";
268
+ const i = 4 * v;
269
269
  return `0 ${Math.round(i / 2)}px ${i}px rgba(0,0,0,0.06), 0 ${Math.round(
270
270
  i / 4
271
271
  )}px ${Math.round(i / 2)}px rgba(0,0,0,0.04)`;
272
272
  }
273
- return (m, i) => (c(), v("div", {
274
- class: O(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
275
- style: X(d.value)
273
+ return (v, i) => (u(), f("div", {
274
+ class: z(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
275
+ style: ae(d.value)
276
276
  }, [
277
- m.$slots.title || e.title || m.$slots.status || e.status ? (c(), v("div", {
277
+ v.$slots.title || e.title || v.$slots.status || e.status ? (u(), f("div", {
278
278
  key: 0,
279
279
  class: "rc-card__top",
280
- style: X({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
280
+ style: ae({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
281
281
  }, [
282
- k("div", Ft, [
283
- q(m.$slots, "title", {}, () => [
284
- k("span", Nt, R(e.title), 1)
282
+ k("div", zt, [
283
+ q(v.$slots, "title", {}, () => [
284
+ k("span", Ut, T(e.title), 1)
285
285
  ], !0)
286
286
  ]),
287
- m.$slots.status || e.status ? (c(), v("div", Et, [
288
- q(m.$slots, "status", {}, () => [
287
+ v.$slots.status || e.status ? (u(), f("div", Ot, [
288
+ q(v.$slots, "status", {}, () => [
289
289
  k("span", {
290
290
  class: "rc-card__status-text",
291
- style: X({ color: e.statusColor || "var(--rc-primary)" })
292
- }, R(e.status), 5)
291
+ style: ae({ color: e.statusColor || "var(--rc-primary)" })
292
+ }, T(e.status), 5)
293
293
  ], !0)
294
- ])) : w("", !0)
295
- ], 4)) : w("", !0),
294
+ ])) : S("", !0)
295
+ ], 4)) : S("", !0),
296
296
  k("div", {
297
297
  class: "rc-card__body",
298
- style: X({ padding: l.value, gap: y.value })
298
+ style: ae({ padding: n.value, gap: y.value })
299
299
  }, [
300
- q(m.$slots, "content", {}, () => [
301
- q(m.$slots, "default", {}, void 0, !0)
300
+ q(v.$slots, "content", {}, () => [
301
+ q(v.$slots, "default", {}, void 0, !0)
302
302
  ], !0)
303
303
  ], 4),
304
- m.$slots.action ? (c(), v("div", Yt)) : w("", !0),
305
- m.$slots.action ? (c(), v("div", Pt, [
306
- q(m.$slots, "action", {}, void 0, !0)
307
- ])) : w("", !0)
304
+ v.$slots.action ? (u(), f("div", Gt)) : S("", !0),
305
+ v.$slots.action ? (u(), f("div", Kt, [
306
+ q(v.$slots, "action", {}, void 0, !0)
307
+ ])) : S("", !0)
308
308
  ], 6));
309
309
  }
310
- }), Ne = /* @__PURE__ */ ue(Lt, [["__scopeId", "data-v-a7b95214"]]);
311
- Ne.name = "rc-card";
312
- const Wt = "RcCard";
313
- function et(e) {
314
- return e.component(Ne.name, Ne), e.component(Wt, Ne), e;
310
+ }), He = /* @__PURE__ */ fe(jt, [["__scopeId", "data-v-a7b95214"]]);
311
+ He.name = "rc-card";
312
+ const Ht = "RcCard";
313
+ function st(e) {
314
+ return e.component(He.name, He), e.component(Ht, He), e;
315
315
  }
316
- const zt = {
316
+ const qt = {
317
317
  key: 0,
318
318
  class: "rc-toast__mask"
319
- }, Ut = { class: "rc-toast__content" }, Ot = {
319
+ }, Jt = { class: "rc-toast__content" }, Qt = {
320
320
  key: 0,
321
321
  class: "rc-toast__spinner"
322
- }, Gt = {
322
+ }, Xt = {
323
323
  key: 1,
324
324
  class: "rc-toast__icon rc-toast__icon--success"
325
- }, Kt = {
325
+ }, Zt = {
326
326
  key: 2,
327
327
  class: "rc-toast__icon rc-toast__icon--fail"
328
- }, jt = { class: "rc-toast__text" }, Ht = /* @__PURE__ */ ce({
328
+ }, ea = { class: "rc-toast__text" }, ta = /* @__PURE__ */ de({
329
329
  __name: "index",
330
330
  props: {
331
331
  message: { default: "" },
@@ -334,155 +334,155 @@ const zt = {
334
334
  mask: { type: Boolean, default: !1 },
335
335
  onAfterLeave: {}
336
336
  },
337
- setup(e, { expose: r }) {
338
- const d = e, l = I(!0);
337
+ setup(e, { expose: o }) {
338
+ const d = e, n = M(!0);
339
339
  let y;
340
- function b() {
340
+ function $() {
341
341
  y && (clearTimeout(y), y = null);
342
342
  }
343
- function p() {
344
- b(), l.value = !1;
343
+ function m() {
344
+ $(), n.value = !1;
345
345
  }
346
- return r({ close: p }), it(() => {
346
+ return o({ close: m }), ht(() => {
347
347
  d.duration && d.duration > 0 && (y = setTimeout(() => {
348
- p();
348
+ m();
349
349
  }, d.duration));
350
- }), Ke(() => {
351
- b();
352
- }), (m, i) => (c(), v(H, null, [
353
- (c(), ie(dt, { to: "body" }, [
354
- E(we, {
350
+ }), tt(() => {
351
+ $();
352
+ }), (v, i) => (u(), f(j, null, [
353
+ (u(), ue(gt, { to: "body" }, [
354
+ L(Re, {
355
355
  name: "rc-toast-fade",
356
356
  onAfterLeave: e.onAfterLeave
357
357
  }, {
358
- default: ne(() => [
359
- l.value ? (c(), v("div", {
358
+ default: H(() => [
359
+ n.value ? (u(), f("div", {
360
360
  key: 0,
361
- class: O(["rc-toast", [`rc-toast--${e.type}`]])
361
+ class: z(["rc-toast", [`rc-toast--${e.type}`]])
362
362
  }, [
363
- e.mask ? (c(), v("div", zt)) : w("", !0),
364
- k("div", Ut, [
365
- e.type === "loading" ? (c(), v("div", Ot)) : e.type === "success" ? (c(), v("div", Gt)) : e.type === "fail" ? (c(), v("div", Kt)) : w("", !0),
366
- k("div", jt, R(e.message), 1)
363
+ e.mask ? (u(), f("div", qt)) : S("", !0),
364
+ k("div", Jt, [
365
+ e.type === "loading" ? (u(), f("div", Qt)) : e.type === "success" ? (u(), f("div", Xt)) : e.type === "fail" ? (u(), f("div", Zt)) : S("", !0),
366
+ k("div", ea, T(e.message), 1)
367
367
  ])
368
- ], 2)) : w("", !0)
368
+ ], 2)) : S("", !0)
369
369
  ]),
370
370
  _: 1
371
371
  }, 8, ["onAfterLeave"])
372
372
  ])),
373
- q(m.$slots, "default", {}, void 0, !0)
373
+ q(v.$slots, "default", {}, void 0, !0)
374
374
  ], 64));
375
375
  }
376
- }), Ee = /* @__PURE__ */ ue(Ht, [["__scopeId", "data-v-d234c9c5"]]);
377
- let ke = null, De = null;
378
- function tt() {
379
- ke && (ke.unmount(), ke = null), De && (document.body.removeChild(De), De = null);
376
+ }), qe = /* @__PURE__ */ fe(ta, [["__scopeId", "data-v-d234c9c5"]]);
377
+ let xe = null, Me = null;
378
+ function ct() {
379
+ xe && (xe.unmount(), xe = null), Me && (document.body.removeChild(Me), Me = null);
380
380
  }
381
- function cn(e) {
382
- const r = typeof e == "string" ? { message: e } : e || {};
383
- tt(), De = document.createElement("div"), document.body.appendChild(De);
381
+ function kn(e) {
382
+ const o = typeof e == "string" ? { message: e } : e || {};
383
+ ct(), Me = document.createElement("div"), document.body.appendChild(Me);
384
384
  const d = {
385
- message: r.message,
386
- type: r.type ?? "text",
387
- duration: r.duration ?? 2e3,
388
- mask: r.mask ?? !1,
385
+ message: o.message,
386
+ type: o.type ?? "text",
387
+ duration: o.duration ?? 2e3,
388
+ mask: o.mask ?? !1,
389
389
  onAfterLeave: () => {
390
- var l;
391
- tt(), (l = r.onClose) == null || l.call(r);
390
+ var n;
391
+ ct(), (n = o.onClose) == null || n.call(o);
392
392
  }
393
393
  };
394
- return ke = _t(Ee, d), ke.mount(De), {
395
- close: qt
394
+ return xe = Ct(qe, d), xe.mount(Me), {
395
+ close: aa
396
396
  };
397
397
  }
398
- function qt() {
399
- var e, r, d;
400
- ke && ((d = (r = (e = ke._instance) == null ? void 0 : e.exposed) == null ? void 0 : r.close) == null || d.call(r));
398
+ function aa() {
399
+ var e, o, d;
400
+ xe && ((d = (o = (e = xe._instance) == null ? void 0 : e.exposed) == null ? void 0 : o.close) == null || d.call(o));
401
401
  }
402
- Ee.name = "rc-toast";
403
- function at(e) {
404
- return e.component(Ee.name, Ee), e;
402
+ qe.name = "rc-toast";
403
+ function ut(e) {
404
+ return e.component(qe.name, qe), e;
405
405
  }
406
- const Jt = {
406
+ const na = {
407
407
  class: "rc-message",
408
408
  role: "alert",
409
409
  "aria-live": "polite"
410
- }, Qt = { class: "rc-message__content" }, Xt = /* @__PURE__ */ ce({
410
+ }, la = { class: "rc-message__content" }, ra = /* @__PURE__ */ de({
411
411
  __name: "index",
412
- setup(e, { expose: r }) {
413
- const d = kt([]);
414
- let l = 1;
415
- function y(p) {
416
- const m = d.findIndex((i) => i.id === p);
417
- m >= 0 && d.splice(m, 1);
418
- }
419
- function b(p, m, i) {
420
- const h = l++;
421
- return d.push({ id: h, type: p, content: m, duration: i }), i > 0 && window.setTimeout(() => y(h), i), h;
422
- }
423
- return r({ add: b, remove: y }), (p, m) => (c(), v("div", Jt, [
424
- E(bt, {
412
+ setup(e, { expose: o }) {
413
+ const d = St([]);
414
+ let n = 1;
415
+ function y(m) {
416
+ const v = d.findIndex((i) => i.id === m);
417
+ v >= 0 && d.splice(v, 1);
418
+ }
419
+ function $(m, v, i) {
420
+ const h = n++;
421
+ return d.push({ id: h, type: m, content: v, duration: i }), i > 0 && window.setTimeout(() => y(h), i), h;
422
+ }
423
+ return o({ add: $, remove: y }), (m, v) => (u(), f("div", na, [
424
+ L(It, {
425
425
  name: "rc-message-fade",
426
426
  tag: "div"
427
427
  }, {
428
- default: ne(() => [
429
- (c(!0), v(H, null, ae(d, (i) => (c(), v("div", {
428
+ default: H(() => [
429
+ (u(!0), f(j, null, te(d, (i) => (u(), f("div", {
430
430
  key: i.id,
431
- class: O(["rc-message__item", `rc-message--${i.type}`])
431
+ class: z(["rc-message__item", `rc-message--${i.type}`])
432
432
  }, [
433
- k("span", Qt, R(i.content), 1)
433
+ k("span", la, T(i.content), 1)
434
434
  ], 2))), 128))
435
435
  ]),
436
436
  _: 1
437
437
  })
438
438
  ]));
439
439
  }
440
- }), Zt = /* @__PURE__ */ ue(Xt, [["__scopeId", "data-v-87811df0"]]);
441
- let me = null, pe = null;
442
- function ea() {
443
- var r;
444
- if (me && pe) return;
445
- me = document.createElement("div"), document.body.appendChild(me);
446
- const e = E(Zt, {});
447
- ft(e, me), pe = (r = e.component) == null ? void 0 : r.exposed;
440
+ }), oa = /* @__PURE__ */ fe(ra, [["__scopeId", "data-v-87811df0"]]);
441
+ let $e = null, be = null;
442
+ function sa() {
443
+ var o;
444
+ if ($e && be) return;
445
+ $e = document.createElement("div"), document.body.appendChild($e);
446
+ const e = L(oa, {});
447
+ _t(e, $e), be = (o = e.component) == null ? void 0 : o.exposed;
448
448
  }
449
- function xe(e, r, d) {
449
+ function Se(e, o, d) {
450
450
  var y;
451
- ea();
452
- const l = typeof d == "number" ? d : e === "loading" ? 0 : 2e3;
453
- return (y = pe == null ? void 0 : pe.add) == null ? void 0 : y.call(pe, e, r, l);
451
+ sa();
452
+ const n = typeof d == "number" ? d : e === "loading" ? 0 : 2e3;
453
+ return (y = be == null ? void 0 : be.add) == null ? void 0 : y.call(be, e, o, n);
454
454
  }
455
- const ta = {
455
+ const ca = {
456
456
  open(e) {
457
- return xe(e.type || "info", e.content, e.duration);
457
+ return Se(e.type || "info", e.content, e.duration);
458
458
  },
459
- info(e, r) {
460
- return xe("info", e, r);
459
+ info(e, o) {
460
+ return Se("info", e, o);
461
461
  },
462
- success(e, r) {
463
- return xe("success", e, r);
462
+ success(e, o) {
463
+ return Se("success", e, o);
464
464
  },
465
- warning(e, r) {
466
- return xe("warning", e, r);
465
+ warning(e, o) {
466
+ return Se("warning", e, o);
467
467
  },
468
- error(e, r) {
469
- return xe("error", e, r);
468
+ error(e, o) {
469
+ return Se("error", e, o);
470
470
  },
471
- loading(e, r) {
472
- return xe("loading", e, r);
471
+ loading(e, o) {
472
+ return Se("loading", e, o);
473
473
  },
474
474
  destroy() {
475
- me && (ft(null, me), me.remove(), me = null, pe = null);
475
+ $e && (_t(null, $e), $e.remove(), $e = null, be = null);
476
476
  }
477
477
  };
478
- function nt(e) {
479
- return e.config.globalProperties.$message = ta, e;
478
+ function it(e) {
479
+ return e.config.globalProperties.$message = ca, e;
480
480
  }
481
481
  J.name = "rc-icon";
482
- function lt(e) {
482
+ function dt(e) {
483
483
  return e.component(J.name, J), e.component("RcIcon", J), e;
484
484
  }
485
- const aa = { class: "rc-popup__content" }, na = /* @__PURE__ */ ce({
485
+ const ua = { class: "rc-popup__content" }, ia = /* @__PURE__ */ de({
486
486
  name: "rc-popup",
487
487
  __name: "index",
488
488
  props: {
@@ -500,113 +500,116 @@ const aa = { class: "rc-popup__content" }, na = /* @__PURE__ */ ce({
500
500
  lockScroll: { type: Boolean, default: !0 }
501
501
  },
502
502
  emits: ["update:modelValue", "open", "close", "click-overlay"],
503
- setup(e, { expose: r, emit: d }) {
504
- const l = e, y = d, b = I(), p = I(l.modelValue);
505
- be(
506
- () => l.modelValue,
507
- (s) => {
508
- p.value = s, s ? (y("open"), l.lockScroll && A()) : (y("close"), l.lockScroll && $());
503
+ setup(e, { expose: o, emit: d }) {
504
+ const n = e, y = d, $ = M(), m = M(n.modelValue);
505
+ we(
506
+ () => n.modelValue,
507
+ (c) => {
508
+ m.value = c, c ? (y("open"), n.lockScroll && F()) : (y("close"), n.lockScroll && D());
509
509
  },
510
510
  { immediate: !0 }
511
- ), be(p, (s) => {
512
- s !== l.modelValue && y("update:modelValue", s);
511
+ ), we(m, (c) => {
512
+ c !== n.modelValue && y("update:modelValue", c);
513
513
  });
514
- const m = M(() => `rc-popup-slide-${l.position}`), i = M(() => ({ ...l.popupStyle || {} }));
514
+ const v = R(() => `rc-popup-slide-${n.position}`), i = R(() => ({ ...n.popupStyle || {} }));
515
515
  let h = !1;
516
- function A() {
516
+ function F() {
517
517
  h || (h = !0, document.body.style.overflow = "hidden");
518
518
  }
519
- function $() {
519
+ function D() {
520
520
  h && (h = !1, document.body.style.overflow = "");
521
521
  }
522
- function g() {
523
- y("click-overlay"), l.closeOnClickOverlay && V();
522
+ function _() {
523
+ y("click-overlay"), n.closeOnClickOverlay && V();
524
524
  }
525
- function D() {
525
+ function I() {
526
526
  V();
527
527
  }
528
528
  function V() {
529
- p.value = !1;
529
+ m.value = !1;
530
530
  }
531
531
  function x() {
532
- p.value = !0;
532
+ m.value = !0;
533
533
  }
534
- return Ke(() => {
535
- $();
536
- }), r({
534
+ return tt(() => {
535
+ D();
536
+ }), o({
537
537
  open: x,
538
538
  close: V,
539
- visible: p
540
- }), (s, fe) => (c(), ie(dt, { to: "body" }, [
541
- E(we, { name: "rc-popup-fade" }, {
542
- default: ne(() => [
543
- p.value && l.overlay ? (c(), v("div", {
539
+ visible: m
540
+ }), (c, ge) => (u(), ue(gt, { to: "body" }, [
541
+ L(Re, { name: "rc-popup-fade" }, {
542
+ default: H(() => [
543
+ m.value && n.overlay ? (u(), f("div", {
544
544
  key: 0,
545
- class: O(["rc-popup__overlay", { "rc-popup__overlay--transparent": l.overlayClass === "transparent" }]),
546
- style: X(l.overlayStyle),
547
- onClick: g
548
- }, null, 6)) : w("", !0)
545
+ class: z(["rc-popup__overlay", { "rc-popup__overlay--transparent": n.overlayClass === "transparent" }]),
546
+ style: ae(n.overlayStyle),
547
+ onClick: _
548
+ }, null, 6)) : S("", !0)
549
549
  ]),
550
550
  _: 1
551
551
  }),
552
- E(we, { name: m.value }, {
553
- default: ne(() => [
554
- p.value ? (c(), v("div", {
552
+ L(Re, { name: v.value }, {
553
+ default: H(() => [
554
+ m.value ? (u(), f("div", {
555
555
  key: 0,
556
556
  ref_key: "popupRef",
557
- ref: b,
558
- class: O(["rc-popup", [
557
+ ref: $,
558
+ class: z(["rc-popup", [
559
559
  `rc-popup--${e.position}`,
560
560
  { "rc-popup--round": e.round }
561
561
  ]]),
562
- style: X(i.value),
563
- onClick: fe[0] || (fe[0] = $t(() => {
562
+ style: ae(i.value),
563
+ onClick: ge[0] || (ge[0] = Mt(() => {
564
564
  }, ["stop"]))
565
565
  }, [
566
- e.closeable ? (c(), v("div", {
566
+ e.closeable ? (u(), f("div", {
567
567
  key: 0,
568
- class: O(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
569
- onClick: D
568
+ class: z(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
569
+ onClick: I
570
570
  }, [
571
- E(J, {
571
+ L(J, {
572
572
  name: e.closeIcon,
573
573
  class: "rc-popup__close-icon"
574
574
  }, null, 8, ["name"])
575
- ], 2)) : w("", !0),
576
- k("div", aa, [
577
- q(s.$slots, "default", {}, void 0, !0)
575
+ ], 2)) : S("", !0),
576
+ k("div", ua, [
577
+ q(c.$slots, "default", {}, void 0, !0)
578
578
  ])
579
- ], 6)) : w("", !0)
579
+ ], 6)) : S("", !0)
580
580
  ]),
581
581
  _: 3
582
582
  }, 8, ["name"])
583
583
  ]));
584
584
  }
585
- }), Ve = /* @__PURE__ */ ue(na, [["__scopeId", "data-v-f1696784"]]);
586
- Ve.name = "rc-popup";
587
- const la = "RcPopup";
588
- function rt(e) {
589
- return e.component(Ve.name, Ve), e.component(la, Ve), e;
585
+ }), Fe = /* @__PURE__ */ fe(ia, [["__scopeId", "data-v-f1696784"]]);
586
+ Fe.name = "rc-popup";
587
+ const da = "RcPopup";
588
+ function ft(e) {
589
+ return e.component(Fe.name, Fe), e.component(da, Fe), e;
590
590
  }
591
- const ra = {
591
+ const fa = {
592
592
  key: 0,
593
593
  class: "rc-calendar__header"
594
- }, oa = { class: "rc-calendar__header-title" }, sa = { class: "rc-calendar__month-title" }, ca = { class: "rc-calendar__weekdays" }, ua = { class: "rc-calendar__days" }, ia = ["onClick"], da = { class: "rc-calendar__day-content" }, fa = { class: "rc-calendar__day-text" }, va = {
594
+ }, va = { class: "rc-calendar__header-title" }, pa = {
595
+ key: 1,
596
+ class: "rc-calendar__shortcuts"
597
+ }, ma = { class: "rc-calendar__shortcuts-scroll" }, ya = ["onClick"], ha = { class: "rc-calendar__month-title" }, ga = { class: "rc-calendar__weekdays" }, _a = { class: "rc-calendar__days" }, ka = ["onClick"], ba = { class: "rc-calendar__day-content" }, $a = { class: "rc-calendar__day-text" }, Da = {
595
598
  key: 0,
596
599
  class: "rc-calendar__day-bottom"
597
- }, pa = {
598
- key: 1,
600
+ }, xa = {
601
+ key: 2,
599
602
  class: "rc-calendar__footer"
600
- }, ma = {
603
+ }, wa = {
601
604
  key: 0,
602
605
  class: "rc-calendar__month-picker-overlay"
603
- }, ya = { class: "rc-calendar__month-picker" }, ha = { class: "rc-calendar__month-picker-header" }, ga = { class: "rc-calendar__month-picker-title" }, _a = { key: 0 }, ka = {
606
+ }, Ca = { class: "rc-calendar__month-picker" }, Sa = { class: "rc-calendar__month-picker-header" }, Ia = { class: "rc-calendar__month-picker-title" }, Ma = { key: 0 }, Ra = {
604
607
  key: 0,
605
608
  class: "rc-calendar__year-picker-content"
606
- }, ba = { class: "rc-calendar__year-picker-grid" }, $a = ["onClick"], xa = {
609
+ }, Va = { class: "rc-calendar__year-picker-grid" }, Ta = ["onClick"], Aa = {
607
610
  key: 1,
608
611
  class: "rc-calendar__month-picker-content"
609
- }, Ca = ["onClick"], Fe = 48, Q = 3, Oe = 7, Da = /* @__PURE__ */ ce({
612
+ }, Fa = ["onClick"], je = 48, ee = 3, Ze = 7, Ya = /* @__PURE__ */ de({
610
613
  __name: "panel-content",
611
614
  props: {
612
615
  showTitle: { type: Boolean },
@@ -619,336 +622,504 @@ const ra = {
619
622
  maxDate: {},
620
623
  disabledDate: { type: Function },
621
624
  formatter: { type: Function },
622
- showFooter: { type: Boolean }
625
+ showFooter: { type: Boolean },
626
+ maxRangeDays: {}
623
627
  },
624
- emits: ["select-day", "clear", "confirm"],
625
- setup(e, { expose: r, emit: d }) {
626
- const l = e, y = d, b = ["日", "一", "二", "三", "四", "五", "六"];
627
- function p(a) {
628
- if (!a) return null;
629
- const u = new Date(a);
630
- return isNaN(u.getTime()) ? null : u;
631
- }
632
- function m(a) {
633
- const u = a.getFullYear(), f = String(a.getMonth() + 1).padStart(2, "0"), S = String(a.getDate()).padStart(2, "0");
634
- return `${u}-${f}-${S}`;
635
- }
636
- const i = I(/* @__PURE__ */ new Date());
637
- be(
638
- () => [l.selectedDate, l.rangeStart],
628
+ emits: ["select-day", "clear", "confirm", "shortcut-select"],
629
+ setup(e, { expose: o, emit: d }) {
630
+ const n = e, y = d, $ = ["日", "一", "二", "三", "四", "五", "六"];
631
+ function m(t) {
632
+ if (!t) return null;
633
+ const l = new Date(t);
634
+ return isNaN(l.getTime()) ? null : l;
635
+ }
636
+ function v(t) {
637
+ const l = t.getFullYear(), p = String(t.getMonth() + 1).padStart(2, "0"), C = String(t.getDate()).padStart(2, "0");
638
+ return `${l}-${p}-${C}`;
639
+ }
640
+ const i = M(/* @__PURE__ */ new Date());
641
+ we(
642
+ () => [n.selectedDate, n.rangeStart],
639
643
  () => {
640
- if (l.range && l.rangeStart) {
641
- const a = p(l.rangeStart);
642
- a && (i.value = a);
643
- } else if (!l.range && l.selectedDate) {
644
- const a = p(l.selectedDate);
645
- a && (i.value = a);
644
+ if (n.range && n.rangeStart) {
645
+ const t = m(n.rangeStart);
646
+ t && (i.value = t);
647
+ } else if (!n.range && n.selectedDate) {
648
+ const t = m(n.selectedDate);
649
+ t && (i.value = t);
646
650
  }
647
651
  },
648
652
  { immediate: !0 }
649
653
  );
650
- function h(a) {
651
- const u = /* @__PURE__ */ new Date();
652
- return a.getFullYear() === u.getFullYear() && a.getMonth() === u.getMonth() && a.getDate() === u.getDate();
654
+ function h(t) {
655
+ const l = /* @__PURE__ */ new Date();
656
+ return t.getFullYear() === l.getFullYear() && t.getMonth() === l.getMonth() && t.getDate() === l.getDate();
653
657
  }
654
- function A(a) {
655
- if (!l.rangeStart || !l.rangeEnd) return !1;
656
- const u = m(a), f = l.rangeStart, S = l.rangeEnd;
657
- return u > f && u < S;
658
+ function F(t) {
659
+ if (!n.rangeStart || !n.rangeEnd) return !1;
660
+ const l = v(t), p = n.rangeStart, C = n.rangeEnd;
661
+ return l > p && l < C;
658
662
  }
659
- function $(a) {
660
- if (l.disabledDate && l.disabledDate(a))
663
+ function D(t) {
664
+ if (n.disabledDate && n.disabledDate(t))
661
665
  return !0;
662
- const u = m(a);
663
- return !!(l.minDate && u < l.minDate || l.maxDate && u > l.maxDate);
664
- }
665
- function g(a, u) {
666
- const f = new Date(a, u, 1), S = new Date(a, u + 1, 0), B = f.getDay(), te = S.getDate(), re = [], Se = new Date(a, u, 0).getDate();
667
- for (let W = B - 1; W >= 0; W--) {
668
- const z = {
669
- date: new Date(a, u - 1, Se - W),
666
+ const l = v(t);
667
+ return !!(n.minDate && l < n.minDate || n.maxDate && l > n.maxDate);
668
+ }
669
+ function _(t, l) {
670
+ const p = new Date(t, l, 1), C = new Date(t, l + 1, 0), P = p.getDay(), ye = C.getDate(), he = [], nt = new Date(t, l, 0).getDate();
671
+ for (let Q = P - 1; Q >= 0; Q--) {
672
+ const X = {
673
+ date: new Date(t, l - 1, nt - Q),
670
674
  type: "prev-month",
671
- text: String(Se - W)
675
+ text: String(nt - Q)
672
676
  };
673
- if (l.formatter) {
674
- const U = l.formatter(z);
675
- U.text && (z.text = U.text), U.bottomInfo && (z.bottomInfo = U.bottomInfo);
677
+ if (n.formatter) {
678
+ const Z = n.formatter(X);
679
+ Z.text && (X.text = Z.text), Z.bottomInfo && (X.bottomInfo = Z.bottomInfo);
676
680
  }
677
- re.push(z);
681
+ he.push(X);
678
682
  }
679
- for (let W = 1; W <= te; W++) {
680
- const z = {
681
- date: new Date(a, u, W),
683
+ for (let Q = 1; Q <= ye; Q++) {
684
+ const X = {
685
+ date: new Date(t, l, Q),
682
686
  type: "current-month",
683
- text: String(W)
687
+ text: String(Q)
684
688
  };
685
- if (l.formatter) {
686
- const U = l.formatter(z);
687
- U.text && (z.text = U.text), U.bottomInfo && (z.bottomInfo = U.bottomInfo);
689
+ if (n.formatter) {
690
+ const Z = n.formatter(X);
691
+ Z.text && (X.text = Z.text), Z.bottomInfo && (X.bottomInfo = Z.bottomInfo);
688
692
  }
689
- re.push(z);
693
+ he.push(X);
690
694
  }
691
- const Be = 42 - re.length;
692
- for (let W = 1; W <= Be; W++) {
693
- const z = {
694
- date: new Date(a, u + 1, W),
695
+ const xt = 42 - he.length;
696
+ for (let Q = 1; Q <= xt; Q++) {
697
+ const X = {
698
+ date: new Date(t, l + 1, Q),
695
699
  type: "next-month",
696
- text: String(W)
700
+ text: String(Q)
697
701
  };
698
- if (l.formatter) {
699
- const U = l.formatter(z);
700
- U.text && (z.text = U.text), U.bottomInfo && (z.bottomInfo = U.bottomInfo);
702
+ if (n.formatter) {
703
+ const Z = n.formatter(X);
704
+ Z.text && (X.text = Z.text), Z.bottomInfo && (X.bottomInfo = Z.bottomInfo);
701
705
  }
702
- re.push(z);
706
+ he.push(X);
703
707
  }
704
- return re;
705
- }
706
- const D = M(() => {
707
- const a = i.value.getFullYear(), u = i.value.getMonth();
708
- return g(a, u);
709
- }), V = M(() => {
710
- const a = i.value.getFullYear(), u = i.value.getMonth() + 1;
711
- return `${a}年${u}月`;
708
+ return he;
709
+ }
710
+ const I = R(() => {
711
+ const t = i.value.getFullYear(), l = i.value.getMonth();
712
+ return _(t, l);
713
+ }), V = R(() => {
714
+ const t = i.value.getFullYear(), l = i.value.getMonth() + 1;
715
+ return `${t}年${l}月`;
712
716
  });
713
- function x(a) {
714
- const u = [];
715
- if (a.type !== "current-month" && u.push("is-other-month"), h(a.date) && u.push("is-today"), $(a.date))
716
- return u.push("is-disabled"), u;
717
- const f = m(a.date);
718
- return l.range ? (l.rangeStart === f && u.push("is-start"), l.rangeEnd === f && u.push("is-end"), A(a.date) && u.push("is-in-range")) : l.selectedDate === f && u.push("is-selected"), u;
719
- }
720
- const s = M(() => !!(l.rangeStart && l.rangeEnd)), fe = M(() => l.rangeStart && l.rangeEnd ? 2 : l.rangeStart || l.rangeEnd ? 1 : 0);
721
- function he(a) {
722
- if (!l.minDate && !l.maxDate)
717
+ function x(t) {
718
+ const l = [];
719
+ if (t.type !== "current-month" && l.push("is-other-month"), h(t.date) && l.push("is-today"), D(t.date))
720
+ return l.push("is-disabled"), l;
721
+ const p = v(t.date);
722
+ return n.range ? (n.rangeStart === p && l.push("is-start"), n.rangeEnd === p && l.push("is-end"), F(t.date) && l.push("is-in-range")) : n.selectedDate === p && l.push("is-selected"), l;
723
+ }
724
+ const c = R(() => !!(n.rangeStart && n.rangeEnd)), ge = R(() => n.rangeStart && n.rangeEnd ? 2 : n.rangeStart || n.rangeEnd ? 1 : 0);
725
+ function _e(t) {
726
+ if (!n.minDate && !n.maxDate)
723
727
  return !1;
724
- const u = l.minDate ? p(l.minDate) : null, f = l.maxDate ? p(l.maxDate) : null;
725
- return !!(u && a < u.getFullYear() || f && a > f.getFullYear());
726
- }
727
- function ve(a, u) {
728
- const f = l.minDate ? p(l.minDate) : null, S = l.maxDate ? p(l.maxDate) : null;
729
- if (f) {
730
- const B = f.getFullYear(), te = f.getMonth() + 1;
731
- if (a < B || a === B && u < te)
728
+ const l = n.minDate ? m(n.minDate) : null, p = n.maxDate ? m(n.maxDate) : null;
729
+ return !!(l && t < l.getFullYear() || p && t > p.getFullYear());
730
+ }
731
+ function ve(t, l) {
732
+ const p = n.minDate ? m(n.minDate) : null, C = n.maxDate ? m(n.maxDate) : null;
733
+ if (p) {
734
+ const P = p.getFullYear(), ye = p.getMonth() + 1;
735
+ if (t < P || t === P && l < ye)
732
736
  return !0;
733
737
  }
734
- if (S) {
735
- const B = S.getFullYear(), te = S.getMonth() + 1;
736
- if (a > B || a === B && u > te)
738
+ if (C) {
739
+ const P = C.getFullYear(), ye = C.getMonth() + 1;
740
+ if (t > P || t === P && l > ye)
737
741
  return !0;
738
742
  }
739
743
  return !1;
740
744
  }
741
- const G = I(!1), Y = I("year"), P = I(i.value.getFullYear()), oe = I(i.value.getMonth() + 1), Z = I(), ee = I(1900), L = I(1920), F = I(1900), _ = I(2100), C = M(() => {
742
- const a = [], f = Math.floor((ee.value - F.value) / Q) - 3, S = Math.ceil((L.value - F.value) / Q) + 3, B = F.value + Math.max(0, f) * Q, te = F.value + S * Q - 1;
743
- for (let re = B; re <= te; re++)
744
- a.push(re);
745
- return a;
745
+ const K = M(!1), E = M("year"), W = M(i.value.getFullYear()), ne = M(i.value.getMonth() + 1), le = M(), re = M(1900), U = M(1920), N = M(1900), oe = M(2100), b = R(() => {
746
+ const t = [], p = Math.floor((re.value - N.value) / ee) - 3, C = Math.ceil((U.value - N.value) / ee) + 3, P = N.value + Math.max(0, p) * ee, ye = N.value + C * ee - 1;
747
+ for (let he = P; he <= ye; he++)
748
+ t.push(he);
749
+ return t;
746
750
  });
747
- be(() => i.value, (a) => {
748
- P.value = a.getFullYear(), oe.value = a.getMonth() + 1;
751
+ we(() => i.value, (t) => {
752
+ W.value = t.getFullYear(), ne.value = t.getMonth() + 1;
749
753
  }, { immediate: !0 });
750
- function T() {
751
- if (!Z.value) return;
752
- const a = Z.value.scrollTop, f = Math.max(0, Math.floor(a / Fe)), S = F.value + f * Q, B = S + Oe * Q - 1;
753
- S < F.value ? F.value = S - 100 : B > _.value && (_.value = B + 100), (S !== ee.value || B !== L.value) && (ee.value = S, L.value = B);
754
+ function w() {
755
+ if (!le.value) return;
756
+ const t = le.value.scrollTop, p = Math.max(0, Math.floor(t / je)), C = N.value + p * ee, P = C + Ze * ee - 1;
757
+ C < N.value ? N.value = C - 100 : P > oe.value && (oe.value = P + 100), (C !== re.value || P !== U.value) && (re.value = C, U.value = P);
754
758
  }
755
- function K() {
756
- P.value = i.value.getFullYear(), oe.value = i.value.getMonth() + 1, Y.value = "year", G.value = !0;
757
- const a = P.value;
758
- a < F.value ? F.value = Math.floor(a / 100) * 100 : a > _.value && (_.value = Math.ceil(a / 100) * 100 + 99), Ge(() => {
759
- if (Z.value) {
760
- const u = Math.floor((a - F.value) / Q), f = Math.max(0, u - 2);
761
- ee.value = F.value + f * Q, L.value = ee.value + Oe * Q - 1, le(a);
759
+ function Y() {
760
+ W.value = i.value.getFullYear(), ne.value = i.value.getMonth() + 1, E.value = "year", K.value = !0;
761
+ const t = W.value;
762
+ t < N.value ? N.value = Math.floor(t / 100) * 100 : t > oe.value && (oe.value = Math.ceil(t / 100) * 100 + 99), et(() => {
763
+ if (le.value) {
764
+ const l = Math.floor((t - N.value) / ee), p = Math.max(0, l - 2);
765
+ re.value = N.value + p * ee, U.value = re.value + Ze * ee - 1, O(t);
762
766
  }
763
767
  });
764
768
  }
765
- function le(a) {
766
- if (!Z.value) return;
767
- a < F.value ? F.value = Math.floor(a / 100) * 100 : a > _.value && (_.value = Math.ceil(a / 100) * 100 + 99);
768
- const u = Math.floor((a - F.value) / Q), f = u * Fe;
769
- Z.value.scrollTop = f;
770
- const S = Math.max(0, u - 2);
771
- ee.value = F.value + S * Q, L.value = ee.value + Oe * Q - 1;
769
+ function O(t) {
770
+ if (!le.value) return;
771
+ t < N.value ? N.value = Math.floor(t / 100) * 100 : t > oe.value && (oe.value = Math.ceil(t / 100) * 100 + 99);
772
+ const l = Math.floor((t - N.value) / ee), p = l * je;
773
+ le.value.scrollTop = p;
774
+ const C = Math.max(0, l - 2);
775
+ re.value = N.value + C * ee, U.value = re.value + Ze * ee - 1;
772
776
  }
773
- function Ae() {
774
- const a = new Date(i.value);
775
- a.setMonth(a.getMonth() - 1), i.value = a;
777
+ function se() {
778
+ const t = new Date(i.value);
779
+ t.setMonth(t.getMonth() - 1), i.value = t;
776
780
  }
777
- function Ye() {
778
- const a = new Date(i.value);
779
- a.setMonth(a.getMonth() + 1), i.value = a;
781
+ function Je() {
782
+ const t = new Date(i.value);
783
+ t.setMonth(t.getMonth() + 1), i.value = t;
780
784
  }
781
- function Pe(a) {
782
- he(a) || (P.value = a, Y.value = "month");
785
+ function Qe(t) {
786
+ _e(t) || (W.value = t, E.value = "month");
783
787
  }
784
- function Le(a) {
785
- ve(P.value, a) || (oe.value = a, We());
788
+ function Xe(t) {
789
+ ve(W.value, t) || (ne.value = t, Be());
786
790
  }
787
- function We() {
788
- const a = new Date(i.value);
789
- a.setFullYear(P.value), a.setMonth(oe.value - 1), i.value = a, G.value = !1, Y.value = "year";
791
+ function Be() {
792
+ const t = new Date(i.value);
793
+ t.setFullYear(W.value), t.setMonth(ne.value - 1), i.value = t, K.value = !1, E.value = "year";
790
794
  }
791
- function Te(a) {
792
- y("select-day", a);
795
+ function Ee(t) {
796
+ y("select-day", t);
793
797
  }
794
- function ze() {
798
+ function Ne() {
795
799
  y("clear");
796
800
  }
797
- function t() {
801
+ function a() {
802
+ ce.value && Ne();
803
+ }
804
+ function r() {
798
805
  y("confirm");
799
806
  }
800
- function n() {
801
- G.value = !1;
807
+ function s() {
808
+ K.value = !1;
809
+ }
810
+ function g(t) {
811
+ E.value = t;
812
+ }
813
+ function B() {
814
+ const l = (/* @__PURE__ */ new Date()).getFullYear();
815
+ _e(l) || (W.value = l, E.value = "month");
816
+ }
817
+ function A() {
818
+ const l = (/* @__PURE__ */ new Date()).getMonth() + 1;
819
+ ve(W.value, l) || (ne.value = l, Be());
820
+ }
821
+ const ce = R(() => n.range ? !!(n.rangeStart || n.rangeEnd) : !!n.selectedDate);
822
+ function ke(t, l) {
823
+ const p = m(t), C = m(l);
824
+ if (!p || !C) return 0;
825
+ const P = Math.abs(C.getTime() - p.getTime());
826
+ return Math.ceil(P / (1e3 * 60 * 60 * 24)) + 1;
827
+ }
828
+ function me() {
829
+ return v(/* @__PURE__ */ new Date());
830
+ }
831
+ function Ve() {
832
+ const t = /* @__PURE__ */ new Date(), l = t.getDay(), p = t.getDate() - l + (l === 0 ? -6 : 1);
833
+ return new Date(t.getFullYear(), t.getMonth(), p);
834
+ }
835
+ function Pe() {
836
+ const t = Ve(), l = new Date(t);
837
+ return l.setDate(t.getDate() + 6), l;
838
+ }
839
+ function Le() {
840
+ const t = /* @__PURE__ */ new Date();
841
+ return new Date(t.getFullYear(), t.getMonth(), 1);
842
+ }
843
+ function Te() {
844
+ const t = /* @__PURE__ */ new Date();
845
+ return new Date(t.getFullYear(), t.getMonth() + 1, 0);
846
+ }
847
+ function We() {
848
+ const t = /* @__PURE__ */ new Date();
849
+ return new Date(t.getFullYear(), t.getMonth() - 2, 1);
850
+ }
851
+ function ze() {
852
+ const t = /* @__PURE__ */ new Date();
853
+ return new Date(t.getFullYear(), 0, 1);
802
854
  }
803
- function o(a) {
804
- Y.value = a;
855
+ function Ue() {
856
+ const t = /* @__PURE__ */ new Date();
857
+ return new Date(t.getFullYear(), 11, 31);
858
+ }
859
+ const Oe = [
860
+ {
861
+ key: "today",
862
+ label: "本日",
863
+ days: 1,
864
+ getRange: () => {
865
+ const t = me();
866
+ return [t, t];
867
+ }
868
+ },
869
+ {
870
+ key: "week",
871
+ label: "本周",
872
+ days: 7,
873
+ getRange: () => {
874
+ const t = v(Ve()), l = v(Pe());
875
+ return [t, l];
876
+ }
877
+ },
878
+ {
879
+ key: "month",
880
+ label: "本月",
881
+ getRange: () => {
882
+ const t = v(Le()), l = v(Te());
883
+ return [t, l];
884
+ }
885
+ },
886
+ {
887
+ key: "threeMonths",
888
+ label: "近三月",
889
+ getRange: () => {
890
+ const t = v(We()), l = v(Te());
891
+ return [t, l];
892
+ }
893
+ },
894
+ {
895
+ key: "year",
896
+ label: "本年",
897
+ getRange: () => {
898
+ const t = v(ze()), l = v(Ue());
899
+ return [t, l];
900
+ }
901
+ },
902
+ {
903
+ key: "last7Days",
904
+ label: "近7天",
905
+ days: 7,
906
+ getRange: () => {
907
+ const t = /* @__PURE__ */ new Date(), l = new Date(t);
908
+ return l.setDate(t.getDate() - 6), [v(l), me()];
909
+ }
910
+ },
911
+ {
912
+ key: "last30Days",
913
+ label: "近30天",
914
+ days: 30,
915
+ getRange: () => {
916
+ const t = /* @__PURE__ */ new Date(), l = new Date(t);
917
+ return l.setDate(t.getDate() - 29), [v(l), me()];
918
+ }
919
+ }
920
+ ], Ge = R(() => Oe.filter((t) => {
921
+ if (n.maxRangeDays !== void 0) {
922
+ if (t.days !== void 0)
923
+ return t.days <= n.maxRangeDays;
924
+ {
925
+ const l = t.getRange();
926
+ if (l)
927
+ return ke(l[0], l[1]) <= n.maxRangeDays;
928
+ }
929
+ }
930
+ return !0;
931
+ }));
932
+ function Ke(t) {
933
+ const l = t.getRange();
934
+ if (l) {
935
+ if (n.minDate && l[0] < n.minDate || n.maxDate && l[1] > n.maxDate)
936
+ return;
937
+ y("shortcut-select", l);
938
+ }
805
939
  }
806
- return r({
807
- yearScrollRef: Z
808
- }), (a, u) => (c(), v("div", null, [
809
- e.showTitle ? (c(), v("div", ra, [
810
- k("div", oa, R(e.title), 1)
811
- ])) : w("", !0),
812
- k("div", sa, [
940
+ return o({
941
+ yearScrollRef: le
942
+ }), (t, l) => (u(), f("div", null, [
943
+ e.showTitle ? (u(), f("div", fa, [
944
+ k("div", va, T(e.title), 1),
945
+ k("span", {
946
+ class: z(["rc-calendar__header-clear", { "is-disabled": !ce.value }]),
947
+ onClick: a
948
+ }, " 清空 ", 2)
949
+ ])) : S("", !0),
950
+ e.range ? (u(), f("div", pa, [
951
+ k("div", ma, [
952
+ (u(!0), f(j, null, te(Ge.value, (p) => (u(), f("div", {
953
+ key: p.key,
954
+ class: "rc-calendar__shortcut-item",
955
+ onClick: (C) => Ke(p)
956
+ }, T(p.label), 9, ya))), 128))
957
+ ])
958
+ ])) : S("", !0),
959
+ k("div", ha, [
813
960
  k("div", {
814
961
  class: "rc-calendar__nav-button",
815
- onClick: Ae
962
+ onClick: se
816
963
  }, [
817
- E(j(J), {
964
+ L(G(J), {
818
965
  name: "icon_caret-left",
819
966
  class: "rc-calendar__nav-icon"
820
967
  })
821
968
  ]),
822
969
  k("div", {
823
970
  class: "rc-calendar__month-text",
824
- onClick: K
825
- }, R(V.value), 1),
971
+ onClick: Y
972
+ }, T(V.value), 1),
826
973
  k("div", {
827
974
  class: "rc-calendar__nav-button",
828
- onClick: Ye
975
+ onClick: Je
829
976
  }, [
830
- E(j(J), {
977
+ L(G(J), {
831
978
  name: "icon_caret-right",
832
979
  class: "rc-calendar__nav-icon"
833
980
  })
834
981
  ])
835
982
  ]),
836
- k("div", ca, [
837
- (c(), v(H, null, ae(b, (f) => k("div", {
838
- key: f,
983
+ k("div", ga, [
984
+ (u(), f(j, null, te($, (p) => k("div", {
985
+ key: p,
839
986
  class: "rc-calendar__weekday"
840
- }, R(f), 1)), 64))
987
+ }, T(p), 1)), 64))
841
988
  ]),
842
- k("div", ua, [
843
- (c(!0), v(H, null, ae(D.value, (f, S) => (c(), v("div", {
844
- key: S,
845
- class: O(["rc-calendar__day", x(f)]),
846
- onClick: (B) => Te(f)
989
+ k("div", _a, [
990
+ (u(!0), f(j, null, te(I.value, (p, C) => (u(), f("div", {
991
+ key: C,
992
+ class: z(["rc-calendar__day", x(p)]),
993
+ onClick: (P) => Ee(p)
847
994
  }, [
848
- k("div", da, [
849
- k("span", fa, R(f.text), 1),
850
- f.bottomInfo ? (c(), v("span", va, R(f.bottomInfo), 1)) : w("", !0)
995
+ k("div", ba, [
996
+ k("span", $a, T(p.text), 1),
997
+ p.bottomInfo ? (u(), f("span", Da, T(p.bottomInfo), 1)) : S("", !0)
851
998
  ])
852
- ], 10, ia))), 128))
999
+ ], 10, ka))), 128))
853
1000
  ]),
854
- e.range && e.showFooter ? (c(), v("div", pa, [
855
- E(j(ye), {
1001
+ e.range && e.showFooter ? (u(), f("div", xa, [
1002
+ L(G(pe), {
856
1003
  type: "default",
857
1004
  class: "rc-calendar__footer-reset",
858
- onClick: ze
1005
+ onClick: Ne
859
1006
  }, {
860
- default: ne(() => [...u[2] || (u[2] = [
861
- de("取消", -1)
1007
+ default: H(() => [...l[2] || (l[2] = [
1008
+ ie("取消", -1)
862
1009
  ])]),
863
1010
  _: 1
864
1011
  }),
865
- E(j(ye), {
1012
+ L(G(pe), {
866
1013
  type: "primary",
867
1014
  class: "rc-calendar__footer-confirm",
868
- disabled: !s.value,
869
- onClick: t
1015
+ disabled: !c.value,
1016
+ onClick: r
870
1017
  }, {
871
- default: ne(() => [
872
- de(R(s.value ? `确定(${fe.value}项)` : "确定"), 1)
1018
+ default: H(() => [
1019
+ ie(T(c.value ? `确定(${ge.value}项)` : "确定"), 1)
873
1020
  ]),
874
1021
  _: 1
875
1022
  }, 8, ["disabled"])
876
- ])) : w("", !0),
877
- E(we, { name: "rc-calendar-fade" }, {
878
- default: ne(() => [
879
- G.value ? (c(), v("div", ma, [
880
- k("div", ya, [
881
- k("div", ha, [
882
- E(j(ye), {
1023
+ ])) : S("", !0),
1024
+ L(Re, { name: "rc-calendar-fade" }, {
1025
+ default: H(() => [
1026
+ K.value ? (u(), f("div", wa, [
1027
+ k("div", Ca, [
1028
+ k("div", Sa, [
1029
+ L(G(pe), {
883
1030
  type: "default",
884
1031
  mode: "text",
885
1032
  size: "small",
886
- onClick: n
1033
+ onClick: s
887
1034
  }, {
888
- default: ne(() => [...u[3] || (u[3] = [
889
- de("取消", -1)
1035
+ default: H(() => [...l[3] || (l[3] = [
1036
+ ie("取消", -1)
890
1037
  ])]),
891
1038
  _: 1
892
1039
  }),
893
- k("div", ga, [
1040
+ k("div", Ia, [
894
1041
  k("span", {
895
- onClick: u[0] || (u[0] = (f) => o("year"))
896
- }, R(P.value) + "年", 1),
897
- Y.value === "month" ? (c(), v("span", _a, " - ")) : w("", !0),
898
- Y.value === "month" ? (c(), v("span", {
1042
+ onClick: l[0] || (l[0] = (p) => g("year"))
1043
+ }, T(W.value) + "年", 1),
1044
+ E.value === "month" ? (u(), f("span", Ma, " - ")) : S("", !0),
1045
+ E.value === "month" ? (u(), f("span", {
899
1046
  key: 1,
900
- onClick: u[1] || (u[1] = (f) => o("month"))
901
- }, R(oe.value) + "月", 1)) : w("", !0)
902
- ])
1047
+ onClick: l[1] || (l[1] = (p) => g("month"))
1048
+ }, T(ne.value) + "月", 1)) : S("", !0)
1049
+ ]),
1050
+ E.value === "year" ? (u(), ue(G(pe), {
1051
+ key: 0,
1052
+ type: "primary",
1053
+ mode: "text",
1054
+ size: "small",
1055
+ onClick: B
1056
+ }, {
1057
+ default: H(() => [...l[4] || (l[4] = [
1058
+ ie(" 本年 ", -1)
1059
+ ])]),
1060
+ _: 1
1061
+ })) : S("", !0),
1062
+ E.value === "month" ? (u(), ue(G(pe), {
1063
+ key: 1,
1064
+ type: "primary",
1065
+ mode: "text",
1066
+ size: "small",
1067
+ onClick: A
1068
+ }, {
1069
+ default: H(() => [...l[5] || (l[5] = [
1070
+ ie(" 本月 ", -1)
1071
+ ])]),
1072
+ _: 1
1073
+ })) : S("", !0)
903
1074
  ]),
904
- Y.value === "year" ? (c(), v("div", ka, [
1075
+ E.value === "year" ? (u(), f("div", Ra, [
905
1076
  k("div", {
906
1077
  class: "rc-calendar__year-picker-scroll",
907
1078
  ref_key: "yearScrollRef",
908
- ref: Z,
909
- onScroll: T
1079
+ ref: le,
1080
+ onScroll: w
910
1081
  }, [
911
1082
  k("div", {
912
1083
  class: "rc-calendar__year-picker-spacer",
913
- style: X({ height: `${Math.floor((ee.value - F.value) / Q) * Fe}px` })
1084
+ style: ae({ height: `${Math.floor((re.value - N.value) / ee) * je}px` })
914
1085
  }, null, 4),
915
- k("div", ba, [
916
- (c(!0), v(H, null, ae(C.value, (f) => (c(), v("div", {
917
- key: f,
918
- class: O(["rc-calendar__year-picker-item", {
919
- "is-selected": P.value === f,
920
- "is-disabled": he(f)
1086
+ k("div", Va, [
1087
+ (u(!0), f(j, null, te(b.value, (p) => (u(), f("div", {
1088
+ key: p,
1089
+ class: z(["rc-calendar__year-picker-item", {
1090
+ "is-selected": W.value === p,
1091
+ "is-disabled": _e(p)
921
1092
  }]),
922
- onClick: (S) => Pe(f)
923
- }, R(f), 11, $a))), 128))
1093
+ onClick: (C) => Qe(p)
1094
+ }, T(p), 11, Ta))), 128))
924
1095
  ]),
925
1096
  k("div", {
926
1097
  class: "rc-calendar__year-picker-spacer",
927
- style: X({ height: `${Math.ceil((_.value - L.value) / Q) * Fe}px` })
1098
+ style: ae({ height: `${Math.ceil((oe.value - U.value) / ee) * je}px` })
928
1099
  }, null, 4)
929
1100
  ], 544)
930
- ])) : w("", !0),
931
- Y.value === "month" ? (c(), v("div", xa, [
932
- (c(), v(H, null, ae(12, (f) => k("div", {
933
- key: f,
934
- class: O(["rc-calendar__month-picker-item", {
935
- "is-selected": oe.value === f,
936
- "is-disabled": ve(P.value, f)
1101
+ ])) : S("", !0),
1102
+ E.value === "month" ? (u(), f("div", Aa, [
1103
+ (u(), f(j, null, te(12, (p) => k("div", {
1104
+ key: p,
1105
+ class: z(["rc-calendar__month-picker-item", {
1106
+ "is-selected": ne.value === p,
1107
+ "is-disabled": ve(W.value, p)
937
1108
  }]),
938
- onClick: (S) => Le(f)
939
- }, R(f) + "月 ", 11, Ca)), 64))
940
- ])) : w("", !0)
1109
+ onClick: (C) => Xe(p)
1110
+ }, T(p) + "月 ", 11, Fa)), 64))
1111
+ ])) : S("", !0)
941
1112
  ])
942
- ])) : w("", !0)
1113
+ ])) : S("", !0)
943
1114
  ]),
944
1115
  _: 1
945
1116
  })
946
1117
  ]));
947
1118
  }
948
- }), ot = /* @__PURE__ */ ue(Da, [["__scopeId", "data-v-30d4815e"]]), wa = { class: "rc-calendar" }, Sa = ["placeholder"], Ia = {
1119
+ }), vt = /* @__PURE__ */ fe(Ya, [["__scopeId", "data-v-0bf1834b"]]), Ba = { class: "rc-calendar" }, Ea = ["placeholder"], Na = { class: "rc-calendar__input-actions" }, Pa = {
949
1120
  key: 1,
950
1121
  class: "rc-calendar__panel"
951
- }, Ma = /* @__PURE__ */ ce({
1122
+ }, La = /* @__PURE__ */ de({
952
1123
  name: "rc-calendar",
953
1124
  __name: "index",
954
1125
  props: {
@@ -965,165 +1136,174 @@ const ra = {
965
1136
  showFooter: { type: Boolean, default: !0 }
966
1137
  },
967
1138
  emits: ["update:modelValue", "change", "confirm"],
968
- setup(e, { emit: r }) {
969
- const d = e, l = r, y = I(), b = I(), p = I(!1), m = I(""), i = M(() => d.range === !0 || typeof d.range == "number"), h = M(() => typeof d.range == "number" ? d.range : void 0), A = M(() => (_) => {
970
- if (d.disabledDate && d.disabledDate(_))
1139
+ setup(e, { emit: o }) {
1140
+ const d = e, n = o, y = M(), $ = M(), m = M(!1), v = M(""), i = R(() => d.range === !0 || typeof d.range == "number"), h = R(() => typeof d.range == "number" ? d.range : void 0), F = R(() => (b) => {
1141
+ if (d.disabledDate && d.disabledDate(b))
971
1142
  return !0;
972
- if (h.value !== void 0 && g.value && !D.value) {
973
- const C = s(_);
974
- if (x(g.value) && fe(g.value, C) > h.value)
1143
+ if (h.value !== void 0 && _.value && !I.value) {
1144
+ const w = c(b);
1145
+ if (x(_.value) && ge(_.value, w) > h.value)
975
1146
  return !0;
976
1147
  }
977
1148
  return !1;
978
- }), $ = I(null), g = I(null), D = I(null);
979
- be(
1149
+ }), D = M(null), _ = M(null), I = M(null);
1150
+ we(
980
1151
  () => d.modelValue,
981
- (_) => {
982
- i.value ? Array.isArray(_) && _.length === 2 ? (g.value = _[0], D.value = _[1]) : (g.value = null, D.value = null) : $.value = typeof _ == "string" ? _ : null, V();
1152
+ (b) => {
1153
+ i.value ? Array.isArray(b) && b.length === 2 ? (_.value = b[0], I.value = b[1]) : (_.value = null, I.value = null) : D.value = typeof b == "string" ? b : null, V();
983
1154
  },
984
1155
  { immediate: !0 }
985
1156
  );
986
1157
  function V() {
987
- d.mode === "popup" && (i.value ? g.value && D.value ? m.value = `${g.value} ~ ${D.value}` : g.value ? m.value = `${g.value} ~ ` : m.value = "" : m.value = $.value || "");
1158
+ d.mode === "popup" && (i.value ? _.value && I.value ? v.value = `${_.value} ~ ${I.value}` : _.value ? v.value = `${_.value} ~ ` : v.value = "" : v.value = D.value || "");
988
1159
  }
989
- function x(_) {
990
- if (!_) return null;
991
- const C = new Date(_);
992
- return isNaN(C.getTime()) ? null : C;
1160
+ function x(b) {
1161
+ if (!b) return null;
1162
+ const w = new Date(b);
1163
+ return isNaN(w.getTime()) ? null : w;
993
1164
  }
994
- function s(_) {
995
- const C = _.getFullYear(), T = String(_.getMonth() + 1).padStart(2, "0"), K = String(_.getDate()).padStart(2, "0");
996
- return `${C}-${T}-${K}`;
1165
+ function c(b) {
1166
+ const w = b.getFullYear(), Y = String(b.getMonth() + 1).padStart(2, "0"), O = String(b.getDate()).padStart(2, "0");
1167
+ return `${w}-${Y}-${O}`;
997
1168
  }
998
- function fe(_, C) {
999
- const T = x(_), K = x(C);
1000
- if (!T || !K) return 0;
1001
- const le = Math.abs(K.getTime() - T.getTime());
1002
- return Math.ceil(le / (1e3 * 60 * 60 * 24));
1169
+ function ge(b, w) {
1170
+ const Y = x(b), O = x(w);
1171
+ if (!Y || !O) return 0;
1172
+ const se = Math.abs(O.getTime() - Y.getTime());
1173
+ return Math.ceil(se / (1e3 * 60 * 60 * 24));
1003
1174
  }
1004
- function he(_) {
1005
- if (_.type !== "current-month" || d.disabledDate && d.disabledDate(_.date))
1175
+ function _e(b) {
1176
+ if (b.type !== "current-month" || d.disabledDate && d.disabledDate(b.date))
1006
1177
  return;
1007
- const C = s(_.date);
1008
- if (!(d.minDate && C < d.minDate) && !(d.maxDate && C > d.maxDate)) {
1178
+ const w = c(b.date);
1179
+ if (!(d.minDate && w < d.minDate) && !(d.maxDate && w > d.maxDate)) {
1009
1180
  if (i.value)
1010
- if (!g.value || g.value && D.value)
1011
- g.value = C, D.value = null;
1181
+ if (!_.value || _.value && I.value)
1182
+ _.value = w, I.value = null;
1012
1183
  else {
1013
- let T = g.value, K = C;
1014
- if (C < g.value && (K = g.value, T = C), g.value = T, D.value = K, g.value && D.value) {
1015
- const le = [g.value, D.value];
1016
- l("update:modelValue", le), l("change", le), d.showFooter || ve();
1184
+ let Y = _.value, O = w;
1185
+ if (w < _.value && (O = _.value, Y = w), _.value = Y, I.value = O, _.value && I.value) {
1186
+ const se = [_.value, I.value];
1187
+ n("update:modelValue", se), n("change", se), d.showFooter || ve();
1017
1188
  }
1018
1189
  }
1019
1190
  else {
1020
- $.value = C;
1021
- const T = C;
1022
- l("update:modelValue", T), l("change", T), d.mode && P();
1191
+ D.value = w;
1192
+ const Y = w;
1193
+ n("update:modelValue", Y), n("change", Y), d.mode && ne();
1023
1194
  }
1024
1195
  V();
1025
1196
  }
1026
1197
  }
1027
1198
  function ve() {
1028
- if (g.value && D.value) {
1029
- const _ = [g.value, D.value];
1030
- l("update:modelValue", _), l("change", _), l("confirm", _), P();
1199
+ if (_.value && I.value) {
1200
+ const b = [_.value, I.value];
1201
+ n("update:modelValue", b), n("change", b), n("confirm", b), ne();
1031
1202
  }
1032
1203
  }
1033
- function G() {
1034
- i.value ? (g.value = null, D.value = null) : $.value = null;
1035
- const _ = null;
1036
- l("update:modelValue", _), l("change", _), V();
1204
+ function K() {
1205
+ i.value ? (_.value = null, I.value = null) : D.value = null;
1206
+ const b = null;
1207
+ n("update:modelValue", b), n("change", b), V();
1037
1208
  }
1038
- function Y() {
1039
- p.value = !0;
1209
+ function E(b) {
1210
+ _.value = b[0], I.value = b[1];
1211
+ const w = [b[0], b[1]];
1212
+ n("update:modelValue", w), n("change", w), d.showFooter ? V() : ve();
1040
1213
  }
1041
- function P() {
1042
- p.value = !1;
1214
+ function W() {
1215
+ m.value = !0;
1043
1216
  }
1044
- function oe(_) {
1045
- p.value = _;
1217
+ function ne() {
1218
+ m.value = !1;
1046
1219
  }
1047
- function Z() {
1048
- Y();
1220
+ function le(b) {
1221
+ m.value = b;
1049
1222
  }
1050
- function ee() {
1051
- d.mode === "popup" && F();
1223
+ function re() {
1224
+ W();
1052
1225
  }
1053
- function L() {
1054
- p.value || Y();
1226
+ function U() {
1227
+ d.mode === "popup" && oe();
1055
1228
  }
1056
- function F() {
1057
- const _ = m.value.trim();
1229
+ function N() {
1230
+ m.value || W();
1231
+ }
1232
+ function oe() {
1233
+ const b = v.value.trim();
1058
1234
  if (i.value) {
1059
- const C = _.split("~").map((T) => T.trim());
1060
- if (C.length === 2 && C[0] && C[1]) {
1061
- const T = x(C[0]), K = x(C[1]);
1062
- if (T && K && !isNaN(T.getTime()) && !isNaN(K.getTime())) {
1063
- g.value = s(T), D.value = s(K);
1064
- const le = [g.value, D.value];
1065
- l("update:modelValue", le), l("change", le);
1235
+ const w = b.split("~").map((Y) => Y.trim());
1236
+ if (w.length === 2 && w[0] && w[1]) {
1237
+ const Y = x(w[0]), O = x(w[1]);
1238
+ if (Y && O && !isNaN(Y.getTime()) && !isNaN(O.getTime())) {
1239
+ _.value = c(Y), I.value = c(O);
1240
+ const se = [_.value, I.value];
1241
+ n("update:modelValue", se), n("change", se);
1066
1242
  return;
1067
1243
  }
1068
1244
  }
1069
1245
  } else {
1070
- const C = x(_);
1071
- if (C && !isNaN(C.getTime())) {
1072
- $.value = s(C), l("update:modelValue", $.value), l("change", $.value);
1246
+ const w = x(b);
1247
+ if (w && !isNaN(w.getTime())) {
1248
+ D.value = c(w), n("update:modelValue", D.value), n("change", D.value);
1073
1249
  return;
1074
1250
  }
1075
1251
  }
1076
1252
  V();
1077
1253
  }
1078
- return (_, C) => (c(), v("div", wa, [
1079
- e.mode === "popup" ? (c(), v("div", {
1254
+ return (b, w) => (u(), f("div", Ba, [
1255
+ e.mode === "popup" ? (u(), f("div", {
1080
1256
  key: 0,
1081
1257
  class: "rc-calendar__input",
1082
- onClick: Y
1258
+ onClick: W
1083
1259
  }, [
1084
- vt(k("input", {
1260
+ kt(k("input", {
1085
1261
  ref_key: "inputRef",
1086
1262
  ref: y,
1087
- "onUpdate:modelValue": C[0] || (C[0] = (T) => m.value = T),
1263
+ "onUpdate:modelValue": w[0] || (w[0] = (Y) => v.value = Y),
1088
1264
  type: "text",
1089
1265
  class: "rc-calendar__input-field",
1090
1266
  placeholder: e.placeholder,
1091
1267
  readonly: "",
1092
- onFocus: Z,
1093
- onBlur: ee,
1094
- onInput: L
1095
- }, null, 40, Sa), [
1096
- [pt, m.value]
1268
+ onFocus: re,
1269
+ onBlur: U,
1270
+ onInput: N
1271
+ }, null, 40, Ea), [
1272
+ [bt, v.value]
1097
1273
  ]),
1098
- E(j(J), {
1099
- name: "icon_a-rili",
1100
- class: "rc-calendar__input-icon"
1101
- })
1102
- ])) : w("", !0),
1103
- e.mode === "default" ? (c(), v("div", Ia, [
1104
- E(ot, {
1274
+ k("div", Na, [
1275
+ L(G(J), {
1276
+ name: "icon_a-rili",
1277
+ class: "rc-calendar__input-icon"
1278
+ })
1279
+ ])
1280
+ ])) : S("", !0),
1281
+ e.mode === "default" ? (u(), f("div", Pa, [
1282
+ L(vt, {
1105
1283
  "show-title": e.showTitle,
1106
1284
  title: e.title,
1107
1285
  range: i.value,
1108
- "selected-date": $.value,
1109
- "range-start": g.value,
1110
- "range-end": D.value,
1286
+ "selected-date": D.value,
1287
+ "range-start": _.value,
1288
+ "range-end": I.value,
1111
1289
  "min-date": e.minDate,
1112
1290
  "max-date": e.maxDate,
1113
- "disabled-date": A.value,
1291
+ "disabled-date": F.value,
1114
1292
  formatter: e.formatter,
1115
1293
  "show-footer": !1,
1116
- onSelectDay: he,
1117
- onClear: G,
1118
- onConfirm: ve
1119
- }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter"])
1120
- ])) : w("", !0),
1121
- e.mode === "popup" ? (c(), ie(j(Ve), {
1294
+ "max-range-days": h.value,
1295
+ onSelectDay: _e,
1296
+ onClear: K,
1297
+ onConfirm: ve,
1298
+ onShortcutSelect: E
1299
+ }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "max-range-days"])
1300
+ ])) : S("", !0),
1301
+ e.mode === "popup" ? (u(), ue(G(Fe), {
1122
1302
  key: 2,
1123
- modelValue: p.value,
1303
+ modelValue: m.value,
1124
1304
  "onUpdate:modelValue": [
1125
- C[1] || (C[1] = (T) => p.value = T),
1126
- oe
1305
+ w[1] || (w[1] = (Y) => m.value = Y),
1306
+ le
1127
1307
  ],
1128
1308
  position: "bottom",
1129
1309
  overlay: !0,
@@ -1131,65 +1311,67 @@ const ra = {
1131
1311
  "close-on-click-overlay": !0,
1132
1312
  "lock-scroll": !0
1133
1313
  }, {
1134
- default: ne(() => [
1314
+ default: H(() => [
1135
1315
  k("div", {
1136
1316
  ref_key: "popupPanelRef",
1137
- ref: b,
1317
+ ref: $,
1138
1318
  class: "rc-calendar__panel"
1139
1319
  }, [
1140
- E(ot, {
1320
+ L(vt, {
1141
1321
  "show-title": e.showTitle,
1142
1322
  title: e.title,
1143
1323
  range: i.value,
1144
- "selected-date": $.value,
1145
- "range-start": g.value,
1146
- "range-end": D.value,
1324
+ "selected-date": D.value,
1325
+ "range-start": _.value,
1326
+ "range-end": I.value,
1147
1327
  "min-date": e.minDate,
1148
1328
  "max-date": e.maxDate,
1149
- "disabled-date": A.value,
1329
+ "disabled-date": F.value,
1150
1330
  formatter: e.formatter,
1151
1331
  "show-footer": e.showFooter,
1152
- onSelectDay: he,
1153
- onClear: G,
1154
- onConfirm: ve
1155
- }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "show-footer"])
1332
+ "max-range-days": h.value,
1333
+ onSelectDay: _e,
1334
+ onClear: K,
1335
+ onConfirm: ve,
1336
+ onShortcutSelect: E
1337
+ }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "show-footer", "max-range-days"])
1156
1338
  ], 512)
1157
1339
  ]),
1158
1340
  _: 1
1159
- }, 8, ["modelValue"])) : w("", !0)
1341
+ }, 8, ["modelValue"])) : S("", !0)
1160
1342
  ]));
1161
1343
  }
1162
- }), Re = /* @__PURE__ */ ue(Ma, [["__scopeId", "data-v-2836ea57"]]);
1163
- Re.name = "rc-calendar";
1164
- const Va = "RcCalendar";
1165
- function st(e) {
1166
- return e.component(Re.name, Re), e.component(Va, Re), e;
1344
+ }), Ye = /* @__PURE__ */ fe(La, [["__scopeId", "data-v-8c0e90b4"]]);
1345
+ Ye.name = "rc-calendar";
1346
+ const Wa = "RcCalendar";
1347
+ function pt(e) {
1348
+ return e.component(Ye.name, Ye), e.component(Wa, Ye), e;
1167
1349
  }
1168
- const Ra = { class: "rc-search-area" }, Aa = { class: "rc-search-area__bar" }, Ta = ["onClick"], Ba = { class: "rc-search-area__item-label" }, Fa = { class: "rc-search-area__panel-content" }, Na = {
1350
+ const za = { class: "rc-search-area" }, Ua = { class: "rc-search-area__bar" }, Oa = ["onClick"], Ga = { class: "rc-search-area__item-label" }, Ka = { class: "rc-search-area__panel-content" }, ja = {
1169
1351
  key: 1,
1170
1352
  class: "rc-search-area__input-wrapper"
1171
- }, Ea = ["placeholder"], Ya = {
1353
+ }, Ha = ["placeholder"], qa = {
1172
1354
  key: 2,
1173
1355
  class: "rc-search-area__calendar-wrapper"
1174
- }, Pa = {
1356
+ }, Ja = {
1175
1357
  key: 3,
1176
1358
  class: "rc-search-area__tree-container"
1177
- }, La = { class: "rc-search-area__tree-group-title" }, Wa = { class: "rc-search-area__tree-group-options" }, za = ["onClick"], Ua = { class: "rc-search-area__option-label" }, Oa = {
1359
+ }, Qa = { class: "rc-search-area__tree-group-title" }, Xa = { class: "rc-search-area__tree-group-options" }, Za = ["onClick"], en = { class: "rc-search-area__option-label" }, tn = {
1178
1360
  key: 4,
1179
1361
  class: "rc-search-area__tree-container"
1180
- }, Ga = { class: "rc-search-area__tree-group-title" }, Ka = { class: "rc-search-area__tree-group-options" }, ja = ["onClick"], Ha = { class: "rc-search-area__option-label" }, qa = {
1362
+ }, an = { class: "rc-search-area__tree-group-title" }, nn = { class: "rc-search-area__tree-group-options" }, ln = ["onClick"], rn = { class: "rc-search-area__option-label" }, on = {
1181
1363
  key: 5,
1182
1364
  class: "rc-search-area__options-grid"
1183
- }, Ja = ["onClick"], Qa = { class: "rc-search-area__option-label" }, Xa = {
1365
+ }, sn = ["onClick"], cn = { class: "rc-search-area__option-label" }, un = {
1184
1366
  key: 6,
1185
1367
  class: "rc-search-area__options-grid"
1186
- }, Za = ["onClick"], en = { class: "rc-search-area__option-label" }, tn = {
1368
+ }, dn = ["onClick"], fn = { class: "rc-search-area__option-label" }, vn = {
1187
1369
  key: 7,
1188
1370
  class: "rc-search-area__empty"
1189
- }, an = {
1371
+ }, pn = {
1190
1372
  key: 0,
1191
1373
  class: "rc-search-area__panel-footer"
1192
- }, nn = /* @__PURE__ */ ce({
1374
+ }, mn = /* @__PURE__ */ de({
1193
1375
  name: "rc-search-area",
1194
1376
  __name: "index",
1195
1377
  props: {
@@ -1199,457 +1381,457 @@ const Ra = { class: "rc-search-area" }, Aa = { class: "rc-search-area__bar" }, T
1199
1381
  autoConfirm: { type: Boolean, default: !1 }
1200
1382
  },
1201
1383
  emits: ["update:modelValue", "change"],
1202
- setup(e, { expose: r, emit: d }) {
1203
- const l = e, y = d, b = I(null), p = I(null), m = I(null), i = I({ top: "0px" }), h = async () => {
1204
- if (b.value === null || !p.value)
1384
+ setup(e, { expose: o, emit: d }) {
1385
+ const n = e, y = d, $ = M(null), m = M(null), v = M(null), i = M({ top: "0px" }), h = async () => {
1386
+ if ($.value === null || !m.value)
1205
1387
  return;
1206
- await Ge();
1207
- const n = p.value.getBoundingClientRect().top;
1208
- i.value = { top: `${n}px` };
1209
- }, A = (t) => {
1210
- if (b.value === null || !p.value)
1388
+ await et();
1389
+ const r = m.value.getBoundingClientRect().top;
1390
+ i.value = { top: `${r}px` };
1391
+ }, F = (a) => {
1392
+ if ($.value === null || !m.value)
1211
1393
  return;
1212
- const n = t.target;
1213
- if (p.value.contains(n))
1394
+ const r = a.target;
1395
+ if (m.value.contains(r))
1214
1396
  return;
1215
- const o = p.value.closest(".rc-search-area");
1216
- if (o) {
1217
- const a = o.querySelector(".rc-search-area__bar");
1218
- if (a && a.contains(n))
1397
+ const s = m.value.closest(".rc-search-area");
1398
+ if (s) {
1399
+ const g = s.querySelector(".rc-search-area__bar");
1400
+ if (g && g.contains(r))
1219
1401
  return;
1220
1402
  }
1221
- G();
1403
+ K();
1222
1404
  };
1223
- be(b, async (t) => {
1224
- t !== null ? (await Ge(), h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), document.addEventListener("click", A, !0)) : (window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0), document.removeEventListener("click", A, !0));
1225
- }), Ke(() => {
1226
- window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0), document.removeEventListener("click", A, !0);
1405
+ we($, async (a) => {
1406
+ a !== null ? (await et(), 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));
1407
+ }), tt(() => {
1408
+ window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0), document.removeEventListener("click", F, !0);
1227
1409
  });
1228
- const $ = I({}), g = I(""), D = I(null), V = I({}), x = I({ ...l.modelValue });
1229
- be(() => l.modelValue, (t) => {
1230
- x.value = { ...t || {} };
1410
+ const D = M({}), _ = M(""), I = M(null), V = M({}), x = M({ ...n.modelValue });
1411
+ we(() => n.modelValue, (a) => {
1412
+ x.value = { ...a || {} };
1231
1413
  }, { deep: !0, immediate: !0 });
1232
- const s = M(() => b.value === null ? null : l.items[b.value]), fe = M(() => {
1233
- if (!s.value) return "";
1234
- const t = ze(s.value);
1235
- return t > 0 ? `(${t}项)` : "";
1236
- }), he = (t) => {
1237
- const n = x.value[t.key];
1238
- if (n == null || n === "" || t.slot)
1239
- return t.label;
1240
- if (t.type === "input") {
1241
- if (n && String(n).trim())
1242
- return `${t.label}: ${n}`;
1243
- } else if (t.type === "calendar") {
1244
- if (n) {
1245
- if (Array.isArray(n) && n.length === 2)
1246
- return `${t.label}: ${n[0]} ~ ${n[1]}`;
1247
- if (typeof n == "string")
1248
- return `${t.label}: ${n}`;
1414
+ const c = R(() => $.value === null ? null : n.items[$.value]), ge = R(() => {
1415
+ if (!c.value) return "";
1416
+ const a = Ne(c.value);
1417
+ return a > 0 ? `(${a}项)` : "";
1418
+ }), _e = (a) => {
1419
+ const r = x.value[a.key];
1420
+ if (r == null || r === "" || a.slot)
1421
+ return a.label;
1422
+ if (a.type === "input") {
1423
+ if (r && String(r).trim())
1424
+ return `${a.label}: ${r}`;
1425
+ } else if (a.type === "calendar") {
1426
+ if (r) {
1427
+ if (Array.isArray(r) && r.length === 2)
1428
+ return `${a.label}: ${r[0]} ~ ${r[1]}`;
1429
+ if (typeof r == "string")
1430
+ return `${a.label}: ${r}`;
1249
1431
  }
1250
- } else if (t.type === "single" || t.type === "tree-single") {
1251
- const o = Z(t, n);
1252
- if (o)
1253
- return `${t.label}: ${oe(o, t)}`;
1432
+ } else if (a.type === "single" || a.type === "tree-single") {
1433
+ const s = le(a, r);
1434
+ if (s)
1435
+ return `${a.label}: ${ne(s, a)}`;
1254
1436
  } else {
1255
- const o = Array.isArray(n) ? n : [n];
1256
- if (o.length > 0) {
1257
- const a = o.map((u) => {
1258
- const f = Z(t, u);
1259
- return f ? oe(f, t) : null;
1260
- }).filter((u) => u !== null);
1261
- if (a.length > 0)
1262
- return `${t.label}: ${a.join("、")}`;
1437
+ const s = Array.isArray(r) ? r : [r];
1438
+ if (s.length > 0) {
1439
+ const g = s.map((B) => {
1440
+ const A = le(a, B);
1441
+ return A ? ne(A, a) : null;
1442
+ }).filter((B) => B !== null);
1443
+ if (g.length > 0)
1444
+ return `${a.label}: ${g.join("、")}`;
1263
1445
  }
1264
1446
  }
1265
- return t.label;
1266
- }, ve = (t) => {
1267
- const n = l.items[t];
1268
- if (!n) return;
1269
- if (b.value === t) {
1270
- b.value = null;
1447
+ return a.label;
1448
+ }, ve = (a) => {
1449
+ const r = n.items[a];
1450
+ if (!r) return;
1451
+ if ($.value === a) {
1452
+ $.value = null;
1271
1453
  return;
1272
1454
  }
1273
- const o = x.value[n.key];
1274
- n.slot ? o != null ? Array.isArray(o) ? V.value[n.key] = [...o] : typeof o == "object" ? V.value[n.key] = { ...o } : V.value[n.key] = o : V.value[n.key] = void 0 : n.type === "input" ? g.value = o != null ? String(o) : "" : n.type === "calendar" ? D.value = o ?? null : n.type === "single" || n.type === "tree-single" ? $.value[n.key] = o !== void 0 ? o : null : $.value[n.key] = o !== void 0 ? Array.isArray(o) ? [...o] : [o] : [], b.value = t;
1275
- }, G = () => {
1276
- b.value = null;
1277
- }, Y = (t, n) => {
1278
- if (!n)
1279
- return typeof t == "string" ? t : t.label || String(t.value);
1280
- const o = t;
1281
- if (n.renderItem) {
1282
- if (typeof n.renderItem == "string")
1283
- return String(typeof o == "object" && o !== null ? o[n.renderItem] ?? "" : o);
1455
+ const s = x.value[r.key];
1456
+ r.slot ? s != null ? Array.isArray(s) ? V.value[r.key] = [...s] : typeof s == "object" ? V.value[r.key] = { ...s } : V.value[r.key] = s : V.value[r.key] = void 0 : r.type === "input" ? _.value = s != null ? String(s) : "" : r.type === "calendar" ? I.value = s ?? null : r.type === "single" || r.type === "tree-single" ? D.value[r.key] = s !== void 0 ? s : null : D.value[r.key] = s !== void 0 ? Array.isArray(s) ? [...s] : [s] : [], $.value = a;
1457
+ }, K = () => {
1458
+ $.value = null;
1459
+ }, E = (a, r) => {
1460
+ if (!r)
1461
+ return typeof a == "string" ? a : a.label || String(a.value);
1462
+ const s = a;
1463
+ if (r.renderItem) {
1464
+ if (typeof r.renderItem == "string")
1465
+ return String(typeof s == "object" && s !== null ? s[r.renderItem] ?? "" : s);
1284
1466
  {
1285
- const a = n.renderItem(o);
1286
- return a != null ? String(a) : "";
1467
+ const g = r.renderItem(s);
1468
+ return g != null ? String(g) : "";
1287
1469
  }
1288
1470
  }
1289
- return typeof t == "string" ? t : t.label || String(t.value);
1290
- }, P = (t, n) => {
1291
- if (!n)
1292
- return typeof t == "string" ? t : t.value !== void 0 ? t.value : t;
1293
- const o = t;
1294
- return n.format ? typeof n.format == "string" ? typeof o == "object" && o !== null ? o[n.format] : o : n.format(o) : typeof t == "string" ? t : t.value !== void 0 ? t.value : t;
1295
- }, oe = (t, n) => {
1296
- const o = t, a = n.renderResult || n.renderItem;
1297
- if (a) {
1298
- if (typeof a == "string")
1299
- return String(typeof o == "object" && o !== null ? o[a] ?? "" : o);
1471
+ return typeof a == "string" ? a : a.label || String(a.value);
1472
+ }, W = (a, r) => {
1473
+ if (!r)
1474
+ return typeof a == "string" ? a : a.value !== void 0 ? a.value : a;
1475
+ const s = a;
1476
+ return r.format ? typeof r.format == "string" ? typeof s == "object" && s !== null ? s[r.format] : s : r.format(s) : typeof a == "string" ? a : a.value !== void 0 ? a.value : a;
1477
+ }, ne = (a, r) => {
1478
+ const s = a, g = r.renderResult || r.renderItem;
1479
+ if (g) {
1480
+ if (typeof g == "string")
1481
+ return String(typeof s == "object" && s !== null ? s[g] ?? "" : s);
1300
1482
  {
1301
- const u = a(o);
1302
- return u != null ? String(u) : "";
1483
+ const B = g(s);
1484
+ return B != null ? String(B) : "";
1303
1485
  }
1304
1486
  }
1305
- return Y(t, n);
1306
- }, Z = (t, n, o) => {
1307
- const a = o || t.options, u = t.childrenKey || "children";
1308
- for (const f of a) {
1309
- const S = P(f, t);
1310
- if (S === n || String(S) === String(n))
1311
- return f;
1312
- if (typeof f == "object" && f !== null) {
1313
- const B = f[u];
1314
- if (Array.isArray(B) && B.length > 0) {
1315
- const te = Z(t, n, B);
1316
- if (te) return te;
1487
+ return E(a, r);
1488
+ }, le = (a, r, s) => {
1489
+ const g = s || a.options, B = a.childrenKey || "children";
1490
+ for (const A of g) {
1491
+ const ce = W(A, a);
1492
+ if (ce === r || String(ce) === String(r))
1493
+ return A;
1494
+ if (typeof A == "object" && A !== null) {
1495
+ const ke = A[B];
1496
+ if (Array.isArray(ke) && ke.length > 0) {
1497
+ const me = le(a, r, ke);
1498
+ if (me) return me;
1317
1499
  }
1318
1500
  }
1319
1501
  }
1320
1502
  return null;
1321
- }, ee = (t, n) => {
1322
- const o = n || t.options, a = t.childrenKey || "children", u = [];
1323
- for (const f of o)
1324
- if (u.push(f), typeof f == "object" && f !== null) {
1325
- const S = f[a];
1326
- Array.isArray(S) && S.length > 0 && u.push(...ee(t, S));
1503
+ }, re = (a, r) => {
1504
+ const s = r || a.options, g = a.childrenKey || "children", B = [];
1505
+ for (const A of s)
1506
+ if (B.push(A), typeof A == "object" && A !== null) {
1507
+ const ce = A[g];
1508
+ Array.isArray(ce) && ce.length > 0 && B.push(...re(a, ce));
1327
1509
  }
1328
- return u;
1329
- }, L = (t) => {
1330
- if (!s.value) return !1;
1331
- const n = s.value.key, o = $.value[n], a = P(t, s.value);
1332
- return s.value.type === "single" || s.value.type === "tree-single" ? o != null && o === a : (Array.isArray(o) ? o : []).some((f) => f === a || String(f) === String(a));
1333
- }, F = (t) => t ? t.childrenKey ? ee(t) : t.options : [], _ = (t) => {
1334
- if (!t) return [];
1335
- const n = t.childrenKey || "children";
1336
- return (t.options || []).filter((o) => {
1337
- if (typeof o == "string") return !1;
1338
- const a = o[n];
1339
- return Array.isArray(a) && a.length > 0;
1510
+ return B;
1511
+ }, U = (a) => {
1512
+ if (!c.value) return !1;
1513
+ const r = c.value.key, s = D.value[r], g = W(a, c.value);
1514
+ return c.value.type === "single" || c.value.type === "tree-single" ? s != null && s === g : (Array.isArray(s) ? s : []).some((A) => A === g || String(A) === String(g));
1515
+ }, N = (a) => a ? a.childrenKey ? re(a) : a.options : [], oe = (a) => {
1516
+ if (!a) return [];
1517
+ const r = a.childrenKey || "children";
1518
+ return (a.options || []).filter((s) => {
1519
+ if (typeof s == "string") return !1;
1520
+ const g = s[r];
1521
+ return Array.isArray(g) && g.length > 0;
1340
1522
  });
1341
- }, C = (t, n) => {
1342
- if (!n || typeof t == "string") return [];
1343
- const o = n.childrenKey || "children", a = t[o];
1344
- return Array.isArray(a) ? a : [];
1345
- }, T = (t) => {
1346
- if (t)
1347
- return V.value[t.key] !== void 0 ? V.value[t.key] : x.value[t.key];
1348
- }, K = (t, n) => {
1349
- if (t && (V.value[t.key] = n, l.autoConfirm)) {
1350
- const o = t.key;
1351
- x.value[o] = n, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, t), G();
1523
+ }, b = (a, r) => {
1524
+ if (!r || typeof a == "string") return [];
1525
+ const s = r.childrenKey || "children", g = a[s];
1526
+ return Array.isArray(g) ? g : [];
1527
+ }, w = (a) => {
1528
+ if (a)
1529
+ return V.value[a.key] !== void 0 ? V.value[a.key] : x.value[a.key];
1530
+ }, Y = (a, r) => {
1531
+ if (a && (V.value[a.key] = r, n.autoConfirm)) {
1532
+ const s = a.key;
1533
+ x.value[s] = r, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, a), K();
1352
1534
  }
1353
- }, le = (t) => {
1354
- if (!s.value) return;
1355
- const n = s.value.key, o = P(t, s.value);
1356
- x.value[n];
1357
- let a;
1358
- $.value[n] === o ? a = void 0 : a = o, x.value[n] = a, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, s.value), G();
1359
- }, Ae = (t) => {
1360
- if (!s.value) return;
1361
- const n = s.value.key, o = P(t, s.value), a = Array.isArray($.value[n]) ? [...$.value[n]] : [], u = a.findIndex(
1362
- (f) => f === o || String(f) === String(o)
1535
+ }, O = (a) => {
1536
+ if (!c.value) return;
1537
+ const r = c.value.key, s = W(a, c.value);
1538
+ x.value[r];
1539
+ let g;
1540
+ D.value[r] === s ? g = void 0 : g = s, x.value[r] = g, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, c.value), K();
1541
+ }, se = (a) => {
1542
+ if (!c.value) return;
1543
+ const r = c.value.key, s = W(a, c.value), g = Array.isArray(D.value[r]) ? [...D.value[r]] : [], B = g.findIndex(
1544
+ (A) => A === s || String(A) === String(s)
1363
1545
  );
1364
- if (u >= 0 ? a.splice(u, 1) : a.push(o), $.value[n] = a, l.autoConfirm) {
1365
- const f = a.length > 0 ? a : void 0;
1366
- x.value[n] = f, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, s.value), G();
1546
+ if (B >= 0 ? g.splice(B, 1) : g.push(s), D.value[r] = g, n.autoConfirm) {
1547
+ const A = g.length > 0 ? g : void 0;
1548
+ x.value[r] = A, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, c.value), K();
1367
1549
  }
1368
- }, Ye = () => {
1369
- if (!s.value) return;
1370
- const t = s.value.key;
1371
- s.value.slot ? V.value[t] = void 0 : s.value.type === "input" ? g.value = "" : s.value.type === "calendar" ? D.value = null : s.value.type === "single" || s.value.type === "tree-single" ? $.value[t] = null : $.value[t] = [];
1372
- }, Pe = () => {
1373
- if (l.autoConfirm && s.value) {
1374
- const t = s.value.key, n = g.value.trim() || void 0;
1375
- x.value[t] = n, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, s.value), G();
1550
+ }, Je = () => {
1551
+ if (!c.value) return;
1552
+ const a = c.value.key;
1553
+ c.value.slot ? V.value[a] = void 0 : c.value.type === "input" ? _.value = "" : c.value.type === "calendar" ? I.value = null : c.value.type === "single" || c.value.type === "tree-single" ? D.value[a] = null : D.value[a] = [];
1554
+ }, Qe = () => {
1555
+ if (n.autoConfirm && c.value) {
1556
+ const a = c.value.key, r = _.value.trim() || void 0;
1557
+ x.value[a] = r, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, c.value), K();
1376
1558
  }
1377
- }, Le = (t) => {
1378
- if (D.value = t, l.autoConfirm && s.value) {
1379
- const n = s.value.key, o = t ?? void 0;
1380
- x.value[n] = o, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, s.value), G();
1559
+ }, Xe = (a) => {
1560
+ if (I.value = a, n.autoConfirm && c.value) {
1561
+ const r = c.value.key, s = a ?? void 0;
1562
+ x.value[r] = s, y("update:modelValue", { ...x.value }), y("change", { ...x.value }, c.value), K();
1381
1563
  }
1382
- }, We = () => {
1383
- if (!s.value) return;
1384
- const t = s.value.key;
1385
- x.value[t];
1386
- let n;
1387
- if (s.value.slot)
1388
- n = V.value[t], x.value[t] = n;
1389
- else if (s.value.type === "input")
1390
- n = g.value.trim() || void 0, x.value[t] = n;
1391
- else if (s.value.type === "calendar")
1392
- n = D.value !== null && D.value !== void 0 ? D.value : void 0, x.value[t] = n;
1393
- else if (s.value.type === "single" || s.value.type === "tree-single") {
1394
- const o = $.value[t];
1395
- n = o ?? void 0, x.value[t] = n;
1564
+ }, Be = () => {
1565
+ if (!c.value) return;
1566
+ const a = c.value.key;
1567
+ x.value[a];
1568
+ let r;
1569
+ if (c.value.slot)
1570
+ r = V.value[a], x.value[a] = r;
1571
+ else if (c.value.type === "input")
1572
+ r = _.value.trim() || void 0, x.value[a] = r;
1573
+ else if (c.value.type === "calendar")
1574
+ r = I.value !== null && I.value !== void 0 ? I.value : void 0, x.value[a] = r;
1575
+ else if (c.value.type === "single" || c.value.type === "tree-single") {
1576
+ const s = D.value[a];
1577
+ r = s ?? void 0, x.value[a] = r;
1396
1578
  } else {
1397
- const o = $.value[t];
1398
- n = Array.isArray(o) && o.length > 0 ? o : void 0, x.value[t] = n;
1579
+ const s = D.value[a];
1580
+ r = Array.isArray(s) && s.length > 0 ? s : void 0, x.value[a] = r;
1399
1581
  }
1400
- y("update:modelValue", { ...x.value }), y("change", { ...x.value }, s.value), G();
1401
- }, Te = (t) => {
1402
- const n = x.value[t.key];
1403
- return n == null || n === "" ? 0 : t.slot ? 1 : t.type === "input" ? String(n).trim() ? 1 : 0 : t.type === "single" || t.type === "tree-single" ? 1 : Array.isArray(n) ? n.length : n ? 1 : 0;
1404
- }, ze = (t) => {
1405
- if (t.slot) {
1406
- const o = V.value[t.key];
1407
- return o != null && o !== "" ? 1 : 0;
1582
+ y("update:modelValue", { ...x.value }), y("change", { ...x.value }, c.value), K();
1583
+ }, Ee = (a) => {
1584
+ const r = x.value[a.key];
1585
+ return r == null || r === "" ? 0 : a.slot ? 1 : a.type === "input" ? String(r).trim() ? 1 : 0 : a.type === "single" || a.type === "tree-single" ? 1 : Array.isArray(r) ? r.length : r ? 1 : 0;
1586
+ }, Ne = (a) => {
1587
+ if (a.slot) {
1588
+ const s = V.value[a.key];
1589
+ return s != null && s !== "" ? 1 : 0;
1408
1590
  } else {
1409
- if (t.type === "input")
1410
- return g.value.trim() ? 1 : 0;
1411
- if (t.type === "calendar")
1412
- return D.value !== null && D.value !== void 0 ? 1 : 0;
1591
+ if (a.type === "input")
1592
+ return _.value.trim() ? 1 : 0;
1593
+ if (a.type === "calendar")
1594
+ return I.value !== null && I.value !== void 0 ? 1 : 0;
1413
1595
  }
1414
- const n = $.value[t.key];
1415
- return n == null || n === "" ? 0 : t.type === "single" || t.type === "tree-single" ? 1 : Array.isArray(n) ? n.length : 0;
1596
+ const r = D.value[a.key];
1597
+ return r == null || r === "" ? 0 : a.type === "single" || a.type === "tree-single" ? 1 : Array.isArray(r) ? r.length : 0;
1416
1598
  };
1417
- return r({
1599
+ return o({
1418
1600
  /** 获取当前筛选值 */
1419
1601
  getValues: () => ({ ...x.value }),
1420
1602
  /** 重置所有筛选 */
1421
1603
  reset: () => {
1422
- x.value = {}, $.value = {}, V.value = {}, y("update:modelValue", {});
1604
+ x.value = {}, D.value = {}, V.value = {}, y("update:modelValue", {});
1423
1605
  }
1424
- }), (t, n) => (c(), v("div", Ra, [
1425
- k("div", Aa, [
1426
- (c(!0), v(H, null, ae(l.items, (o, a) => (c(), v("div", {
1427
- key: a,
1428
- class: O(["rc-search-area__item", {
1429
- "is-active": b.value === a,
1430
- "has-value": Te(o) > 0
1606
+ }), (a, r) => (u(), f("div", za, [
1607
+ k("div", Ua, [
1608
+ (u(!0), f(j, null, te(n.items, (s, g) => (u(), f("div", {
1609
+ key: g,
1610
+ class: z(["rc-search-area__item", {
1611
+ "is-active": $.value === g,
1612
+ "has-value": Ee(s) > 0
1431
1613
  }]),
1432
- onClick: (u) => ve(a)
1614
+ onClick: (B) => ve(g)
1433
1615
  }, [
1434
- k("span", Ba, R(he(o)), 1),
1435
- E(j(J), {
1616
+ k("span", Ga, T(_e(s)), 1),
1617
+ L(G(J), {
1436
1618
  name: "icon_a-xiala2",
1437
- color: b.value !== a && Te(o) > 0 ? "#1677ff" : "#969799",
1438
- class: O(["rc-search-area__item-arrow", { "is-up": b.value === a }])
1619
+ color: $.value !== g && Ee(s) > 0 ? "#1677ff" : "#969799",
1620
+ class: z(["rc-search-area__item-arrow", { "is-up": $.value === g }])
1439
1621
  }, null, 8, ["color", "class"])
1440
- ], 10, Ta))), 128))
1622
+ ], 10, Oa))), 128))
1441
1623
  ]),
1442
- E(we, { name: "rc-search-area-fade" }, {
1443
- default: ne(() => [
1444
- b.value !== null && l.showMask ? (c(), v("div", {
1624
+ L(Re, { name: "rc-search-area-fade" }, {
1625
+ default: H(() => [
1626
+ $.value !== null && n.showMask ? (u(), f("div", {
1445
1627
  key: 0,
1446
1628
  ref_key: "maskRef",
1447
- ref: m,
1629
+ ref: v,
1448
1630
  class: "rc-search-area__mask",
1449
- style: X(i.value),
1450
- onClick: G
1451
- }, null, 4)) : w("", !0)
1631
+ style: ae(i.value),
1632
+ onClick: K
1633
+ }, null, 4)) : S("", !0)
1452
1634
  ]),
1453
1635
  _: 1
1454
1636
  }),
1455
- E(we, { name: "rc-search-area-slide" }, {
1456
- default: ne(() => {
1457
- var o, a, u, f, S, B, te, re, Se, Be, W, Ie, z, U, He, qe, Je, Qe;
1637
+ L(Re, { name: "rc-search-area-slide" }, {
1638
+ default: H(() => {
1639
+ var s, g, B, A, ce, ke, me, Ve, Pe, Le, Te, We, ze, Ue, Oe, Ge, Ke, t;
1458
1640
  return [
1459
- b.value !== null ? (c(), v("div", {
1641
+ $.value !== null ? (u(), f("div", {
1460
1642
  key: 0,
1461
1643
  ref_key: "panelRef",
1462
- ref: p,
1644
+ ref: m,
1463
1645
  class: "rc-search-area__panel"
1464
1646
  }, [
1465
- k("div", Fa, [
1466
- (o = s.value) != null && o.slot && t.$slots[s.value.key] ? q(t.$slots, s.value.key, {
1647
+ k("div", Ka, [
1648
+ (s = c.value) != null && s.slot && a.$slots[c.value.key] ? q(a.$slots, c.value.key, {
1467
1649
  key: 0,
1468
- value: T(s.value),
1469
- "update:value": (N) => K(s.value, N)
1470
- }, void 0, !0) : ((a = s.value) == null ? void 0 : a.type) === "input" ? (c(), v("div", Na, [
1471
- vt(k("input", {
1472
- "onUpdate:modelValue": n[0] || (n[0] = (N) => g.value = N),
1650
+ value: w(c.value),
1651
+ "update:value": (l) => Y(c.value, l)
1652
+ }, void 0, !0) : ((g = c.value) == null ? void 0 : g.type) === "input" ? (u(), f("div", ja, [
1653
+ kt(k("input", {
1654
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => _.value = l),
1473
1655
  type: "text",
1474
1656
  class: "rc-search-area__input",
1475
- placeholder: s.value.placeholder || "请输入",
1476
- onInput: Pe
1477
- }, null, 40, Ea), [
1478
- [pt, g.value]
1657
+ placeholder: c.value.placeholder || "请输入",
1658
+ onInput: Qe
1659
+ }, null, 40, Ha), [
1660
+ [bt, _.value]
1479
1661
  ])
1480
- ])) : ((u = s.value) == null ? void 0 : u.type) === "calendar" ? (c(), v("div", Ya, [
1481
- E(j(Re), {
1482
- modelValue: D.value,
1483
- "onUpdate:modelValue": n[1] || (n[1] = (N) => D.value = N),
1484
- range: ((f = s.value.calendarConfig) == null ? void 0 : f.range) || !1,
1662
+ ])) : ((B = c.value) == null ? void 0 : B.type) === "calendar" ? (u(), f("div", qa, [
1663
+ L(G(Ye), {
1664
+ modelValue: I.value,
1665
+ "onUpdate:modelValue": r[1] || (r[1] = (l) => I.value = l),
1666
+ range: ((A = c.value.calendarConfig) == null ? void 0 : A.range) || !1,
1485
1667
  mode: "default",
1486
- "min-date": (S = s.value.calendarConfig) == null ? void 0 : S.minDate,
1487
- "max-date": (B = s.value.calendarConfig) == null ? void 0 : B.maxDate,
1488
- "disabled-date": (te = s.value.calendarConfig) == null ? void 0 : te.disabledDate,
1489
- formatter: (re = s.value.calendarConfig) == null ? void 0 : re.formatter,
1490
- onChange: Le
1668
+ "min-date": (ce = c.value.calendarConfig) == null ? void 0 : ce.minDate,
1669
+ "max-date": (ke = c.value.calendarConfig) == null ? void 0 : ke.maxDate,
1670
+ "disabled-date": (me = c.value.calendarConfig) == null ? void 0 : me.disabledDate,
1671
+ formatter: (Ve = c.value.calendarConfig) == null ? void 0 : Ve.formatter,
1672
+ onChange: Xe
1491
1673
  }, null, 8, ["modelValue", "range", "min-date", "max-date", "disabled-date", "formatter"])
1492
- ])) : ((Se = s.value) == null ? void 0 : Se.type) === "tree-single" ? (c(), v("div", Pa, [
1493
- (c(!0), v(H, null, ae(_(s.value), (N, ge) => (c(), v("div", {
1494
- key: ge,
1674
+ ])) : ((Pe = c.value) == null ? void 0 : Pe.type) === "tree-single" ? (u(), f("div", Ja, [
1675
+ (u(!0), f(j, null, te(oe(c.value), (l, p) => (u(), f("div", {
1676
+ key: p,
1495
1677
  class: "rc-search-area__tree-group"
1496
1678
  }, [
1497
- k("div", La, R(Y(N, s.value || void 0)), 1),
1498
- k("div", Wa, [
1499
- (c(!0), v(H, null, ae(C(N, s.value), (se, Ue) => (c(), v("div", {
1500
- key: Ue,
1501
- class: O(["rc-search-area__option", { "is-selected": L(se) }]),
1502
- onClick: (ht) => le(se)
1679
+ k("div", Qa, T(E(l, c.value || void 0)), 1),
1680
+ k("div", Xa, [
1681
+ (u(!0), f(j, null, te(b(l, c.value), (C, P) => (u(), f("div", {
1682
+ key: P,
1683
+ class: z(["rc-search-area__option", { "is-selected": U(C) }]),
1684
+ onClick: (ye) => O(C)
1503
1685
  }, [
1504
- k("span", Ua, R(Y(se, s.value || void 0)), 1),
1505
- L(se) ? (c(), ie(j(J), {
1686
+ k("span", en, T(E(C, c.value || void 0)), 1),
1687
+ U(C) ? (u(), ue(G(J), {
1506
1688
  key: 0,
1507
1689
  name: "icon_check",
1508
1690
  class: "rc-search-area__option-check"
1509
- })) : w("", !0)
1510
- ], 10, za))), 128))
1691
+ })) : S("", !0)
1692
+ ], 10, Za))), 128))
1511
1693
  ])
1512
1694
  ]))), 128))
1513
- ])) : ((Be = s.value) == null ? void 0 : Be.type) === "tree-multiple" ? (c(), v("div", Oa, [
1514
- (c(!0), v(H, null, ae(_(s.value), (N, ge) => (c(), v("div", {
1515
- key: ge,
1695
+ ])) : ((Le = c.value) == null ? void 0 : Le.type) === "tree-multiple" ? (u(), f("div", tn, [
1696
+ (u(!0), f(j, null, te(oe(c.value), (l, p) => (u(), f("div", {
1697
+ key: p,
1516
1698
  class: "rc-search-area__tree-group"
1517
1699
  }, [
1518
- k("div", Ga, R(Y(N, s.value || void 0)), 1),
1519
- k("div", Ka, [
1520
- (c(!0), v(H, null, ae(C(N, s.value), (se, Ue) => (c(), v("div", {
1521
- key: Ue,
1522
- class: O(["rc-search-area__option", { "is-selected": L(se) }]),
1523
- onClick: (ht) => Ae(se)
1700
+ k("div", an, T(E(l, c.value || void 0)), 1),
1701
+ k("div", nn, [
1702
+ (u(!0), f(j, null, te(b(l, c.value), (C, P) => (u(), f("div", {
1703
+ key: P,
1704
+ class: z(["rc-search-area__option", { "is-selected": U(C) }]),
1705
+ onClick: (ye) => se(C)
1524
1706
  }, [
1525
- k("span", Ha, R(Y(se, s.value || void 0)), 1),
1526
- L(se) ? (c(), ie(j(J), {
1707
+ k("span", rn, T(E(C, c.value || void 0)), 1),
1708
+ U(C) ? (u(), ue(G(J), {
1527
1709
  key: 0,
1528
1710
  name: "icon_check",
1529
1711
  class: "rc-search-area__option-check"
1530
- })) : w("", !0)
1531
- ], 10, ja))), 128))
1712
+ })) : S("", !0)
1713
+ ], 10, ln))), 128))
1532
1714
  ])
1533
1715
  ]))), 128))
1534
- ])) : ((W = s.value) == null ? void 0 : W.type) === "single" ? (c(), v("div", qa, [
1535
- (c(!0), v(H, null, ae(F(s.value), (N, ge) => (c(), v("div", {
1536
- key: ge,
1537
- class: O(["rc-search-area__option", { "is-selected": L(N) }]),
1538
- onClick: (se) => le(N)
1716
+ ])) : ((Te = c.value) == null ? void 0 : Te.type) === "single" ? (u(), f("div", on, [
1717
+ (u(!0), f(j, null, te(N(c.value), (l, p) => (u(), f("div", {
1718
+ key: p,
1719
+ class: z(["rc-search-area__option", { "is-selected": U(l) }]),
1720
+ onClick: (C) => O(l)
1539
1721
  }, [
1540
- k("span", Qa, R(Y(N, s.value || void 0)), 1),
1541
- L(N) ? (c(), ie(j(J), {
1722
+ k("span", cn, T(E(l, c.value || void 0)), 1),
1723
+ U(l) ? (u(), ue(G(J), {
1542
1724
  key: 0,
1543
1725
  name: "icon_check",
1544
1726
  class: "rc-search-area__option-check"
1545
- })) : w("", !0)
1546
- ], 10, Ja))), 128))
1547
- ])) : (c(), v("div", Xa, [
1548
- (c(!0), v(H, null, ae(F(s.value), (N, ge) => (c(), v("div", {
1549
- key: ge,
1550
- class: O(["rc-search-area__option", { "is-selected": L(N) }]),
1551
- onClick: (se) => Ae(N)
1727
+ })) : S("", !0)
1728
+ ], 10, sn))), 128))
1729
+ ])) : (u(), f("div", un, [
1730
+ (u(!0), f(j, null, te(N(c.value), (l, p) => (u(), f("div", {
1731
+ key: p,
1732
+ class: z(["rc-search-area__option", { "is-selected": U(l) }]),
1733
+ onClick: (C) => se(l)
1552
1734
  }, [
1553
- k("span", en, R(Y(N, s.value || void 0)), 1),
1554
- L(N) ? (c(), ie(j(J), {
1735
+ k("span", fn, T(E(l, c.value || void 0)), 1),
1736
+ U(l) ? (u(), ue(G(J), {
1555
1737
  key: 0,
1556
1738
  name: "icon_check",
1557
1739
  class: "rc-search-area__option-check"
1558
- })) : w("", !0)
1559
- ], 10, Za))), 128))
1740
+ })) : S("", !0)
1741
+ ], 10, dn))), 128))
1560
1742
  ])),
1561
- ((Ie = s.value) == null ? void 0 : Ie.type) !== "input" && ((z = s.value) == null ? void 0 : z.type) !== "calendar" && !((U = s.value) != null && U.slot) && ((qe = (He = s.value) == null ? void 0 : He.options) == null ? void 0 : qe.length) === 0 ? (c(), v("div", tn, [...n[2] || (n[2] = [
1743
+ ((We = c.value) == null ? void 0 : We.type) !== "input" && ((ze = c.value) == null ? void 0 : ze.type) !== "calendar" && !((Ue = c.value) != null && Ue.slot) && ((Ge = (Oe = c.value) == null ? void 0 : Oe.options) == null ? void 0 : Ge.length) === 0 ? (u(), f("div", vn, [...r[2] || (r[2] = [
1562
1744
  k("p", null, "暂无选项", -1)
1563
- ])])) : w("", !0)
1745
+ ])])) : S("", !0)
1564
1746
  ]),
1565
- !l.autoConfirm && ((Je = s.value) == null ? void 0 : Je.type) !== "single" && ((Qe = s.value) == null ? void 0 : Qe.type) !== "tree-single" ? (c(), v("div", an, [
1566
- E(j(ye), {
1747
+ !n.autoConfirm && ((Ke = c.value) == null ? void 0 : Ke.type) !== "single" && ((t = c.value) == null ? void 0 : t.type) !== "tree-single" ? (u(), f("div", pn, [
1748
+ L(G(pe), {
1567
1749
  block: "",
1568
- onClick: Ye
1750
+ onClick: Je
1569
1751
  }, {
1570
- default: ne(() => [...n[3] || (n[3] = [
1571
- de(" 重置 ", -1)
1752
+ default: H(() => [...r[3] || (r[3] = [
1753
+ ie(" 重置 ", -1)
1572
1754
  ])]),
1573
1755
  _: 1
1574
1756
  }),
1575
- E(j(ye), {
1757
+ L(G(pe), {
1576
1758
  type: "primary",
1577
1759
  block: "",
1578
- onClick: We
1760
+ onClick: Be
1579
1761
  }, {
1580
- default: ne(() => [
1581
- de(" 确定" + R(fe.value), 1)
1762
+ default: H(() => [
1763
+ ie(" 确定" + T(ge.value), 1)
1582
1764
  ]),
1583
1765
  _: 1
1584
1766
  })
1585
- ])) : w("", !0)
1586
- ], 512)) : w("", !0)
1767
+ ])) : S("", !0)
1768
+ ], 512)) : S("", !0)
1587
1769
  ];
1588
1770
  }),
1589
1771
  _: 3
1590
1772
  })
1591
1773
  ]));
1592
1774
  }
1593
- }), ct = /* @__PURE__ */ ue(nn, [["__scopeId", "data-v-d6546197"]]), ut = (e) => {
1594
- e.component("RcSearchArea", ct), e.component("rc-search-area", ct);
1595
- }, je = Symbol("RECYCLE_UI_CONFIG"), mt = {
1775
+ }), mt = /* @__PURE__ */ fe(mn, [["__scopeId", "data-v-d6546197"]]), yt = (e) => {
1776
+ e.component("RcSearchArea", mt), e.component("rc-search-area", mt);
1777
+ }, at = Symbol("RECYCLE_UI_CONFIG"), $t = {
1596
1778
  prefix: "rc",
1597
1779
  autoRegister: !0,
1598
- provideKey: je,
1780
+ provideKey: at,
1599
1781
  // 预留主题/其他全局配置
1600
1782
  theme: {},
1601
1783
  // IconFont 默认配置(可在 app.use 时覆盖)
1602
1784
  iconCssUrl: "//at.alicdn.com/t/c/font_4252799_o59odx6bqil.css",
1603
1785
  iconClass: "iconfont"
1604
1786
  };
1605
- function ln(e, r) {
1606
- r.autoRegister !== !1 && (typeof Xe == "function" && Xe(e), typeof Ze == "function" && Ze(e), typeof et == "function" && et(e), typeof at == "function" && at(e), typeof lt == "function" && lt(e), typeof nt == "function" && nt(e), typeof ut == "function" && ut(e), typeof st == "function" && st(e), typeof rt == "function" && rt(e));
1787
+ function yn(e, o) {
1788
+ o.autoRegister !== !1 && (typeof rt == "function" && rt(e), typeof ot == "function" && ot(e), typeof st == "function" && st(e), typeof ut == "function" && ut(e), typeof dt == "function" && dt(e), typeof it == "function" && it(e), typeof yt == "function" && yt(e), typeof pt == "function" && pt(e), typeof ft == "function" && ft(e));
1607
1789
  }
1608
- const yt = (e, r) => {
1609
- const d = { ...mt, ...r || {} };
1610
- if (e.provide(d.provideKey ?? je, d), e.config.globalProperties.$recycleUI = d, typeof window < "u" && d.iconCssUrl) {
1611
- const l = `link[rel="stylesheet"][data-rcui-icon="true"][href="${d.iconCssUrl}"]`;
1612
- if (!document.head.querySelector(l)) {
1613
- const b = document.createElement("link");
1614
- b.rel = "stylesheet", b.href = d.iconCssUrl, b.setAttribute("data-rcui-icon", "true"), document.head.appendChild(b);
1790
+ const Dt = (e, o) => {
1791
+ const d = { ...$t, ...o || {} };
1792
+ if (e.provide(d.provideKey ?? at, d), e.config.globalProperties.$recycleUI = d, typeof window < "u" && d.iconCssUrl) {
1793
+ const n = `link[rel="stylesheet"][data-rcui-icon="true"][href="${d.iconCssUrl}"]`;
1794
+ if (!document.head.querySelector(n)) {
1795
+ const $ = document.createElement("link");
1796
+ $.rel = "stylesheet", $.href = d.iconCssUrl, $.setAttribute("data-rcui-icon", "true"), document.head.appendChild($);
1615
1797
  }
1616
1798
  }
1617
- return ln(e, d), e;
1618
- }, un = { install: yt };
1619
- function dn(e) {
1799
+ return yn(e, d), e;
1800
+ }, bn = { install: Dt };
1801
+ function $n(e) {
1620
1802
  return {
1621
- install(r) {
1622
- yt(r, e);
1803
+ install(o) {
1804
+ Dt(o, e);
1623
1805
  }
1624
1806
  };
1625
1807
  }
1626
1808
  export {
1627
- je as RECYCLE_UI_SYMBOL,
1628
- ye as RcButton,
1629
- Re as RcCalendar,
1630
- Ne as RcCard,
1631
- on as RcDescriptions,
1632
- sn as RcDescriptionsItem,
1809
+ at as RECYCLE_UI_SYMBOL,
1810
+ pe as RcButton,
1811
+ Ye as RcCalendar,
1812
+ He as RcCard,
1813
+ gn as RcDescriptions,
1814
+ _n as RcDescriptionsItem,
1633
1815
  J as RcIcon,
1634
- Ve as RcPopup,
1635
- ct as RcSearchArea,
1636
- Ee as RcToast,
1637
- dn as createRecycleUI,
1638
- un as default,
1639
- mt as defaultRecycleUIConfig,
1640
- qt as hideToast,
1641
- yt as install,
1642
- Xe as installButton,
1643
- st as installCalendar,
1644
- et as installCard,
1645
- Ze as installDescriptions,
1646
- lt as installIcon,
1647
- nt as installMessage,
1648
- rt as installPopup,
1649
- ut as installSearchArea,
1650
- ta as message,
1651
- on as rcDescriptions,
1652
- sn as rcDescriptionsItem,
1653
- cn as showToast
1816
+ Fe as RcPopup,
1817
+ mt as RcSearchArea,
1818
+ qe as RcToast,
1819
+ $n as createRecycleUI,
1820
+ bn as default,
1821
+ $t as defaultRecycleUIConfig,
1822
+ aa as hideToast,
1823
+ Dt as install,
1824
+ rt as installButton,
1825
+ pt as installCalendar,
1826
+ st as installCard,
1827
+ ot as installDescriptions,
1828
+ dt as installIcon,
1829
+ it as installMessage,
1830
+ ft as installPopup,
1831
+ yt as installSearchArea,
1832
+ ca as message,
1833
+ gn as rcDescriptions,
1834
+ _n as rcDescriptionsItem,
1835
+ kn as showToast
1654
1836
  };
1655
1837
  //# sourceMappingURL=index.mjs.map