@rft-rc/recycle-ui 0.0.2-rc.2 → 0.0.2-rc.3

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,5 +1,5 @@
1
- import { defineComponent as F, inject as H, computed as C, onMounted as We, createElementBlock as u, openBlock as a, normalizeStyle as B, normalizeClass as E, createCommentVNode as $, toDisplayString as I, renderSlot as A, Fragment as L, createBlock as U, createTextVNode as ne, createElementVNode as g, ref as V, watchEffect as Xe, provide as Q, renderList as W, onUnmounted as ze, Teleport as Ze, createVNode as M, Transition as fe, withCtx as Z, createApp as et, reactive as tt, TransitionGroup as nt, render as Me, watch as Ie, nextTick as we, unref as q, withDirectives as st, vModelText as rt } from "vue";
2
- const at = {
1
+ import { defineComponent as F, inject as Y, computed as C, onMounted as We, createElementBlock as u, openBlock as l, normalizeStyle as T, normalizeClass as E, createCommentVNode as $, toDisplayString as w, renderSlot as A, Fragment as L, createBlock as U, createTextVNode as ae, createElementVNode as k, ref as V, watchEffect as Xe, provide as X, renderList as W, onUnmounted as ze, Teleport as Ze, createVNode as M, Transition as fe, withCtx as ee, createApp as et, reactive as tt, TransitionGroup as nt, render as Me, watch as Ie, nextTick as we, unref as H, withDirectives as at, vModelText as st } from "vue";
2
+ const rt = {
3
3
  key: 0,
4
4
  class: "rc-icon__unicode"
5
5
  }, lt = /* @__PURE__ */ F({
@@ -13,42 +13,42 @@ const at = {
13
13
  code: { default: "" }
14
14
  },
15
15
  setup(t) {
16
- const n = t, o = H(ve, {}), v = C(() => (o == null ? void 0 : o.iconClass) || "iconfont"), h = C(() => n.name || ""), p = C(() => typeof n.size == "number" ? `${n.size}px` : n.size || "16px"), y = C(() => ({
17
- fontSize: p.value,
18
- color: n.color || void 0,
16
+ const a = t, o = Y(ve, {}), d = C(() => (o == null ? void 0 : o.iconClass) || "iconfont"), y = C(() => a.name || ""), h = C(() => typeof a.size == "number" ? `${a.size}px` : a.size || "16px"), p = C(() => ({
17
+ fontSize: h.value,
18
+ color: a.color || void 0,
19
19
  lineHeight: 1,
20
20
  fontFamily: (o == null ? void 0 : o.iconClass) || "iconfont"
21
- })), d = C(() => {
22
- const c = n.code;
21
+ })), f = C(() => {
22
+ const c = a.code;
23
23
  if (c == null || c === "" || c === 0) return "";
24
24
  if (typeof c == "number")
25
25
  return String.fromCharCode(c);
26
- const f = String(c).replace(/^0x/i, ""), x = parseInt(f, 16);
26
+ const v = String(c).replace(/^0x/i, ""), x = parseInt(v, 16);
27
27
  return Number.isNaN(x) ? "" : String.fromCharCode(x);
28
28
  });
29
29
  return We(() => {
30
30
  if (typeof window > "u") return;
31
31
  const c = o && o.iconCssUrl || Ke.iconCssUrl;
32
32
  if (!c) return;
33
- const f = `link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;
34
- if (!document.head.querySelector(f)) {
33
+ const v = `link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;
34
+ if (!document.head.querySelector(v)) {
35
35
  const _ = document.createElement("link");
36
36
  _.rel = "stylesheet", _.href = c, _.setAttribute("data-rcui-icon", "true"), document.head.appendChild(_);
37
37
  }
38
- }), (c, f) => (a(), u("i", {
39
- class: E(["rc-icon", [v.value, h.value, { "rc-icon--spin": t.spin }]]),
40
- style: B(y.value),
38
+ }), (c, v) => (l(), u("i", {
39
+ class: E(["rc-icon", [d.value, y.value, { "rc-icon--spin": t.spin }]]),
40
+ style: T(p.value),
41
41
  "aria-hidden": "true"
42
42
  }, [
43
- d.value ? (a(), u("span", at, I(d.value), 1)) : $("", !0)
43
+ f.value ? (l(), u("span", rt, w(f.value), 1)) : $("", !0)
44
44
  ], 6));
45
45
  }
46
- }), O = (t, n) => {
46
+ }), O = (t, a) => {
47
47
  const o = t.__vccOpts || t;
48
- for (const [v, h] of n)
49
- o[v] = h;
48
+ for (const [d, y] of a)
49
+ o[d] = y;
50
50
  return o;
51
- }, T = /* @__PURE__ */ O(lt, [["__scopeId", "data-v-3857a892"]]), ot = ["disabled"], ct = {
51
+ }, B = /* @__PURE__ */ O(lt, [["__scopeId", "data-v-3857a892"]]), ot = ["disabled"], ct = {
52
52
  key: 0,
53
53
  class: "rc-button__spinner"
54
54
  }, ut = {
@@ -72,35 +72,35 @@ const at = {
72
72
  suffixIcon: { default: "" }
73
73
  },
74
74
  emits: ["click"],
75
- setup(t, { emit: n }) {
76
- const o = t, v = n, h = (y) => {
77
- !o.disabled && !o.loading && v("click", y);
78
- }, p = C(() => {
79
- const y = o.round;
80
- return typeof y == "boolean" ? y ? "999px" : "6px" : typeof y == "number" ? `${y}px` : String(y);
75
+ setup(t, { emit: a }) {
76
+ const o = t, d = a, y = (p) => {
77
+ !o.disabled && !o.loading && d("click", p);
78
+ }, h = C(() => {
79
+ const p = o.round;
80
+ return typeof p == "boolean" ? p ? "999px" : "6px" : typeof p == "number" ? `${p}px` : String(p);
81
81
  });
82
- return (y, d) => (a(), u("button", {
82
+ return (p, f) => (l(), u("button", {
83
83
  class: E(["rc-button", [`rc-button--${t.type}`, `rc-button--${t.size}`, t.mode ? `rc-button--${t.mode}` : "", { "is-block": t.block, "is-disabled": t.disabled, "is-loading": t.loading }]]),
84
- style: B({ borderRadius: p.value }),
84
+ style: T({ borderRadius: h.value }),
85
85
  disabled: t.disabled || t.loading,
86
- onClick: h
86
+ onClick: y
87
87
  }, [
88
- t.loading ? (a(), u("span", ct)) : (a(), u(L, { key: 1 }, [
89
- t.preIcon || y.$slots.preIcon ? (a(), u("span", ut, [
90
- A(y.$slots, "preIcon", {}, () => [
91
- t.preIcon ? (a(), U(T, {
88
+ t.loading ? (l(), u("span", ct)) : (l(), u(L, { key: 1 }, [
89
+ t.preIcon || p.$slots.preIcon ? (l(), u("span", ut, [
90
+ A(p.$slots, "preIcon", {}, () => [
91
+ t.preIcon ? (l(), U(B, {
92
92
  key: 0,
93
93
  name: t.preIcon
94
94
  }, null, 8, ["name"])) : $("", !0)
95
95
  ], !0)
96
96
  ])) : $("", !0)
97
97
  ], 64)),
98
- A(y.$slots, "default", {}, () => [
99
- ne(I(t.label), 1)
98
+ A(p.$slots, "default", {}, () => [
99
+ ae(w(t.label), 1)
100
100
  ], !0),
101
- !t.loading && (t.suffixIcon || y.$slots.suffixIcon) ? (a(), u("span", it, [
102
- A(y.$slots, "suffixIcon", {}, () => [
103
- t.suffixIcon ? (a(), U(T, {
101
+ !t.loading && (t.suffixIcon || p.$slots.suffixIcon) ? (l(), u("span", it, [
102
+ A(p.$slots, "suffixIcon", {}, () => [
103
+ t.suffixIcon ? (l(), U(B, {
104
104
  key: 0,
105
105
  name: t.suffixIcon
106
106
  }, null, 8, ["name"])) : $("", !0)
@@ -108,10 +108,10 @@ const at = {
108
108
  ])) : $("", !0)
109
109
  ], 14, ot));
110
110
  }
111
- }), ae = /* @__PURE__ */ O(dt, [["__scopeId", "data-v-3ed3109f"]]);
112
- ae.name = "rc-button";
111
+ }), le = /* @__PURE__ */ O(dt, [["__scopeId", "data-v-3ed3109f"]]);
112
+ le.name = "rc-button";
113
113
  function Ae(t) {
114
- return t.component(ae.name, ae), t;
114
+ return t.component(le.name, le), t;
115
115
  }
116
116
  const ft = { class: "rc-desc-item__value" }, vt = /* @__PURE__ */ F({
117
117
  name: "rc-descriptions-item",
@@ -123,40 +123,40 @@ const ft = { class: "rc-desc-item__value" }, vt = /* @__PURE__ */ F({
123
123
  span: { default: 1 }
124
124
  },
125
125
  setup(t) {
126
- const n = t;
127
- H("rcDescItemWidth", void 0), H("rcDescSingleWidth", ""), H("rcDescGap", "0px");
128
- const o = H("rcDescGapPx", 0), v = H("rcDescColCount", 1), h = H("rcDescLabelWidth", ""), p = C(() => {
129
- const c = typeof n.span == "string" ? parseInt(n.span, 10) : n.span, f = typeof (v == null ? void 0 : v.value) == "number" ? v.value : v, x = !Number.isNaN(c) && c > 0 ? c : 1;
130
- return Math.min(x, f || 1);
131
- }), y = C(() => {
132
- const c = typeof (v == null ? void 0 : v.value) == "number" ? v.value : v, f = typeof (o == null ? void 0 : o.value) == "number" ? o.value : o, x = p.value;
126
+ const a = t;
127
+ Y("rcDescItemWidth", void 0), Y("rcDescSingleWidth", ""), Y("rcDescGap", "0px");
128
+ const o = Y("rcDescGapPx", 0), d = Y("rcDescColCount", 1), y = Y("rcDescLabelWidth", ""), h = C(() => {
129
+ const c = typeof a.span == "string" ? parseInt(a.span, 10) : a.span, v = typeof (d == null ? void 0 : d.value) == "number" ? d.value : d, x = !Number.isNaN(c) && c > 0 ? c : 1;
130
+ return Math.min(x, v || 1);
131
+ }), p = C(() => {
132
+ const c = typeof (d == null ? void 0 : d.value) == "number" ? d.value : d, v = typeof (o == null ? void 0 : o.value) == "number" ? o.value : o, x = h.value;
133
133
  if (!c || c <= 1 || x >= c) return "100%";
134
- const _ = (c - 1) * f, w = (x - 1) * f;
135
- return `calc((100% - ${_}px) * ${x} / ${c} + ${w}px)`;
136
- }), d = C(() => {
137
- const c = typeof (h == null ? void 0 : h.value) == "string" ? h.value : h, f = n.labelWidth !== "" ? n.labelWidth : c || "";
138
- return f ? { width: typeof f == "number" ? `${f}px` : String(f), flex: "0 0 auto" } : {};
134
+ const _ = (c - 1) * v, I = (x - 1) * v;
135
+ return `calc((100% - ${_}px) * ${x} / ${c} + ${I}px)`;
136
+ }), f = C(() => {
137
+ const c = typeof (y == null ? void 0 : y.value) == "string" ? y.value : y, v = a.labelWidth !== "" ? a.labelWidth : c || "";
138
+ return v ? { width: typeof v == "number" ? `${v}px` : String(v), flex: "0 0 auto" } : {};
139
139
  });
140
- return (c, f) => (a(), u("div", {
140
+ return (c, v) => (l(), u("div", {
141
141
  class: "rc-desc-item",
142
- style: B({ width: y.value, flex: `0 0 ${y.value}` })
142
+ style: T({ width: p.value, flex: `0 0 ${p.value}` })
143
143
  }, [
144
- g("div", {
144
+ k("div", {
145
145
  class: "rc-desc-item__label",
146
- style: B(d.value)
146
+ style: T(f.value)
147
147
  }, [
148
148
  A(c.$slots, "label", {}, () => [
149
- ne(I(t.label), 1)
149
+ ae(w(t.label), 1)
150
150
  ], !0)
151
151
  ], 4),
152
- g("div", ft, [
152
+ k("div", ft, [
153
153
  A(c.$slots, "default", {}, () => [
154
- ne(I(t.value), 1)
154
+ ae(w(t.value), 1)
155
155
  ], !0)
156
156
  ])
157
157
  ], 4));
158
158
  }
159
- }), ee = /* @__PURE__ */ O(vt, [["__scopeId", "data-v-970d0b99"]]), yt = { class: "rc-descriptions" }, pt = {
159
+ }), te = /* @__PURE__ */ O(vt, [["__scopeId", "data-v-970d0b99"]]), yt = { class: "rc-descriptions" }, pt = {
160
160
  key: 0,
161
161
  class: "rc-descriptions__title"
162
162
  }, ht = /* @__PURE__ */ F({
@@ -171,57 +171,57 @@ const ft = { class: "rc-desc-item__value" }, vt = /* @__PURE__ */ F({
171
171
  keyMap: {}
172
172
  },
173
173
  setup(t) {
174
- const n = t, o = V(null), v = C(() => typeof n.gap == "number" ? `${n.gap}px` : String(n.gap)), h = C(() => {
175
- const f = typeof n.column == "string" ? Number.parseInt(n.column, 10) : n.column ?? 1;
176
- return !Number.isNaN(f) && f > 0 ? f : 1;
177
- }), p = V("100%"), y = V("100%");
174
+ const a = t, o = V(null), d = C(() => typeof a.gap == "number" ? `${a.gap}px` : String(a.gap)), y = C(() => {
175
+ const v = typeof a.column == "string" ? Number.parseInt(a.column, 10) : a.column ?? 1;
176
+ return !Number.isNaN(v) && v > 0 ? v : 1;
177
+ }), h = V("100%"), p = V("100%");
178
178
  Xe(() => {
179
- const f = h.value;
180
- if (f <= 1)
181
- p.value = "100%", y.value = "100%";
179
+ const v = y.value;
180
+ if (v <= 1)
181
+ h.value = "100%", p.value = "100%";
182
182
  else {
183
- const x = typeof n.gap == "number" ? n.gap : parseFloat(String(n.gap)) || 0, w = `calc((100% - ${(f - 1) * x}px) / ${f})`;
184
- y.value = w, p.value = w;
183
+ const x = typeof a.gap == "number" ? a.gap : parseFloat(String(a.gap)) || 0, I = `calc((100% - ${(v - 1) * x}px) / ${v})`;
184
+ p.value = I, h.value = I;
185
185
  }
186
- }), Q("rcDescItemWidth", p), Q("rcDescSingleWidth", y), Q("rcDescColCount", h), Q("rcDescGapPx", C(() => typeof n.gap == "number" ? n.gap : parseFloat(String(n.gap)) || 0));
187
- const d = C(() => n.labelWidth === "" || n.labelWidth === void 0 ? "" : typeof n.labelWidth == "number" ? `${n.labelWidth}px` : String(n.labelWidth));
188
- Q("rcDescLabelWidth", d), Q("rcDescGap", C(() => typeof n.gap == "number" ? `${n.gap}px` : String(n.gap)));
186
+ }), X("rcDescItemWidth", h), X("rcDescSingleWidth", p), X("rcDescColCount", y), X("rcDescGapPx", C(() => typeof a.gap == "number" ? a.gap : parseFloat(String(a.gap)) || 0));
187
+ const f = C(() => a.labelWidth === "" || a.labelWidth === void 0 ? "" : typeof a.labelWidth == "number" ? `${a.labelWidth}px` : String(a.labelWidth));
188
+ X("rcDescLabelWidth", f), X("rcDescGap", C(() => typeof a.gap == "number" ? `${a.gap}px` : String(a.gap)));
189
189
  const c = C(() => {
190
- var _, w, R;
191
- const f = ((_ = n.keyMap) == null ? void 0 : _.key) ?? "label", x = ((w = n.keyMap) == null ? void 0 : w.value) ?? "value";
192
- return (R = n.data) != null && R.length ? n.data.map((m) => ({
193
- label: m == null ? void 0 : m[f],
190
+ var _, I, R;
191
+ const v = ((_ = a.keyMap) == null ? void 0 : _.key) ?? "label", x = ((I = a.keyMap) == null ? void 0 : I.value) ?? "value";
192
+ return (R = a.data) != null && R.length ? a.data.map((m) => ({
193
+ label: m == null ? void 0 : m[v],
194
194
  value: m == null ? void 0 : m[x]
195
195
  })) : [];
196
196
  });
197
- return (f, x) => (a(), u("div", yt, [
198
- f.$slots.title || t.title ? (a(), u("div", pt, [
199
- A(f.$slots, "title", {}, () => [
200
- ne(I(t.title), 1)
197
+ return (v, x) => (l(), u("div", yt, [
198
+ v.$slots.title || t.title ? (l(), u("div", pt, [
199
+ A(v.$slots, "title", {}, () => [
200
+ ae(w(t.title), 1)
201
201
  ], !0)
202
202
  ])) : $("", !0),
203
- g("div", {
203
+ k("div", {
204
204
  class: "rc-descriptions__body",
205
- style: B({ gap: v.value }),
205
+ style: T({ gap: d.value }),
206
206
  ref_key: "wrapEl",
207
207
  ref: o
208
208
  }, [
209
- c.value.length ? (a(!0), u(L, { key: 0 }, W(c.value, (_, w) => (a(), U(ee, {
210
- key: w,
209
+ c.value.length ? (l(!0), u(L, { key: 0 }, W(c.value, (_, I) => (l(), U(te, {
210
+ key: I,
211
211
  label: _.label,
212
212
  value: _.value,
213
213
  "label-width": t.labelWidth
214
- }, null, 8, ["label", "value", "label-width"]))), 128)) : A(f.$slots, "default", { key: 1 }, void 0, !0)
214
+ }, null, 8, ["label", "value", "label-width"]))), 128)) : A(v.$slots, "default", { key: 1 }, void 0, !0)
215
215
  ], 4)
216
216
  ]));
217
217
  }
218
218
  }), re = /* @__PURE__ */ O(ht, [["__scopeId", "data-v-5fcaa235"]]);
219
219
  re.name = "rc-descriptions";
220
- ee.name = "rc-descriptions-item";
220
+ te.name = "rc-descriptions-item";
221
221
  function Ve(t) {
222
- return t.component(re.name, re), t.component("RcDescriptions", re), t.component(ee.name, ee), t.component("RcDescriptionsItem", ee), t;
222
+ return t.component(re.name, re), t.component("RcDescriptions", re), t.component(te.name, te), t.component("RcDescriptionsItem", te), t;
223
223
  }
224
- const vn = re, yn = ee, _t = { class: "rc-card__title" }, mt = { class: "rc-card__title-text" }, gt = {
224
+ const vn = re, yn = te, mt = { class: "rc-card__title" }, _t = { class: "rc-card__title-text" }, gt = {
225
225
  key: 0,
226
226
  class: "rc-card__status"
227
227
  }, kt = {
@@ -248,62 +248,62 @@ const vn = re, yn = ee, _t = { class: "rc-card__title" }, mt = { class: "rc-card
248
248
  height: { default: "" }
249
249
  },
250
250
  setup(t) {
251
- const n = t, o = C(() => {
252
- const d = typeof n.round == "boolean" ? n.round ? "12px" : "0" : typeof n.round == "number" ? `${n.round}px` : String(n.round);
251
+ const a = t, o = C(() => {
252
+ const f = typeof a.round == "boolean" ? a.round ? "12px" : "0" : typeof a.round == "number" ? `${a.round}px` : String(a.round);
253
253
  return {
254
- backgroundColor: n.color || "var(--rc-white)",
255
- borderRadius: d,
256
- boxShadow: y(n.elevation),
257
- width: p(n.width),
258
- height: p(n.height)
254
+ backgroundColor: a.color || "var(--rc-white)",
255
+ borderRadius: f,
256
+ boxShadow: p(a.elevation),
257
+ width: h(a.width),
258
+ height: h(a.height)
259
259
  };
260
- }), v = C(() => n.padding || "16px"), h = C(
261
- () => typeof n.gap == "number" ? `${n.gap}px` : String(n.gap)
260
+ }), d = C(() => a.padding || "16px"), y = C(
261
+ () => typeof a.gap == "number" ? `${a.gap}px` : String(a.gap)
262
262
  );
263
- function p(d) {
264
- return d == null || d === "" ? "" : typeof d == "number" ? `${d}px` : String(d);
263
+ function h(f) {
264
+ return f == null || f === "" ? "" : typeof f == "number" ? `${f}px` : String(f);
265
265
  }
266
- function y(d) {
267
- if (!d || d <= 0) return "none";
268
- const c = 4 * d;
266
+ function p(f) {
267
+ if (!f || f <= 0) return "none";
268
+ const c = 4 * f;
269
269
  return `0 ${Math.round(c / 2)}px ${c}px rgba(0,0,0,0.06), 0 ${Math.round(
270
270
  c / 4
271
271
  )}px ${Math.round(c / 2)}px rgba(0,0,0,0.04)`;
272
272
  }
273
- return (d, c) => (a(), u("div", {
273
+ return (f, c) => (l(), u("div", {
274
274
  class: E(["rc-card", [{ "rc-card--bordered": t.bordered }]]),
275
- style: B(o.value)
275
+ style: T(o.value)
276
276
  }, [
277
- d.$slots.title || t.title || d.$slots.status || t.status ? (a(), u("div", {
277
+ f.$slots.title || t.title || f.$slots.status || t.status ? (l(), u("div", {
278
278
  key: 0,
279
279
  class: "rc-card__top",
280
- style: B({ backgroundColor: t.topBgColor || "rgba(29, 133, 252, 0.05)" })
280
+ style: T({ backgroundColor: t.topBgColor || "rgba(29, 133, 252, 0.05)" })
281
281
  }, [
282
- g("div", _t, [
283
- A(d.$slots, "title", {}, () => [
284
- g("span", mt, I(t.title), 1)
282
+ k("div", mt, [
283
+ A(f.$slots, "title", {}, () => [
284
+ k("span", _t, w(t.title), 1)
285
285
  ], !0)
286
286
  ]),
287
- d.$slots.status || t.status ? (a(), u("div", gt, [
288
- A(d.$slots, "status", {}, () => [
289
- g("span", {
287
+ f.$slots.status || t.status ? (l(), u("div", gt, [
288
+ A(f.$slots, "status", {}, () => [
289
+ k("span", {
290
290
  class: "rc-card__status-text",
291
- style: B({ color: t.statusColor || "var(--rc-primary)" })
292
- }, I(t.status), 5)
291
+ style: T({ color: t.statusColor || "var(--rc-primary)" })
292
+ }, w(t.status), 5)
293
293
  ], !0)
294
294
  ])) : $("", !0)
295
295
  ], 4)) : $("", !0),
296
- g("div", {
296
+ k("div", {
297
297
  class: "rc-card__body",
298
- style: B({ padding: v.value, gap: h.value })
298
+ style: T({ padding: d.value, gap: y.value })
299
299
  }, [
300
- A(d.$slots, "content", {}, () => [
301
- A(d.$slots, "default", {}, void 0, !0)
300
+ A(f.$slots, "content", {}, () => [
301
+ A(f.$slots, "default", {}, void 0, !0)
302
302
  ], !0)
303
303
  ], 4),
304
- d.$slots.action ? (a(), u("div", kt)) : $("", !0),
305
- d.$slots.action ? (a(), u("div", bt, [
306
- A(d.$slots, "action", {}, void 0, !0)
304
+ f.$slots.action ? (l(), u("div", kt)) : $("", !0),
305
+ f.$slots.action ? (l(), u("div", bt, [
306
+ A(f.$slots, "action", {}, void 0, !0)
307
307
  ])) : $("", !0)
308
308
  ], 6));
309
309
  }
@@ -334,70 +334,70 @@ const St = {
334
334
  mask: { type: Boolean, default: !1 },
335
335
  onAfterLeave: {}
336
336
  },
337
- setup(t, { expose: n }) {
338
- const o = t, v = V(!0);
339
- let h;
340
- function p() {
341
- h && (clearTimeout(h), h = null);
337
+ setup(t, { expose: a }) {
338
+ const o = t, d = V(!0);
339
+ let y;
340
+ function h() {
341
+ y && (clearTimeout(y), y = null);
342
342
  }
343
- function y() {
344
- p(), v.value = !1;
343
+ function p() {
344
+ h(), d.value = !1;
345
345
  }
346
- return n({ close: y }), We(() => {
347
- o.duration && o.duration > 0 && (h = setTimeout(() => {
348
- y();
346
+ return a({ close: p }), We(() => {
347
+ o.duration && o.duration > 0 && (y = setTimeout(() => {
348
+ p();
349
349
  }, o.duration));
350
350
  }), ze(() => {
351
- p();
352
- }), (d, c) => (a(), u(L, null, [
353
- (a(), U(Ze, { to: "body" }, [
351
+ h();
352
+ }), (f, c) => (l(), u(L, null, [
353
+ (l(), U(Ze, { to: "body" }, [
354
354
  M(fe, {
355
355
  name: "rc-toast-fade",
356
356
  onAfterLeave: t.onAfterLeave
357
357
  }, {
358
- default: Z(() => [
359
- v.value ? (a(), u("div", {
358
+ default: ee(() => [
359
+ d.value ? (l(), u("div", {
360
360
  key: 0,
361
361
  class: E(["rc-toast", [`rc-toast--${t.type}`]])
362
362
  }, [
363
- t.mask ? (a(), u("div", St)) : $("", !0),
364
- g("div", xt, [
365
- t.type === "loading" ? (a(), u("div", It)) : t.type === "success" ? (a(), u("div", wt)) : t.type === "fail" ? (a(), u("div", At)) : $("", !0),
366
- g("div", Vt, I(t.message), 1)
363
+ t.mask ? (l(), u("div", St)) : $("", !0),
364
+ k("div", xt, [
365
+ t.type === "loading" ? (l(), u("div", It)) : t.type === "success" ? (l(), u("div", wt)) : t.type === "fail" ? (l(), u("div", At)) : $("", !0),
366
+ k("div", Vt, w(t.message), 1)
367
367
  ])
368
368
  ], 2)) : $("", !0)
369
369
  ]),
370
370
  _: 1
371
371
  }, 8, ["onAfterLeave"])
372
372
  ])),
373
- A(d.$slots, "default", {}, void 0, !0)
373
+ A(f.$slots, "default", {}, void 0, !0)
374
374
  ], 64));
375
375
  }
376
376
  }), ue = /* @__PURE__ */ O(Rt, [["__scopeId", "data-v-d234c9c5"]]);
377
- let Y = null, te = null;
377
+ let J = null, ne = null;
378
378
  function De() {
379
- Y && (Y.unmount(), Y = null), te && (document.body.removeChild(te), te = null);
379
+ J && (J.unmount(), J = null), ne && (document.body.removeChild(ne), ne = null);
380
380
  }
381
381
  function pn(t) {
382
- const n = typeof t == "string" ? { message: t } : t || {};
383
- De(), te = document.createElement("div"), document.body.appendChild(te);
382
+ const a = typeof t == "string" ? { message: t } : t || {};
383
+ De(), ne = document.createElement("div"), document.body.appendChild(ne);
384
384
  const o = {
385
- message: n.message,
386
- type: n.type ?? "text",
387
- duration: n.duration ?? 2e3,
388
- mask: n.mask ?? !1,
385
+ message: a.message,
386
+ type: a.type ?? "text",
387
+ duration: a.duration ?? 2e3,
388
+ mask: a.mask ?? !1,
389
389
  onAfterLeave: () => {
390
- var v;
391
- De(), (v = n.onClose) == null || v.call(n);
390
+ var d;
391
+ De(), (d = a.onClose) == null || d.call(a);
392
392
  }
393
393
  };
394
- return Y = et(ue, o), Y.mount(te), {
394
+ return J = et(ue, o), J.mount(ne), {
395
395
  close: Dt
396
396
  };
397
397
  }
398
398
  function Dt() {
399
- var t, n, o;
400
- Y && ((o = (n = (t = Y._instance) == null ? void 0 : t.exposed) == null ? void 0 : n.close) == null || o.call(n));
399
+ var t, a, o;
400
+ J && ((o = (a = (t = J._instance) == null ? void 0 : t.exposed) == null ? void 0 : a.close) == null || o.call(a));
401
401
  }
402
402
  ue.name = "rc-toast";
403
403
  function Le(t) {
@@ -407,69 +407,69 @@ const Lt = {
407
407
  class: "rc-message",
408
408
  role: "alert",
409
409
  "aria-live": "polite"
410
- }, Et = { class: "rc-message__content" }, Tt = /* @__PURE__ */ F({
410
+ }, Et = { class: "rc-message__content" }, Bt = /* @__PURE__ */ F({
411
411
  __name: "index",
412
- setup(t, { expose: n }) {
412
+ setup(t, { expose: a }) {
413
413
  const o = tt([]);
414
- let v = 1;
415
- function h(y) {
416
- const d = o.findIndex((c) => c.id === y);
417
- d >= 0 && o.splice(d, 1);
414
+ let d = 1;
415
+ function y(p) {
416
+ const f = o.findIndex((c) => c.id === p);
417
+ f >= 0 && o.splice(f, 1);
418
418
  }
419
- function p(y, d, c) {
420
- const f = v++;
421
- return o.push({ id: f, type: y, content: d, duration: c }), c > 0 && window.setTimeout(() => h(f), c), f;
419
+ function h(p, f, c) {
420
+ const v = d++;
421
+ return o.push({ id: v, type: p, content: f, duration: c }), c > 0 && window.setTimeout(() => y(v), c), v;
422
422
  }
423
- return n({ add: p, remove: h }), (y, d) => (a(), u("div", Lt, [
423
+ return a({ add: h, remove: y }), (p, f) => (l(), u("div", Lt, [
424
424
  M(nt, {
425
425
  name: "rc-message-fade",
426
426
  tag: "div"
427
427
  }, {
428
- default: Z(() => [
429
- (a(!0), u(L, null, W(o, (c) => (a(), u("div", {
428
+ default: ee(() => [
429
+ (l(!0), u(L, null, W(o, (c) => (l(), u("div", {
430
430
  key: c.id,
431
431
  class: E(["rc-message__item", `rc-message--${c.type}`])
432
432
  }, [
433
- g("span", Et, I(c.content), 1)
433
+ k("span", Et, w(c.content), 1)
434
434
  ], 2))), 128))
435
435
  ]),
436
436
  _: 1
437
437
  })
438
438
  ]));
439
439
  }
440
- }), Bt = /* @__PURE__ */ O(Tt, [["__scopeId", "data-v-87811df0"]]);
440
+ }), Tt = /* @__PURE__ */ O(Bt, [["__scopeId", "data-v-87811df0"]]);
441
441
  let G = null, K = null;
442
442
  function Nt() {
443
- var n;
443
+ var a;
444
444
  if (G && K) return;
445
445
  G = document.createElement("div"), document.body.appendChild(G);
446
- const t = M(Bt, {});
447
- Me(t, G), K = (n = t.component) == null ? void 0 : n.exposed;
446
+ const t = M(Tt, {});
447
+ Me(t, G), K = (a = t.component) == null ? void 0 : a.exposed;
448
448
  }
449
- function X(t, n, o) {
450
- var h;
449
+ function Z(t, a, o) {
450
+ var y;
451
451
  Nt();
452
- const v = typeof o == "number" ? o : t === "loading" ? 0 : 2e3;
453
- return (h = K == null ? void 0 : K.add) == null ? void 0 : h.call(K, t, n, v);
452
+ const d = typeof o == "number" ? o : t === "loading" ? 0 : 2e3;
453
+ return (y = K == null ? void 0 : K.add) == null ? void 0 : y.call(K, t, a, d);
454
454
  }
455
455
  const Wt = {
456
456
  open(t) {
457
- return X(t.type || "info", t.content, t.duration);
457
+ return Z(t.type || "info", t.content, t.duration);
458
458
  },
459
- info(t, n) {
460
- return X("info", t, n);
459
+ info(t, a) {
460
+ return Z("info", t, a);
461
461
  },
462
- success(t, n) {
463
- return X("success", t, n);
462
+ success(t, a) {
463
+ return Z("success", t, a);
464
464
  },
465
- warning(t, n) {
466
- return X("warning", t, n);
465
+ warning(t, a) {
466
+ return Z("warning", t, a);
467
467
  },
468
- error(t, n) {
469
- return X("error", t, n);
468
+ error(t, a) {
469
+ return Z("error", t, a);
470
470
  },
471
- loading(t, n) {
472
- return X("loading", t, n);
471
+ loading(t, a) {
472
+ return Z("loading", t, a);
473
473
  },
474
474
  destroy() {
475
475
  G && (Me(null, G), G.remove(), G = null, K = null);
@@ -478,9 +478,9 @@ const Wt = {
478
478
  function Ee(t) {
479
479
  return t.config.globalProperties.$message = Wt, t;
480
480
  }
481
- T.name = "rc-icon";
482
- function Te(t) {
483
- return t.component(T.name, T), t.component("RcIcon", T), t;
481
+ B.name = "rc-icon";
482
+ function Be(t) {
483
+ return t.component(B.name, B), t.component("RcIcon", B), t;
484
484
  }
485
485
  const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, Kt = ["onClick"], Ut = { class: "rc-search-area__item-label" }, Gt = { class: "rc-search-area__panel-content" }, Ft = {
486
486
  key: 1,
@@ -494,10 +494,10 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
494
494
  }, Qt = { class: "rc-search-area__tree-group-title" }, Xt = { class: "rc-search-area__tree-group-options" }, Zt = ["onClick"], en = { class: "rc-search-area__option-label" }, tn = {
495
495
  key: 4,
496
496
  class: "rc-search-area__options-grid"
497
- }, nn = ["onClick"], sn = { class: "rc-search-area__option-label" }, rn = {
497
+ }, nn = ["onClick"], an = { class: "rc-search-area__option-label" }, sn = {
498
498
  key: 5,
499
499
  class: "rc-search-area__options-grid"
500
- }, an = ["onClick"], ln = { class: "rc-search-area__option-label" }, on = {
500
+ }, rn = ["onClick"], ln = { class: "rc-search-area__option-label" }, on = {
501
501
  key: 6,
502
502
  class: "rc-search-area__empty"
503
503
  }, cn = {
@@ -509,60 +509,61 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
509
509
  props: {
510
510
  items: { default: () => [] },
511
511
  modelValue: { default: () => ({}) },
512
- showMask: { type: Boolean, default: !0 }
512
+ showMask: { type: Boolean, default: !0 },
513
+ autoConfirm: { type: Boolean, default: !1 }
513
514
  },
514
515
  emits: ["update:modelValue", "change"],
515
- setup(t, { expose: n, emit: o }) {
516
- const v = t, h = o, p = V(null), y = V(null), d = V(null), c = V({ top: "0px" }), f = async () => {
517
- if (p.value === null || !y.value)
516
+ setup(t, { expose: a, emit: o }) {
517
+ const d = t, y = o, h = V(null), p = V(null), f = V(null), c = V({ top: "0px" }), v = async () => {
518
+ if (h.value === null || !p.value)
518
519
  return;
519
520
  await we();
520
- const s = y.value.getBoundingClientRect().top;
521
- c.value = { top: `${s}px` };
521
+ const n = p.value.getBoundingClientRect().top;
522
+ c.value = { top: `${n}px` };
522
523
  }, x = (e) => {
523
- if (p.value === null || !y.value)
524
+ if (h.value === null || !p.value)
524
525
  return;
525
- const s = e.target;
526
- if (y.value.contains(s))
526
+ const n = e.target;
527
+ if (p.value.contains(n))
527
528
  return;
528
- const r = y.value.closest(".rc-search-area");
529
- if (r) {
530
- const i = r.querySelector(".rc-search-area__bar");
531
- if (i && i.contains(s))
529
+ const s = p.value.closest(".rc-search-area");
530
+ if (s) {
531
+ const i = s.querySelector(".rc-search-area__bar");
532
+ if (i && i.contains(n))
532
533
  return;
533
534
  }
534
- le();
535
+ j();
535
536
  };
536
- Ie(p, async (e) => {
537
- e !== null ? (await we(), f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), document.addEventListener("click", x, !0)) : (window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0), document.removeEventListener("click", x, !0));
537
+ Ie(h, async (e) => {
538
+ e !== null ? (await we(), v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), document.addEventListener("click", x, !0)) : (window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0), document.removeEventListener("click", x, !0));
538
539
  }), ze(() => {
539
- window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0), document.removeEventListener("click", x, !0);
540
+ window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0), document.removeEventListener("click", x, !0);
540
541
  });
541
- const _ = V({}), w = V(""), R = V({}), m = V({ ...v.modelValue });
542
- Ie(() => v.modelValue, (e) => {
542
+ const _ = V({}), I = V(""), R = V({}), m = V({ ...d.modelValue });
543
+ Ie(() => d.modelValue, (e) => {
543
544
  m.value = { ...e || {} };
544
545
  }, { deep: !0, immediate: !0 });
545
- const l = C(() => p.value === null ? null : v.items[p.value]), Ge = C(() => {
546
- if (!l.value) return "";
547
- const e = Je(l.value);
546
+ const r = C(() => h.value === null ? null : d.items[h.value]), Ge = C(() => {
547
+ if (!r.value) return "";
548
+ const e = Je(r.value);
548
549
  return e > 0 ? `(${e}项)` : "";
549
550
  }), Fe = (e) => {
550
- const s = m.value[e.key];
551
- if (s == null || s === "" || e.slot)
551
+ const n = m.value[e.key];
552
+ if (n == null || n === "" || e.slot)
552
553
  return e.label;
553
554
  if (e.type === "input") {
554
- if (s && String(s).trim())
555
- return `${e.label}: ${s}`;
555
+ if (n && String(n).trim())
556
+ return `${e.label}: ${n}`;
556
557
  } else if (e.type === "single" || e.type === "tree-single") {
557
- const r = ie(e, s);
558
- if (r)
559
- return `${e.label}: ${ye(r, e)}`;
558
+ const s = ie(e, n);
559
+ if (s)
560
+ return `${e.label}: ${ye(s, e)}`;
560
561
  } else {
561
- const r = Array.isArray(s) ? s : [s];
562
- if (r.length > 0) {
563
- const i = r.map((b) => {
564
- const k = ie(e, b);
565
- return k ? ye(k, e) : null;
562
+ const s = Array.isArray(n) ? n : [n];
563
+ if (s.length > 0) {
564
+ const i = s.map((b) => {
565
+ const g = ie(e, b);
566
+ return g ? ye(g, e) : null;
566
567
  }).filter((b) => b !== null);
567
568
  if (i.length > 0)
568
569
  return `${e.label}: ${i.join("、")}`;
@@ -570,212 +571,222 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
570
571
  }
571
572
  return e.label;
572
573
  }, Oe = (e) => {
573
- const s = v.items[e];
574
- if (!s) return;
575
- if (p.value === e) {
576
- p.value = null;
574
+ const n = d.items[e];
575
+ if (!n) return;
576
+ if (h.value === e) {
577
+ h.value = null;
577
578
  return;
578
579
  }
579
- const r = m.value[s.key];
580
- s.slot ? R.value[s.key] = r !== void 0 ? typeof r == "object" && r !== null ? { ...r } : r : void 0 : s.type === "input" ? w.value = r != null ? String(r) : "" : s.type === "single" || s.type === "tree-single" ? _.value[s.key] = r !== void 0 ? r : null : _.value[s.key] = r !== void 0 ? Array.isArray(r) ? [...r] : [r] : [], p.value = e;
581
- }, le = () => {
582
- p.value = null;
583
- }, j = (e, s) => {
584
- if (!s)
580
+ const s = m.value[n.key];
581
+ n.slot ? R.value[n.key] = s !== void 0 ? typeof s == "object" && s !== null ? { ...s } : s : void 0 : n.type === "input" ? I.value = s != null ? String(s) : "" : n.type === "single" || n.type === "tree-single" ? _.value[n.key] = s !== void 0 ? s : null : _.value[n.key] = s !== void 0 ? Array.isArray(s) ? [...s] : [s] : [], h.value = e;
582
+ }, j = () => {
583
+ h.value = null;
584
+ }, P = (e, n) => {
585
+ if (!n)
585
586
  return typeof e == "string" ? e : e.label || String(e.value);
586
- const r = e;
587
- if (s.renderItem) {
588
- if (typeof s.renderItem == "string")
589
- return String(typeof r == "object" && r !== null ? r[s.renderItem] ?? "" : r);
587
+ const s = e;
588
+ if (n.renderItem) {
589
+ if (typeof n.renderItem == "string")
590
+ return String(typeof s == "object" && s !== null ? s[n.renderItem] ?? "" : s);
590
591
  {
591
- const i = s.renderItem(r);
592
+ const i = n.renderItem(s);
592
593
  return i != null ? String(i) : "";
593
594
  }
594
595
  }
595
596
  return typeof e == "string" ? e : e.label || String(e.value);
596
- }, oe = (e, s) => {
597
- if (!s)
597
+ }, oe = (e, n) => {
598
+ if (!n)
598
599
  return typeof e == "string" ? e : e.value !== void 0 ? e.value : e;
599
- const r = e;
600
- return s.format ? typeof s.format == "string" ? typeof r == "object" && r !== null ? r[s.format] : r : s.format(r) : typeof e == "string" ? e : e.value !== void 0 ? e.value : e;
601
- }, ye = (e, s) => {
602
- const r = e, i = s.renderResult || s.renderItem;
600
+ const s = e;
601
+ return n.format ? typeof n.format == "string" ? typeof s == "object" && s !== null ? s[n.format] : s : n.format(s) : typeof e == "string" ? e : e.value !== void 0 ? e.value : e;
602
+ }, ye = (e, n) => {
603
+ const s = e, i = n.renderResult || n.renderItem;
603
604
  if (i) {
604
605
  if (typeof i == "string")
605
- return String(typeof r == "object" && r !== null ? r[i] ?? "" : r);
606
+ return String(typeof s == "object" && s !== null ? s[i] ?? "" : s);
606
607
  {
607
- const b = i(r);
608
+ const b = i(s);
608
609
  return b != null ? String(b) : "";
609
610
  }
610
611
  }
611
- return j(e, s);
612
- }, ie = (e, s, r) => {
613
- const i = r || e.options, b = e.childrenKey || "children";
614
- for (const k of i) {
615
- const N = oe(k, e);
616
- if (N === s || String(N) === String(s))
617
- return k;
618
- if (e.childrenKey && typeof k == "object" && k !== null) {
619
- const J = k[b];
620
- if (Array.isArray(J) && J.length > 0) {
621
- const se = ie(e, s, J);
612
+ return P(e, n);
613
+ }, ie = (e, n, s) => {
614
+ const i = s || e.options, b = e.childrenKey || "children";
615
+ for (const g of i) {
616
+ const N = oe(g, e);
617
+ if (N === n || String(N) === String(n))
618
+ return g;
619
+ if (e.childrenKey && typeof g == "object" && g !== null) {
620
+ const Q = g[b];
621
+ if (Array.isArray(Q) && Q.length > 0) {
622
+ const se = ie(e, n, Q);
622
623
  if (se) return se;
623
624
  }
624
625
  }
625
626
  }
626
627
  return null;
627
- }, pe = (e, s) => {
628
- const r = s || e.options, i = e.childrenKey || "children", b = [];
629
- for (const k of r)
630
- if (b.push(k), e.childrenKey && typeof k == "object" && k !== null) {
631
- const N = k[i];
628
+ }, pe = (e, n) => {
629
+ const s = n || e.options, i = e.childrenKey || "children", b = [];
630
+ for (const g of s)
631
+ if (b.push(g), e.childrenKey && typeof g == "object" && g !== null) {
632
+ const N = g[i];
632
633
  Array.isArray(N) && N.length > 0 && b.push(...pe(e, N));
633
634
  }
634
635
  return b;
635
636
  }, z = (e) => {
636
- if (!l.value) return !1;
637
- const s = l.value.key, r = _.value[s], i = oe(e, l.value);
638
- return l.value.type === "single" || l.value.type === "tree-single" ? r != null && r === i : (Array.isArray(r) ? r : []).some((k) => k === i || String(k) === String(i));
639
- }, he = (e) => e ? e.childrenKey ? pe(e) : e.options : [], _e = (e) => {
637
+ if (!r.value) return !1;
638
+ const n = r.value.key, s = _.value[n], i = oe(e, r.value);
639
+ return r.value.type === "single" || r.value.type === "tree-single" ? s != null && s === i : (Array.isArray(s) ? s : []).some((g) => g === i || String(g) === String(i));
640
+ }, he = (e) => e ? e.childrenKey ? pe(e) : e.options : [], me = (e) => {
640
641
  if (!e) return [];
641
- const s = e.childrenKey || "children";
642
- return (e.options || []).filter((r) => {
643
- if (typeof r == "string") return !1;
644
- const i = r[s];
642
+ const n = e.childrenKey || "children";
643
+ return (e.options || []).filter((s) => {
644
+ if (typeof s == "string") return !1;
645
+ const i = s[n];
645
646
  return Array.isArray(i) && i.length > 0;
646
647
  });
647
- }, me = (e, s) => {
648
- if (!s || typeof e == "string") return [];
649
- const r = s.childrenKey || "children", i = e[r];
648
+ }, _e = (e, n) => {
649
+ if (!n || typeof e == "string") return [];
650
+ const s = n.childrenKey || "children", i = e[s];
650
651
  return Array.isArray(i) ? i : [];
651
652
  }, je = (e) => {
652
653
  if (e)
653
654
  return R.value[e.key] !== void 0 ? R.value[e.key] : m.value[e.key];
654
- }, Pe = (e, s) => {
655
- e && (R.value[e.key] = s);
655
+ }, Pe = (e, n) => {
656
+ if (e && (R.value[e.key] = n, d.autoConfirm)) {
657
+ const s = e.key;
658
+ m.value[s] = n, y("update:modelValue", { ...m.value }), y("change", { ...m.value }, e), j();
659
+ }
656
660
  }, ge = (e) => {
657
- if (!l.value) return;
658
- const s = l.value.key, r = oe(e, l.value);
659
- m.value[s];
661
+ if (!r.value) return;
662
+ const n = r.value.key, s = oe(e, r.value);
663
+ m.value[n];
660
664
  let i;
661
- _.value[s] === r ? i = void 0 : i = r, m.value[s] = i, h("update:modelValue", { ...m.value }), h("change", { ...m.value }, l.value), le();
665
+ _.value[n] === s ? i = void 0 : i = s, m.value[n] = i, y("update:modelValue", { ...m.value }), y("change", { ...m.value }, r.value), j();
662
666
  }, ke = (e) => {
663
- if (!l.value) return;
664
- const s = l.value.key, r = oe(e, l.value), i = Array.isArray(_.value[s]) ? [..._.value[s]] : [], b = i.findIndex(
665
- (k) => k === r || String(k) === String(r)
667
+ if (!r.value) return;
668
+ const n = r.value.key, s = oe(e, r.value), i = Array.isArray(_.value[n]) ? [..._.value[n]] : [], b = i.findIndex(
669
+ (g) => g === s || String(g) === String(s)
666
670
  );
667
- b >= 0 ? i.splice(b, 1) : i.push(r), _.value[s] = i;
671
+ if (b >= 0 ? i.splice(b, 1) : i.push(s), _.value[n] = i, d.autoConfirm) {
672
+ const g = i.length > 0 ? i : void 0;
673
+ m.value[n] = g, y("update:modelValue", { ...m.value }), y("change", { ...m.value }, r.value), j();
674
+ }
668
675
  }, qe = () => {
669
- if (!l.value) return;
670
- const e = l.value.key;
671
- l.value.slot ? R.value[e] = void 0 : l.value.type === "input" ? w.value = "" : l.value.type === "single" || l.value.type === "tree-single" ? _.value[e] = null : _.value[e] = [];
676
+ if (!r.value) return;
677
+ const e = r.value.key;
678
+ r.value.slot ? R.value[e] = void 0 : r.value.type === "input" ? I.value = "" : r.value.type === "single" || r.value.type === "tree-single" ? _.value[e] = null : _.value[e] = [];
672
679
  }, He = () => {
680
+ if (d.autoConfirm && r.value) {
681
+ const e = r.value.key, n = I.value.trim() || void 0;
682
+ m.value[e] = n, y("update:modelValue", { ...m.value }), y("change", { ...m.value }, r.value), j();
683
+ }
673
684
  }, Ye = () => {
674
- if (!l.value) return;
675
- const e = l.value.key;
685
+ if (!r.value) return;
686
+ const e = r.value.key;
676
687
  m.value[e];
677
- let s;
678
- if (l.value.slot)
679
- s = R.value[e], m.value[e] = s;
680
- else if (l.value.type === "input")
681
- s = w.value.trim() || void 0, m.value[e] = s;
682
- else if (l.value.type === "single" || l.value.type === "tree-single") {
683
- const r = _.value[e];
684
- s = r ?? void 0, m.value[e] = s;
688
+ let n;
689
+ if (r.value.slot)
690
+ n = R.value[e], m.value[e] = n;
691
+ else if (r.value.type === "input")
692
+ n = I.value.trim() || void 0, m.value[e] = n;
693
+ else if (r.value.type === "single" || r.value.type === "tree-single") {
694
+ const s = _.value[e];
695
+ n = s ?? void 0, m.value[e] = n;
685
696
  } else {
686
- const r = _.value[e];
687
- s = Array.isArray(r) && r.length > 0 ? r : void 0, m.value[e] = s;
697
+ const s = _.value[e];
698
+ n = Array.isArray(s) && s.length > 0 ? s : void 0, m.value[e] = n;
688
699
  }
689
- h("update:modelValue", { ...m.value }), h("change", { ...m.value }, l.value), le();
700
+ y("update:modelValue", { ...m.value }), y("change", { ...m.value }, r.value), j();
690
701
  }, be = (e) => {
691
- const s = m.value[e.key];
692
- return s == null || s === "" ? 0 : e.slot ? 1 : e.type === "input" ? String(s).trim() ? 1 : 0 : e.type === "single" || e.type === "tree-single" ? 1 : Array.isArray(s) ? s.length : s ? 1 : 0;
702
+ const n = m.value[e.key];
703
+ return n == null || n === "" ? 0 : e.slot ? 1 : e.type === "input" ? String(n).trim() ? 1 : 0 : e.type === "single" || e.type === "tree-single" ? 1 : Array.isArray(n) ? n.length : n ? 1 : 0;
693
704
  }, Je = (e) => {
694
705
  if (e.slot) {
695
- const r = R.value[e.key];
696
- return r != null && r !== "" ? 1 : 0;
706
+ const s = R.value[e.key];
707
+ return s != null && s !== "" ? 1 : 0;
697
708
  } else if (e.type === "input")
698
- return w.value.trim() ? 1 : 0;
699
- const s = _.value[e.key];
700
- return s == null || s === "" ? 0 : e.type === "single" || e.type === "tree-single" ? 1 : Array.isArray(s) ? s.length : 0;
709
+ return I.value.trim() ? 1 : 0;
710
+ const n = _.value[e.key];
711
+ return n == null || n === "" ? 0 : e.type === "single" || e.type === "tree-single" ? 1 : Array.isArray(n) ? n.length : 0;
701
712
  };
702
- return n({
713
+ return a({
703
714
  /** 获取当前筛选值 */
704
715
  getValues: () => ({ ...m.value }),
705
716
  /** 重置所有筛选 */
706
717
  reset: () => {
707
- m.value = {}, _.value = {}, R.value = {}, h("update:modelValue", {});
718
+ m.value = {}, _.value = {}, R.value = {}, y("update:modelValue", {});
708
719
  }
709
- }), (e, s) => (a(), u("div", zt, [
710
- g("div", Mt, [
711
- (a(!0), u(L, null, W(v.items, (r, i) => (a(), u("div", {
720
+ }), (e, n) => (l(), u("div", zt, [
721
+ k("div", Mt, [
722
+ (l(!0), u(L, null, W(d.items, (s, i) => (l(), u("div", {
712
723
  key: i,
713
724
  class: E(["rc-search-area__item", {
714
- "is-active": p.value === i,
715
- "has-value": be(r) > 0
725
+ "is-active": h.value === i,
726
+ "has-value": be(s) > 0
716
727
  }]),
717
728
  onClick: (b) => Oe(i)
718
729
  }, [
719
- g("span", Ut, I(Fe(r)), 1),
720
- M(q(T), {
730
+ k("span", Ut, w(Fe(s)), 1),
731
+ M(H(B), {
721
732
  name: "icon_a-xiala2",
722
- color: p.value !== i && be(r) > 0 ? "#1677ff" : "#969799",
723
- class: E(["rc-search-area__item-arrow", { "is-up": p.value === i }])
733
+ color: h.value !== i && be(s) > 0 ? "#1677ff" : "#969799",
734
+ class: E(["rc-search-area__item-arrow", { "is-up": h.value === i }])
724
735
  }, null, 8, ["color", "class"])
725
736
  ], 10, Kt))), 128))
726
737
  ]),
727
738
  M(fe, { name: "rc-search-area-fade" }, {
728
- default: Z(() => [
729
- p.value !== null && v.showMask ? (a(), u("div", {
739
+ default: ee(() => [
740
+ h.value !== null && d.showMask ? (l(), u("div", {
730
741
  key: 0,
731
742
  ref_key: "maskRef",
732
- ref: d,
743
+ ref: f,
733
744
  class: "rc-search-area__mask",
734
- style: B(c.value),
735
- onClick: le
745
+ style: T(c.value),
746
+ onClick: j
736
747
  }, null, 4)) : $("", !0)
737
748
  ]),
738
749
  _: 1
739
750
  }),
740
751
  M(fe, { name: "rc-search-area-slide" }, {
741
- default: Z(() => {
742
- var r, i, b, k, N, J, se, $e, Ce, Se, xe;
752
+ default: ee(() => {
753
+ var s, i, b, g, N, Q, se, $e, Ce, Se, xe;
743
754
  return [
744
- p.value !== null ? (a(), u("div", {
755
+ h.value !== null ? (l(), u("div", {
745
756
  key: 0,
746
757
  ref_key: "panelRef",
747
- ref: y,
758
+ ref: p,
748
759
  class: "rc-search-area__panel"
749
760
  }, [
750
- g("div", Gt, [
751
- (r = l.value) != null && r.slot && e.$slots[l.value.key] ? A(e.$slots, l.value.key, {
761
+ k("div", Gt, [
762
+ (s = r.value) != null && s.slot && e.$slots[r.value.key] ? A(e.$slots, r.value.key, {
752
763
  key: 0,
753
- value: je(l.value),
754
- "update:value": (S) => Pe(l.value, S)
755
- }, void 0, !0) : ((i = l.value) == null ? void 0 : i.type) === "input" ? (a(), u("div", Ft, [
756
- st(g("input", {
757
- "onUpdate:modelValue": s[0] || (s[0] = (S) => w.value = S),
764
+ value: je(r.value),
765
+ "update:value": (S) => Pe(r.value, S)
766
+ }, void 0, !0) : ((i = r.value) == null ? void 0 : i.type) === "input" ? (l(), u("div", Ft, [
767
+ at(k("input", {
768
+ "onUpdate:modelValue": n[0] || (n[0] = (S) => I.value = S),
758
769
  type: "text",
759
770
  class: "rc-search-area__input",
760
- placeholder: l.value.placeholder || "请输入",
771
+ placeholder: r.value.placeholder || "请输入",
761
772
  onInput: He
762
773
  }, null, 40, Ot), [
763
- [rt, w.value]
774
+ [st, I.value]
764
775
  ])
765
- ])) : ((b = l.value) == null ? void 0 : b.type) === "tree-single" ? (a(), u("div", jt, [
766
- (a(!0), u(L, null, W(_e(l.value), (S, P) => (a(), u("div", {
767
- key: P,
776
+ ])) : ((b = r.value) == null ? void 0 : b.type) === "tree-single" ? (l(), u("div", jt, [
777
+ (l(!0), u(L, null, W(me(r.value), (S, q) => (l(), u("div", {
778
+ key: q,
768
779
  class: "rc-search-area__tree-group"
769
780
  }, [
770
- g("div", Pt, I(j(S, l.value || void 0)), 1),
771
- g("div", qt, [
772
- (a(!0), u(L, null, W(me(S, l.value), (D, de) => (a(), u("div", {
781
+ k("div", Pt, w(P(S, r.value || void 0)), 1),
782
+ k("div", qt, [
783
+ (l(!0), u(L, null, W(_e(S, r.value), (D, de) => (l(), u("div", {
773
784
  key: de,
774
785
  class: E(["rc-search-area__option", { "is-selected": z(D) }]),
775
786
  onClick: (Qe) => ge(D)
776
787
  }, [
777
- g("span", Yt, I(j(D, l.value || void 0)), 1),
778
- z(D) ? (a(), U(q(T), {
788
+ k("span", Yt, w(P(D, r.value || void 0)), 1),
789
+ z(D) ? (l(), U(H(B), {
779
790
  key: 0,
780
791
  name: "icon_select",
781
792
  class: "rc-search-area__option-check"
@@ -783,20 +794,20 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
783
794
  ], 10, Ht))), 128))
784
795
  ])
785
796
  ]))), 128))
786
- ])) : ((k = l.value) == null ? void 0 : k.type) === "tree-multiple" ? (a(), u("div", Jt, [
787
- (a(!0), u(L, null, W(_e(l.value), (S, P) => (a(), u("div", {
788
- key: P,
797
+ ])) : ((g = r.value) == null ? void 0 : g.type) === "tree-multiple" ? (l(), u("div", Jt, [
798
+ (l(!0), u(L, null, W(me(r.value), (S, q) => (l(), u("div", {
799
+ key: q,
789
800
  class: "rc-search-area__tree-group"
790
801
  }, [
791
- g("div", Qt, I(j(S, l.value || void 0)), 1),
792
- g("div", Xt, [
793
- (a(!0), u(L, null, W(me(S, l.value), (D, de) => (a(), u("div", {
802
+ k("div", Qt, w(P(S, r.value || void 0)), 1),
803
+ k("div", Xt, [
804
+ (l(!0), u(L, null, W(_e(S, r.value), (D, de) => (l(), u("div", {
794
805
  key: de,
795
806
  class: E(["rc-search-area__option", { "is-selected": z(D) }]),
796
807
  onClick: (Qe) => ke(D)
797
808
  }, [
798
- g("span", en, I(j(D, l.value || void 0)), 1),
799
- z(D) ? (a(), U(q(T), {
809
+ k("span", en, w(P(D, r.value || void 0)), 1),
810
+ z(D) ? (l(), U(H(B), {
800
811
  key: 0,
801
812
  name: "icon_select",
802
813
  class: "rc-search-area__option-check"
@@ -804,54 +815,54 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
804
815
  ], 10, Zt))), 128))
805
816
  ])
806
817
  ]))), 128))
807
- ])) : ((N = l.value) == null ? void 0 : N.type) === "single" ? (a(), u("div", tn, [
808
- (a(!0), u(L, null, W(he(l.value), (S, P) => (a(), u("div", {
809
- key: P,
818
+ ])) : ((N = r.value) == null ? void 0 : N.type) === "single" ? (l(), u("div", tn, [
819
+ (l(!0), u(L, null, W(he(r.value), (S, q) => (l(), u("div", {
820
+ key: q,
810
821
  class: E(["rc-search-area__option", { "is-selected": z(S) }]),
811
822
  onClick: (D) => ge(S)
812
823
  }, [
813
- g("span", sn, I(j(S, l.value || void 0)), 1),
814
- z(S) ? (a(), U(q(T), {
824
+ k("span", an, w(P(S, r.value || void 0)), 1),
825
+ z(S) ? (l(), U(H(B), {
815
826
  key: 0,
816
827
  name: "icon_select",
817
828
  class: "rc-search-area__option-check"
818
829
  })) : $("", !0)
819
830
  ], 10, nn))), 128))
820
- ])) : (a(), u("div", rn, [
821
- (a(!0), u(L, null, W(he(l.value), (S, P) => (a(), u("div", {
822
- key: P,
831
+ ])) : (l(), u("div", sn, [
832
+ (l(!0), u(L, null, W(he(r.value), (S, q) => (l(), u("div", {
833
+ key: q,
823
834
  class: E(["rc-search-area__option", { "is-selected": z(S) }]),
824
835
  onClick: (D) => ke(S)
825
836
  }, [
826
- g("span", ln, I(j(S, l.value || void 0)), 1),
827
- z(S) ? (a(), U(q(T), {
837
+ k("span", ln, w(P(S, r.value || void 0)), 1),
838
+ z(S) ? (l(), U(H(B), {
828
839
  key: 0,
829
840
  name: "icon_select",
830
841
  class: "rc-search-area__option-check"
831
842
  })) : $("", !0)
832
- ], 10, an))), 128))
843
+ ], 10, rn))), 128))
833
844
  ])),
834
- ((J = l.value) == null ? void 0 : J.type) !== "input" && !((se = l.value) != null && se.slot) && ((Ce = ($e = l.value) == null ? void 0 : $e.options) == null ? void 0 : Ce.length) === 0 ? (a(), u("div", on, [...s[1] || (s[1] = [
835
- g("p", null, "暂无选项", -1)
845
+ ((Q = r.value) == null ? void 0 : Q.type) !== "input" && !((se = r.value) != null && se.slot) && ((Ce = ($e = r.value) == null ? void 0 : $e.options) == null ? void 0 : Ce.length) === 0 ? (l(), u("div", on, [...n[1] || (n[1] = [
846
+ k("p", null, "暂无选项", -1)
836
847
  ])])) : $("", !0)
837
848
  ]),
838
- ((Se = l.value) == null ? void 0 : Se.type) !== "single" && ((xe = l.value) == null ? void 0 : xe.type) !== "tree-single" ? (a(), u("div", cn, [
839
- M(q(ae), {
849
+ !d.autoConfirm && ((Se = r.value) == null ? void 0 : Se.type) !== "single" && ((xe = r.value) == null ? void 0 : xe.type) !== "tree-single" ? (l(), u("div", cn, [
850
+ M(H(le), {
840
851
  block: "",
841
852
  onClick: qe
842
853
  }, {
843
- default: Z(() => [...s[2] || (s[2] = [
844
- ne(" 重置 ", -1)
854
+ default: ee(() => [...n[2] || (n[2] = [
855
+ ae(" 重置 ", -1)
845
856
  ])]),
846
857
  _: 1
847
858
  }),
848
- M(q(ae), {
859
+ M(H(le), {
849
860
  type: "primary",
850
861
  block: "",
851
862
  onClick: Ye
852
863
  }, {
853
- default: Z(() => [
854
- ne(" 确定" + I(Ge.value), 1)
864
+ default: ee(() => [
865
+ ae(" 确定" + w(Ge.value), 1)
855
866
  ]),
856
867
  _: 1
857
868
  })
@@ -863,8 +874,8 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
863
874
  })
864
875
  ]));
865
876
  }
866
- }), Be = /* @__PURE__ */ O(un, [["__scopeId", "data-v-26a764e2"]]), Ne = (t) => {
867
- t.component("RcSearchArea", Be), t.component("rc-search-area", Be);
877
+ }), Te = /* @__PURE__ */ O(un, [["__scopeId", "data-v-2252d02c"]]), Ne = (t) => {
878
+ t.component("RcSearchArea", Te), t.component("rc-search-area", Te);
868
879
  }, ve = Symbol("RECYCLE_UI_CONFIG"), Ke = {
869
880
  prefix: "rc",
870
881
  autoRegister: !0,
@@ -875,37 +886,37 @@ const zt = { class: "rc-search-area" }, Mt = { class: "rc-search-area__bar" }, K
875
886
  iconCssUrl: "//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",
876
887
  iconClass: "iconfont"
877
888
  };
878
- function dn(t, n) {
879
- n.autoRegister !== !1 && (typeof Ae == "function" && Ae(t), typeof Ve == "function" && Ve(t), typeof Re == "function" && Re(t), typeof Le == "function" && Le(t), typeof Te == "function" && Te(t), typeof Ee == "function" && Ee(t), typeof Ne == "function" && Ne(t));
889
+ function dn(t, a) {
890
+ a.autoRegister !== !1 && (typeof Ae == "function" && Ae(t), typeof Ve == "function" && Ve(t), typeof Re == "function" && Re(t), typeof Le == "function" && Le(t), typeof Be == "function" && Be(t), typeof Ee == "function" && Ee(t), typeof Ne == "function" && Ne(t));
880
891
  }
881
- const Ue = (t, n) => {
882
- const o = { ...Ke, ...n || {} };
892
+ const Ue = (t, a) => {
893
+ const o = { ...Ke, ...a || {} };
883
894
  if (t.provide(o.provideKey ?? ve, o), t.config.globalProperties.$recycleUI = o, typeof window < "u" && o.iconCssUrl) {
884
- const v = `link[rel="stylesheet"][data-rcui-icon="true"][href="${o.iconCssUrl}"]`;
885
- if (!document.head.querySelector(v)) {
886
- const p = document.createElement("link");
887
- p.rel = "stylesheet", p.href = o.iconCssUrl, p.setAttribute("data-rcui-icon", "true"), document.head.appendChild(p);
895
+ const d = `link[rel="stylesheet"][data-rcui-icon="true"][href="${o.iconCssUrl}"]`;
896
+ if (!document.head.querySelector(d)) {
897
+ const h = document.createElement("link");
898
+ h.rel = "stylesheet", h.href = o.iconCssUrl, h.setAttribute("data-rcui-icon", "true"), document.head.appendChild(h);
888
899
  }
889
900
  }
890
901
  return dn(t, o), t;
891
902
  }, hn = { install: Ue };
892
- function _n(t) {
903
+ function mn(t) {
893
904
  return {
894
- install(n) {
895
- Ue(n, t);
905
+ install(a) {
906
+ Ue(a, t);
896
907
  }
897
908
  };
898
909
  }
899
910
  export {
900
911
  ve as RECYCLE_UI_SYMBOL,
901
- ae as RcButton,
912
+ le as RcButton,
902
913
  ce as RcCard,
903
914
  vn as RcDescriptions,
904
915
  yn as RcDescriptionsItem,
905
- T as RcIcon,
906
- Be as RcSearchArea,
916
+ B as RcIcon,
917
+ Te as RcSearchArea,
907
918
  ue as RcToast,
908
- _n as createRecycleUI,
919
+ mn as createRecycleUI,
909
920
  hn as default,
910
921
  Ke as defaultRecycleUIConfig,
911
922
  Dt as hideToast,
@@ -913,7 +924,7 @@ export {
913
924
  Ae as installButton,
914
925
  Re as installCard,
915
926
  Ve as installDescriptions,
916
- Te as installIcon,
927
+ Be as installIcon,
917
928
  Ee as installMessage,
918
929
  Ne as installSearchArea,
919
930
  Wt as message,