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