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