@rft-rc/recycle-ui 0.0.2-rc.1 → 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/components/search-area/index.vue.d.ts +31 -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 +647 -479
- 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 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({
|
|
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 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
|
-
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
|
+
})), f = C(() => {
|
|
22
|
+
const c = a.code;
|
|
23
|
+
if (c == null || c === "" || c === 0) return "";
|
|
24
|
+
if (typeof c == "number")
|
|
25
|
+
return String.fromCharCode(c);
|
|
26
|
+
const v = String(c).replace(/^0x/i, ""), x = parseInt(v, 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 v = `link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;
|
|
34
|
+
if (!document.head.querySelector(v)) {
|
|
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, 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
|
-
|
|
43
|
+
f.value ? (l(), u("span", rt, w(f.value), 1)) : $("", !0)
|
|
44
44
|
], 6));
|
|
45
45
|
}
|
|
46
|
-
}),
|
|
47
|
-
const
|
|
48
|
-
for (const [
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
},
|
|
46
|
+
}), O = (t, a) => {
|
|
47
|
+
const o = t.__vccOpts || t;
|
|
48
|
+
for (const [d, y] of a)
|
|
49
|
+
o[d] = y;
|
|
50
|
+
return o;
|
|
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 = {
|
|
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: 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 (
|
|
83
|
-
class:
|
|
84
|
-
style:
|
|
85
|
-
disabled:
|
|
86
|
-
onClick:
|
|
82
|
+
return (p, f) => (l(), 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: T({ borderRadius: h.value }),
|
|
85
|
+
disabled: t.disabled || t.loading,
|
|
86
|
+
onClick: y
|
|
87
87
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
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(p.$slots, "default", {}, () => [
|
|
99
|
+
ae(w(t.label), 1)
|
|
100
100
|
], !0),
|
|
101
|
-
!
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
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
|
+
}), le = /* @__PURE__ */ O(dt, [["__scopeId", "data-v-3ed3109f"]]);
|
|
112
|
+
le.name = "rc-button";
|
|
113
|
+
function Ae(t) {
|
|
114
|
+
return t.component(le.name, le), 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 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
|
+
if (!c || c <= 1 || x >= c) return "100%";
|
|
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 (
|
|
140
|
+
return (c, v) => (l(), u("div", {
|
|
141
141
|
class: "rc-desc-item",
|
|
142
|
-
style:
|
|
142
|
+
style: T({ width: p.value, flex: `0 0 ${p.value}` })
|
|
143
143
|
}, [
|
|
144
|
-
|
|
144
|
+
k("div", {
|
|
145
145
|
class: "rc-desc-item__label",
|
|
146
|
-
style:
|
|
146
|
+
style: T(f.value)
|
|
147
147
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
A(c.$slots, "label", {}, () => [
|
|
149
|
+
ae(w(t.label), 1)
|
|
150
150
|
], !0)
|
|
151
151
|
], 4),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
k("div", ft, [
|
|
153
|
+
A(c.$slots, "default", {}, () => [
|
|
154
|
+
ae(w(t.value), 1)
|
|
155
155
|
], !0)
|
|
156
156
|
])
|
|
157
157
|
], 4));
|
|
158
158
|
}
|
|
159
|
-
}),
|
|
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({
|
|
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 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
|
+
Xe(() => {
|
|
179
|
+
const v = y.value;
|
|
180
|
+
if (v <= 1)
|
|
181
|
+
h.value = "100%", p.value = "100%";
|
|
182
182
|
else {
|
|
183
|
-
const
|
|
184
|
-
|
|
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
|
-
}),
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
var
|
|
191
|
-
const
|
|
192
|
-
return (
|
|
193
|
-
label:
|
|
194
|
-
value:
|
|
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
|
+
const c = C(() => {
|
|
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
|
+
value: m == null ? void 0 : m[x]
|
|
195
195
|
})) : [];
|
|
196
196
|
});
|
|
197
|
-
return (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
])) :
|
|
203
|
-
|
|
202
|
+
])) : $("", !0),
|
|
203
|
+
k("div", {
|
|
204
204
|
class: "rc-descriptions__body",
|
|
205
|
-
style:
|
|
205
|
+
style: T({ gap: d.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 ? (l(!0), u(L, { key: 0 }, W(c.value, (_, I) => (l(), U(te, {
|
|
210
|
+
key: I,
|
|
211
|
+
label: _.label,
|
|
212
|
+
value: _.value,
|
|
213
|
+
"label-width": t.labelWidth
|
|
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
|
-
}),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
function
|
|
222
|
-
return
|
|
218
|
+
}), re = /* @__PURE__ */ O(ht, [["__scopeId", "data-v-5fcaa235"]]);
|
|
219
|
+
re.name = "rc-descriptions";
|
|
220
|
+
te.name = "rc-descriptions-item";
|
|
221
|
+
function Ve(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
|
|
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 = {
|
|
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 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:
|
|
255
|
-
borderRadius:
|
|
256
|
-
boxShadow:
|
|
257
|
-
width:
|
|
258
|
-
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
|
-
}),
|
|
261
|
-
() => typeof
|
|
260
|
+
}), d = C(() => a.padding || "16px"), y = C(
|
|
261
|
+
() => typeof a.gap == "number" ? `${a.gap}px` : String(a.gap)
|
|
262
262
|
);
|
|
263
|
-
function f
|
|
264
|
-
return
|
|
263
|
+
function h(f) {
|
|
264
|
+
return f == null || f === "" ? "" : typeof f == "number" ? `${f}px` : String(f);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
if (!
|
|
268
|
-
const
|
|
269
|
-
return `0 ${Math.round(
|
|
270
|
-
|
|
271
|
-
)}px ${Math.round(
|
|
266
|
+
function p(f) {
|
|
267
|
+
if (!f || f <= 0) return "none";
|
|
268
|
+
const c = 4 * f;
|
|
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 (f, c) => (l(), u("div", {
|
|
274
|
+
class: E(["rc-card", [{ "rc-card--bordered": t.bordered }]]),
|
|
275
|
+
style: T(o.value)
|
|
276
276
|
}, [
|
|
277
|
-
|
|
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:
|
|
280
|
+
style: T({ backgroundColor: t.topBgColor || "rgba(29, 133, 252, 0.05)" })
|
|
281
281
|
}, [
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
k("div", mt, [
|
|
283
|
+
A(f.$slots, "title", {}, () => [
|
|
284
|
+
k("span", _t, w(t.title), 1)
|
|
285
285
|
], !0)
|
|
286
286
|
]),
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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:
|
|
292
|
-
},
|
|
291
|
+
style: T({ color: t.statusColor || "var(--rc-primary)" })
|
|
292
|
+
}, w(t.status), 5)
|
|
293
293
|
], !0)
|
|
294
|
-
])) :
|
|
295
|
-
], 4)) :
|
|
296
|
-
|
|
294
|
+
])) : $("", !0)
|
|
295
|
+
], 4)) : $("", !0),
|
|
296
|
+
k("div", {
|
|
297
297
|
class: "rc-card__body",
|
|
298
|
-
style:
|
|
298
|
+
style: T({ padding: d.value, gap: y.value })
|
|
299
299
|
}, [
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
A(f.$slots, "content", {}, () => [
|
|
301
|
+
A(f.$slots, "default", {}, void 0, !0)
|
|
302
302
|
], !0)
|
|
303
303
|
], 4),
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
])) :
|
|
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
|
+
])) : $("", !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,434 +334,602 @@ 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: a }) {
|
|
338
|
+
const o = t, d = V(!0);
|
|
339
|
+
let y;
|
|
340
|
+
function h() {
|
|
341
|
+
y && (clearTimeout(y), y = null);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
|
|
343
|
+
function p() {
|
|
344
|
+
h(), d.value = !1;
|
|
345
345
|
}
|
|
346
|
-
return
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
}),
|
|
351
|
-
|
|
352
|
-
}), (
|
|
353
|
-
(
|
|
354
|
-
|
|
346
|
+
return a({ close: p }), We(() => {
|
|
347
|
+
o.duration && o.duration > 0 && (y = setTimeout(() => {
|
|
348
|
+
p();
|
|
349
|
+
}, o.duration));
|
|
350
|
+
}), ze(() => {
|
|
351
|
+
h();
|
|
352
|
+
}), (f, c) => (l(), u(L, null, [
|
|
353
|
+
(l(), 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: ee(() => [
|
|
359
|
+
d.value ? (l(), 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 ? (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
|
-
], 2)) :
|
|
368
|
+
], 2)) : $("", !0)
|
|
369
369
|
]),
|
|
370
370
|
_: 1
|
|
371
371
|
}, 8, ["onAfterLeave"])
|
|
372
372
|
])),
|
|
373
|
-
|
|
373
|
+
A(f.$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 J = null, ne = null;
|
|
378
|
+
function De() {
|
|
379
|
+
J && (J.unmount(), J = null), ne && (document.body.removeChild(ne), ne = null);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
message:
|
|
386
|
-
type:
|
|
387
|
-
duration:
|
|
388
|
-
mask:
|
|
381
|
+
function pn(t) {
|
|
382
|
+
const a = typeof t == "string" ? { message: t } : t || {};
|
|
383
|
+
De(), ne = document.createElement("div"), document.body.appendChild(ne);
|
|
384
|
+
const o = {
|
|
385
|
+
message: a.message,
|
|
386
|
+
type: a.type ?? "text",
|
|
387
|
+
duration: a.duration ?? 2e3,
|
|
388
|
+
mask: a.mask ?? !1,
|
|
389
389
|
onAfterLeave: () => {
|
|
390
|
-
var
|
|
391
|
-
|
|
390
|
+
var d;
|
|
391
|
+
De(), (d = a.onClose) == null || d.call(a);
|
|
392
392
|
}
|
|
393
393
|
};
|
|
394
|
-
return
|
|
395
|
-
close:
|
|
394
|
+
return J = et(ue, o), J.mount(ne), {
|
|
395
|
+
close: Dt
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
var
|
|
400
|
-
|
|
398
|
+
function Dt() {
|
|
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
|
-
|
|
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" }, Bt = /* @__PURE__ */ F({
|
|
411
411
|
__name: "index",
|
|
412
|
-
setup(
|
|
413
|
-
const
|
|
414
|
-
let
|
|
415
|
-
function
|
|
416
|
-
const
|
|
417
|
-
|
|
412
|
+
setup(t, { expose: a }) {
|
|
413
|
+
const o = tt([]);
|
|
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
|
|
420
|
-
const
|
|
421
|
-
return
|
|
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
|
|
424
|
-
|
|
423
|
+
return a({ add: h, remove: y }), (p, f) => (l(), 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: ee(() => [
|
|
429
|
+
(l(!0), u(L, null, W(o, (c) => (l(), u("div", {
|
|
430
|
+
key: c.id,
|
|
431
|
+
class: E(["rc-message__item", `rc-message--${c.type}`])
|
|
432
432
|
}, [
|
|
433
|
-
|
|
433
|
+
k("span", Et, w(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
|
+
}), Tt = /* @__PURE__ */ O(Bt, [["__scopeId", "data-v-87811df0"]]);
|
|
441
|
+
let G = null, K = null;
|
|
442
|
+
function Nt() {
|
|
443
|
+
var a;
|
|
444
|
+
if (G && K) return;
|
|
445
|
+
G = document.createElement("div"), document.body.appendChild(G);
|
|
446
|
+
const t = M(Tt, {});
|
|
447
|
+
Me(t, G), K = (a = t.component) == null ? void 0 : a.exposed;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
return (
|
|
449
|
+
function Z(t, a, o) {
|
|
450
|
+
var y;
|
|
451
|
+
Nt();
|
|
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
|
-
const
|
|
456
|
-
open(
|
|
457
|
-
return
|
|
455
|
+
const Wt = {
|
|
456
|
+
open(t) {
|
|
457
|
+
return Z(t.type || "info", t.content, t.duration);
|
|
458
458
|
},
|
|
459
|
-
info(
|
|
460
|
-
return
|
|
459
|
+
info(t, a) {
|
|
460
|
+
return Z("info", t, a);
|
|
461
461
|
},
|
|
462
|
-
success(
|
|
463
|
-
return
|
|
462
|
+
success(t, a) {
|
|
463
|
+
return Z("success", t, a);
|
|
464
464
|
},
|
|
465
|
-
warning(
|
|
466
|
-
return
|
|
465
|
+
warning(t, a) {
|
|
466
|
+
return Z("warning", t, a);
|
|
467
467
|
},
|
|
468
|
-
error(
|
|
469
|
-
return
|
|
468
|
+
error(t, a) {
|
|
469
|
+
return Z("error", t, a);
|
|
470
470
|
},
|
|
471
|
-
loading(
|
|
472
|
-
return
|
|
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);
|
|
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
|
+
B.name = "rc-icon";
|
|
482
|
+
function Be(t) {
|
|
483
|
+
return t.component(B.name, B), t.component("RcIcon", B), 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"], an = { class: "rc-search-area__option-label" }, sn = {
|
|
498
|
+
key: 5,
|
|
499
|
+
class: "rc-search-area__options-grid"
|
|
500
|
+
}, rn = ["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: {
|
|
498
510
|
items: { default: () => [] },
|
|
499
511
|
modelValue: { default: () => ({}) },
|
|
500
|
-
showMask: { type: Boolean, default: !0 }
|
|
512
|
+
showMask: { type: Boolean, default: !0 },
|
|
513
|
+
autoConfirm: { type: Boolean, default: !1 }
|
|
501
514
|
},
|
|
502
|
-
emits: ["update:modelValue", "change"
|
|
503
|
-
setup(
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
515
|
+
emits: ["update:modelValue", "change"],
|
|
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)
|
|
506
519
|
return;
|
|
507
|
-
await
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
if (
|
|
520
|
+
await we();
|
|
521
|
+
const n = p.value.getBoundingClientRect().top;
|
|
522
|
+
c.value = { top: `${n}px` };
|
|
523
|
+
}, x = (e) => {
|
|
524
|
+
if (h.value === null || !p.value)
|
|
512
525
|
return;
|
|
513
|
-
const
|
|
514
|
-
if (
|
|
526
|
+
const n = e.target;
|
|
527
|
+
if (p.value.contains(n))
|
|
515
528
|
return;
|
|
516
|
-
const
|
|
517
|
-
if (
|
|
518
|
-
const
|
|
519
|
-
if (
|
|
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))
|
|
520
533
|
return;
|
|
521
534
|
}
|
|
522
|
-
|
|
535
|
+
j();
|
|
523
536
|
};
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}),
|
|
527
|
-
window.removeEventListener("resize",
|
|
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));
|
|
539
|
+
}), ze(() => {
|
|
540
|
+
window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0), document.removeEventListener("click", x, !0);
|
|
528
541
|
});
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
|
|
542
|
+
const _ = V({}), I = V(""), R = V({}), m = V({ ...d.modelValue });
|
|
543
|
+
Ie(() => d.modelValue, (e) => {
|
|
544
|
+
m.value = { ...e || {} };
|
|
532
545
|
}, { deep: !0, immediate: !0 });
|
|
533
|
-
const
|
|
534
|
-
if (!
|
|
535
|
-
const
|
|
536
|
-
return
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
return
|
|
541
|
-
if (
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
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);
|
|
549
|
+
return e > 0 ? `(${e}项)` : "";
|
|
550
|
+
}), Fe = (e) => {
|
|
551
|
+
const n = m.value[e.key];
|
|
552
|
+
if (n == null || n === "" || e.slot)
|
|
553
|
+
return e.label;
|
|
554
|
+
if (e.type === "input") {
|
|
555
|
+
if (n && String(n).trim())
|
|
556
|
+
return `${e.label}: ${n}`;
|
|
557
|
+
} else if (e.type === "single" || e.type === "tree-single") {
|
|
558
|
+
const s = ie(e, n);
|
|
559
|
+
if (s)
|
|
560
|
+
return `${e.label}: ${ye(s, e)}`;
|
|
545
561
|
} else {
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
548
|
-
const
|
|
549
|
-
const
|
|
550
|
-
return
|
|
551
|
-
}).filter((
|
|
552
|
-
if (
|
|
553
|
-
return `${
|
|
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;
|
|
567
|
+
}).filter((b) => b !== null);
|
|
568
|
+
if (i.length > 0)
|
|
569
|
+
return `${e.label}: ${i.join("、")}`;
|
|
554
570
|
}
|
|
555
571
|
}
|
|
556
|
-
return
|
|
557
|
-
},
|
|
558
|
-
const
|
|
559
|
-
if (!
|
|
560
|
-
if (
|
|
561
|
-
|
|
572
|
+
return e.label;
|
|
573
|
+
}, Oe = (e) => {
|
|
574
|
+
const n = d.items[e];
|
|
575
|
+
if (!n) return;
|
|
576
|
+
if (h.value === e) {
|
|
577
|
+
h.value = null;
|
|
562
578
|
return;
|
|
563
579
|
}
|
|
564
|
-
const
|
|
565
|
-
s.type === "single" ?
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
if (
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
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)
|
|
586
|
+
return typeof e == "string" ? e : e.label || String(e.value);
|
|
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);
|
|
591
|
+
{
|
|
592
|
+
const i = n.renderItem(s);
|
|
593
|
+
return i != null ? String(i) : "";
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return typeof e == "string" ? e : e.label || String(e.value);
|
|
597
|
+
}, oe = (e, n) => {
|
|
598
|
+
if (!n)
|
|
599
|
+
return typeof e == "string" ? e : e.value !== void 0 ? e.value : e;
|
|
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;
|
|
604
|
+
if (i) {
|
|
605
|
+
if (typeof i == "string")
|
|
606
|
+
return String(typeof s == "object" && s !== null ? s[i] ?? "" : s);
|
|
607
|
+
{
|
|
608
|
+
const b = i(s);
|
|
609
|
+
return b != null ? String(b) : "";
|
|
610
|
+
}
|
|
611
|
+
}
|
|
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);
|
|
623
|
+
if (se) return se;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return null;
|
|
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];
|
|
633
|
+
Array.isArray(N) && N.length > 0 && b.push(...pe(e, N));
|
|
634
|
+
}
|
|
635
|
+
return b;
|
|
636
|
+
}, z = (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) => {
|
|
641
|
+
if (!e) return [];
|
|
642
|
+
const n = e.childrenKey || "children";
|
|
643
|
+
return (e.options || []).filter((s) => {
|
|
644
|
+
if (typeof s == "string") return !1;
|
|
645
|
+
const i = s[n];
|
|
646
|
+
return Array.isArray(i) && i.length > 0;
|
|
647
|
+
});
|
|
648
|
+
}, _e = (e, n) => {
|
|
649
|
+
if (!n || typeof e == "string") return [];
|
|
650
|
+
const s = n.childrenKey || "children", i = e[s];
|
|
651
|
+
return Array.isArray(i) ? i : [];
|
|
652
|
+
}, je = (e) => {
|
|
653
|
+
if (e)
|
|
654
|
+
return R.value[e.key] !== void 0 ? R.value[e.key] : m.value[e.key];
|
|
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
|
+
}
|
|
660
|
+
}, ge = (e) => {
|
|
661
|
+
if (!r.value) return;
|
|
662
|
+
const n = r.value.key, s = oe(e, r.value);
|
|
663
|
+
m.value[n];
|
|
664
|
+
let i;
|
|
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();
|
|
666
|
+
}, ke = (e) => {
|
|
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)
|
|
583
670
|
);
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
},
|
|
598
|
-
|
|
599
|
-
|
|
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
|
+
}
|
|
675
|
+
}, qe = () => {
|
|
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] = [];
|
|
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
|
+
}
|
|
684
|
+
}, Ye = () => {
|
|
685
|
+
if (!r.value) return;
|
|
686
|
+
const e = r.value.key;
|
|
687
|
+
m.value[e];
|
|
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;
|
|
696
|
+
} else {
|
|
697
|
+
const s = _.value[e];
|
|
698
|
+
n = Array.isArray(s) && s.length > 0 ? s : void 0, m.value[e] = n;
|
|
699
|
+
}
|
|
700
|
+
y("update:modelValue", { ...m.value }), y("change", { ...m.value }, r.value), j();
|
|
701
|
+
}, be = (e) => {
|
|
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;
|
|
704
|
+
}, Je = (e) => {
|
|
705
|
+
if (e.slot) {
|
|
706
|
+
const s = R.value[e.key];
|
|
707
|
+
return s != null && s !== "" ? 1 : 0;
|
|
708
|
+
} else if (e.type === "input")
|
|
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;
|
|
600
712
|
};
|
|
601
|
-
return
|
|
713
|
+
return a({
|
|
602
714
|
/** 获取当前筛选值 */
|
|
603
|
-
getValues: () => ({ ...
|
|
715
|
+
getValues: () => ({ ...m.value }),
|
|
604
716
|
/** 重置所有筛选 */
|
|
605
717
|
reset: () => {
|
|
606
|
-
|
|
718
|
+
m.value = {}, _.value = {}, R.value = {}, y("update:modelValue", {});
|
|
607
719
|
}
|
|
608
|
-
}), (
|
|
609
|
-
|
|
610
|
-
(
|
|
611
|
-
key:
|
|
612
|
-
class:
|
|
613
|
-
"is-active":
|
|
614
|
-
"has-value":
|
|
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", {
|
|
723
|
+
key: i,
|
|
724
|
+
class: E(["rc-search-area__item", {
|
|
725
|
+
"is-active": h.value === i,
|
|
726
|
+
"has-value": be(s) > 0
|
|
615
727
|
}]),
|
|
616
|
-
onClick: (
|
|
728
|
+
onClick: (b) => Oe(i)
|
|
617
729
|
}, [
|
|
618
|
-
|
|
619
|
-
|
|
730
|
+
k("span", Ut, w(Fe(s)), 1),
|
|
731
|
+
M(H(B), {
|
|
620
732
|
name: "icon_a-xiala2",
|
|
621
|
-
color:
|
|
622
|
-
class:
|
|
733
|
+
color: h.value !== i && be(s) > 0 ? "#1677ff" : "#969799",
|
|
734
|
+
class: E(["rc-search-area__item-arrow", { "is-up": h.value === i }])
|
|
623
735
|
}, null, 8, ["color", "class"])
|
|
624
|
-
], 10,
|
|
736
|
+
], 10, Kt))), 128))
|
|
625
737
|
]),
|
|
626
|
-
|
|
627
|
-
default:
|
|
628
|
-
|
|
738
|
+
M(fe, { name: "rc-search-area-fade" }, {
|
|
739
|
+
default: ee(() => [
|
|
740
|
+
h.value !== null && d.showMask ? (l(), u("div", {
|
|
629
741
|
key: 0,
|
|
630
742
|
ref_key: "maskRef",
|
|
631
|
-
ref:
|
|
743
|
+
ref: f,
|
|
632
744
|
class: "rc-search-area__mask",
|
|
633
|
-
style:
|
|
634
|
-
onClick:
|
|
635
|
-
}, null, 4)) :
|
|
745
|
+
style: T(c.value),
|
|
746
|
+
onClick: j
|
|
747
|
+
}, null, 4)) : $("", !0)
|
|
636
748
|
]),
|
|
637
749
|
_: 1
|
|
638
750
|
}),
|
|
639
|
-
|
|
640
|
-
default:
|
|
641
|
-
var
|
|
751
|
+
M(fe, { name: "rc-search-area-slide" }, {
|
|
752
|
+
default: ee(() => {
|
|
753
|
+
var s, i, b, g, N, Q, se, $e, Ce, Se, xe;
|
|
642
754
|
return [
|
|
643
|
-
|
|
755
|
+
h.value !== null ? (l(), u("div", {
|
|
644
756
|
key: 0,
|
|
645
757
|
ref_key: "panelRef",
|
|
646
|
-
ref:
|
|
758
|
+
ref: p,
|
|
647
759
|
class: "rc-search-area__panel"
|
|
648
760
|
}, [
|
|
649
|
-
|
|
650
|
-
(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
761
|
+
k("div", Gt, [
|
|
762
|
+
(s = r.value) != null && s.slot && e.$slots[r.value.key] ? A(e.$slots, r.value.key, {
|
|
763
|
+
key: 0,
|
|
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),
|
|
769
|
+
type: "text",
|
|
770
|
+
class: "rc-search-area__input",
|
|
771
|
+
placeholder: r.value.placeholder || "请输入",
|
|
772
|
+
onInput: He
|
|
773
|
+
}, null, 40, Ot), [
|
|
774
|
+
[st, I.value]
|
|
775
|
+
])
|
|
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,
|
|
779
|
+
class: "rc-search-area__tree-group"
|
|
780
|
+
}, [
|
|
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", {
|
|
784
|
+
key: de,
|
|
785
|
+
class: E(["rc-search-area__option", { "is-selected": z(D) }]),
|
|
786
|
+
onClick: (Qe) => ge(D)
|
|
787
|
+
}, [
|
|
788
|
+
k("span", Yt, w(P(D, r.value || void 0)), 1),
|
|
789
|
+
z(D) ? (l(), U(H(B), {
|
|
790
|
+
key: 0,
|
|
791
|
+
name: "icon_select",
|
|
792
|
+
class: "rc-search-area__option-check"
|
|
793
|
+
})) : $("", !0)
|
|
794
|
+
], 10, Ht))), 128))
|
|
795
|
+
])
|
|
796
|
+
]))), 128))
|
|
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,
|
|
800
|
+
class: "rc-search-area__tree-group"
|
|
801
|
+
}, [
|
|
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", {
|
|
805
|
+
key: de,
|
|
806
|
+
class: E(["rc-search-area__option", { "is-selected": z(D) }]),
|
|
807
|
+
onClick: (Qe) => ke(D)
|
|
808
|
+
}, [
|
|
809
|
+
k("span", en, w(P(D, r.value || void 0)), 1),
|
|
810
|
+
z(D) ? (l(), U(H(B), {
|
|
811
|
+
key: 0,
|
|
812
|
+
name: "icon_select",
|
|
813
|
+
class: "rc-search-area__option-check"
|
|
814
|
+
})) : $("", !0)
|
|
815
|
+
], 10, Zt))), 128))
|
|
816
|
+
])
|
|
817
|
+
]))), 128))
|
|
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,
|
|
821
|
+
class: E(["rc-search-area__option", { "is-selected": z(S) }]),
|
|
822
|
+
onClick: (D) => ge(S)
|
|
655
823
|
}, [
|
|
656
|
-
|
|
657
|
-
|
|
824
|
+
k("span", an, w(P(S, r.value || void 0)), 1),
|
|
825
|
+
z(S) ? (l(), U(H(B), {
|
|
658
826
|
key: 0,
|
|
659
827
|
name: "icon_select",
|
|
660
828
|
class: "rc-search-area__option-check"
|
|
661
|
-
})) :
|
|
662
|
-
], 10,
|
|
663
|
-
])) : (
|
|
664
|
-
(
|
|
665
|
-
key:
|
|
666
|
-
class:
|
|
667
|
-
onClick: (
|
|
829
|
+
})) : $("", !0)
|
|
830
|
+
], 10, nn))), 128))
|
|
831
|
+
])) : (l(), u("div", sn, [
|
|
832
|
+
(l(!0), u(L, null, W(he(r.value), (S, q) => (l(), u("div", {
|
|
833
|
+
key: q,
|
|
834
|
+
class: E(["rc-search-area__option", { "is-selected": z(S) }]),
|
|
835
|
+
onClick: (D) => ke(S)
|
|
668
836
|
}, [
|
|
669
|
-
|
|
670
|
-
|
|
837
|
+
k("span", ln, w(P(S, r.value || void 0)), 1),
|
|
838
|
+
z(S) ? (l(), U(H(B), {
|
|
671
839
|
key: 0,
|
|
672
840
|
name: "icon_select",
|
|
673
841
|
class: "rc-search-area__option-check"
|
|
674
|
-
})) :
|
|
675
|
-
], 10,
|
|
842
|
+
})) : $("", !0)
|
|
843
|
+
], 10, rn))), 128))
|
|
676
844
|
])),
|
|
677
|
-
((
|
|
678
|
-
|
|
679
|
-
])])) :
|
|
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)
|
|
847
|
+
])])) : $("", !0)
|
|
680
848
|
]),
|
|
681
|
-
|
|
682
|
-
|
|
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), {
|
|
683
851
|
block: "",
|
|
684
|
-
onClick:
|
|
852
|
+
onClick: qe
|
|
685
853
|
}, {
|
|
686
|
-
default:
|
|
687
|
-
|
|
854
|
+
default: ee(() => [...n[2] || (n[2] = [
|
|
855
|
+
ae(" 重置 ", -1)
|
|
688
856
|
])]),
|
|
689
857
|
_: 1
|
|
690
858
|
}),
|
|
691
|
-
|
|
859
|
+
M(H(le), {
|
|
692
860
|
type: "primary",
|
|
693
861
|
block: "",
|
|
694
|
-
onClick:
|
|
862
|
+
onClick: Ye
|
|
695
863
|
}, {
|
|
696
|
-
default:
|
|
697
|
-
|
|
864
|
+
default: ee(() => [
|
|
865
|
+
ae(" 确定" + w(Ge.value), 1)
|
|
698
866
|
]),
|
|
699
867
|
_: 1
|
|
700
868
|
})
|
|
701
|
-
])
|
|
702
|
-
], 512)) :
|
|
869
|
+
])) : $("", !0)
|
|
870
|
+
], 512)) : $("", !0)
|
|
703
871
|
];
|
|
704
872
|
}),
|
|
705
|
-
_:
|
|
873
|
+
_: 3
|
|
706
874
|
})
|
|
707
875
|
]));
|
|
708
876
|
}
|
|
709
|
-
}),
|
|
710
|
-
|
|
711
|
-
},
|
|
877
|
+
}), Te = /* @__PURE__ */ O(un, [["__scopeId", "data-v-2252d02c"]]), Ne = (t) => {
|
|
878
|
+
t.component("RcSearchArea", Te), t.component("rc-search-area", Te);
|
|
879
|
+
}, ve = Symbol("RECYCLE_UI_CONFIG"), Ke = {
|
|
712
880
|
prefix: "rc",
|
|
713
881
|
autoRegister: !0,
|
|
714
|
-
provideKey:
|
|
882
|
+
provideKey: ve,
|
|
715
883
|
// 预留主题/其他全局配置
|
|
716
884
|
theme: {},
|
|
717
885
|
// IconFont 默认配置(可在 app.use 时覆盖)
|
|
718
886
|
iconCssUrl: "//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",
|
|
719
887
|
iconClass: "iconfont"
|
|
720
888
|
};
|
|
721
|
-
function
|
|
722
|
-
|
|
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));
|
|
723
891
|
}
|
|
724
|
-
const
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
727
|
-
const
|
|
728
|
-
if (!document.head.querySelector(
|
|
729
|
-
const
|
|
730
|
-
|
|
892
|
+
const Ue = (t, a) => {
|
|
893
|
+
const o = { ...Ke, ...a || {} };
|
|
894
|
+
if (t.provide(o.provideKey ?? ve, o), t.config.globalProperties.$recycleUI = o, typeof window < "u" && o.iconCssUrl) {
|
|
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);
|
|
731
899
|
}
|
|
732
900
|
}
|
|
733
|
-
return
|
|
734
|
-
},
|
|
735
|
-
function
|
|
901
|
+
return dn(t, o), t;
|
|
902
|
+
}, hn = { install: Ue };
|
|
903
|
+
function mn(t) {
|
|
736
904
|
return {
|
|
737
|
-
install(
|
|
738
|
-
|
|
905
|
+
install(a) {
|
|
906
|
+
Ue(a, t);
|
|
739
907
|
}
|
|
740
908
|
};
|
|
741
909
|
}
|
|
742
910
|
export {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
911
|
+
ve as RECYCLE_UI_SYMBOL,
|
|
912
|
+
le as RcButton,
|
|
913
|
+
ce as RcCard,
|
|
914
|
+
vn as RcDescriptions,
|
|
915
|
+
yn as RcDescriptionsItem,
|
|
916
|
+
B as RcIcon,
|
|
917
|
+
Te as RcSearchArea,
|
|
918
|
+
ue as RcToast,
|
|
919
|
+
mn as createRecycleUI,
|
|
920
|
+
hn as default,
|
|
921
|
+
Ke as defaultRecycleUIConfig,
|
|
922
|
+
Dt as hideToast,
|
|
923
|
+
Ue as install,
|
|
924
|
+
Ae as installButton,
|
|
925
|
+
Re as installCard,
|
|
926
|
+
Ve as installDescriptions,
|
|
927
|
+
Be as installIcon,
|
|
928
|
+
Ee as installMessage,
|
|
929
|
+
Ne as installSearchArea,
|
|
930
|
+
Wt as message,
|
|
931
|
+
vn as rcDescriptions,
|
|
932
|
+
yn as rcDescriptionsItem,
|
|
933
|
+
pn as showToast
|
|
766
934
|
};
|
|
767
935
|
//# sourceMappingURL=index.mjs.map
|