@rft-rc/recycle-ui 0.0.2-rc.7 → 0.0.2-rc.9
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/README.md +38 -34
- package/dist/components/dropdown/index.d.ts +8 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/dropdown/index.vue.d.ts +49 -0
- package/dist/components/dropdown/index.vue.d.ts.map +1 -0
- package/dist/components/dropdown/item.vue.d.ts +24 -0
- package/dist/components/dropdown/item.vue.d.ts.map +1 -0
- package/dist/components/dropdown/menu.vue.d.ts +32 -0
- package/dist/components/dropdown/menu.vue.d.ts.map +1 -0
- package/dist/components/dropdown/types.d.ts +2 -0
- package/dist/components/dropdown/types.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.vue.d.ts +135 -0
- package/dist/components/input/index.vue.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1591 -1085
- 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 ae, inject as Ie, computed as T, onMounted as nt, createElementBlock as f, openBlock as u, normalizeStyle as ee, normalizeClass as G, createCommentVNode as x, toDisplayString as L, renderSlot as q, Fragment as ne, createBlock as te, createTextVNode as _e, createElementVNode as $, ref as M, watchEffect as Tt, provide as Ve, renderList as ie, onUnmounted as at, Teleport as ut, createVNode as K, Transition as Ee, withCtx as Z, createApp as Et, reactive as Bt, TransitionGroup as At, render as Ct, watch as De, withModifiers as He, unref as Q, nextTick as Be, withDirectives as St, vModelText as It, useSlots as Ft, resolveDynamicComponent as Yt } from "vue";
|
|
2
|
+
const zt = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "rc-icon__unicode"
|
|
5
|
-
},
|
|
5
|
+
}, Lt = /* @__PURE__ */ ae({
|
|
6
6
|
name: "rc-icon",
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
@@ -13,51 +13,51 @@ const Rt = {
|
|
|
13
13
|
code: { default: "" }
|
|
14
14
|
},
|
|
15
15
|
setup(e) {
|
|
16
|
-
const r = e,
|
|
17
|
-
fontSize:
|
|
16
|
+
const r = e, v = Ie(it, {}), t = T(() => (v == null ? void 0 : v.iconClass) || "iconfont"), y = T(() => r.name || ""), _ = T(() => typeof r.size == "number" ? `${r.size}px` : r.size || "16px"), g = T(() => ({
|
|
17
|
+
fontSize: _.value,
|
|
18
18
|
color: r.color || void 0,
|
|
19
19
|
lineHeight: 1,
|
|
20
|
-
fontFamily: (
|
|
21
|
-
})), p =
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
if (typeof
|
|
25
|
-
return String.fromCharCode(
|
|
26
|
-
const
|
|
27
|
-
return Number.isNaN(
|
|
20
|
+
fontFamily: (v == null ? void 0 : v.iconClass) || "iconfont"
|
|
21
|
+
})), p = T(() => {
|
|
22
|
+
const s = r.code;
|
|
23
|
+
if (s == null || s === "" || s === 0) return "";
|
|
24
|
+
if (typeof s == "number")
|
|
25
|
+
return String.fromCharCode(s);
|
|
26
|
+
const m = String(s).replace(/^0x/i, ""), E = parseInt(m, 16);
|
|
27
|
+
return Number.isNaN(E) ? "" : String.fromCharCode(E);
|
|
28
28
|
});
|
|
29
|
-
return
|
|
29
|
+
return nt(() => {
|
|
30
30
|
if (typeof window > "u") return;
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
if (!document.head.querySelector(
|
|
35
|
-
const
|
|
36
|
-
|
|
31
|
+
const s = v && v.iconCssUrl || Mt.iconCssUrl;
|
|
32
|
+
if (!s) return;
|
|
33
|
+
const m = `link[rel="stylesheet"][data-rcui-icon="true"][href="${s}"]`;
|
|
34
|
+
if (!document.head.querySelector(m)) {
|
|
35
|
+
const D = document.createElement("link");
|
|
36
|
+
D.rel = "stylesheet", D.href = s, D.setAttribute("data-rcui-icon", "true"), document.head.appendChild(D);
|
|
37
37
|
}
|
|
38
|
-
}), (
|
|
39
|
-
class:
|
|
40
|
-
style:
|
|
38
|
+
}), (s, m) => (u(), f("i", {
|
|
39
|
+
class: G(["rc-icon", [t.value, y.value, { "rc-icon--spin": e.spin }]]),
|
|
40
|
+
style: ee(g.value),
|
|
41
41
|
"aria-hidden": "true"
|
|
42
42
|
}, [
|
|
43
|
-
p.value ? (u(),
|
|
43
|
+
p.value ? (u(), f("span", zt, L(p.value), 1)) : x("", !0)
|
|
44
44
|
], 6));
|
|
45
45
|
}
|
|
46
|
-
}),
|
|
47
|
-
const
|
|
48
|
-
for (const [
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
},
|
|
46
|
+
}), le = (e, r) => {
|
|
47
|
+
const v = e.__vccOpts || e;
|
|
48
|
+
for (const [t, y] of r)
|
|
49
|
+
v[t] = y;
|
|
50
|
+
return v;
|
|
51
|
+
}, X = /* @__PURE__ */ le(Lt, [["__scopeId", "data-v-3857a892"]]), Pt = ["disabled"], Nt = {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "rc-button__spinner"
|
|
54
|
-
},
|
|
54
|
+
}, Wt = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "rc-button__icon rc-button__icon--prefix"
|
|
57
|
-
},
|
|
57
|
+
}, Ht = {
|
|
58
58
|
key: 2,
|
|
59
59
|
class: "rc-button__icon rc-button__icon--suffix"
|
|
60
|
-
},
|
|
60
|
+
}, Ot = /* @__PURE__ */ ae({
|
|
61
61
|
__name: "index",
|
|
62
62
|
props: {
|
|
63
63
|
type: { default: "default" },
|
|
@@ -73,47 +73,47 @@ const Rt = {
|
|
|
73
73
|
},
|
|
74
74
|
emits: ["click"],
|
|
75
75
|
setup(e, { emit: r }) {
|
|
76
|
-
const
|
|
77
|
-
!
|
|
78
|
-
},
|
|
79
|
-
const
|
|
80
|
-
return typeof
|
|
76
|
+
const v = e, t = r, y = (g) => {
|
|
77
|
+
!v.disabled && !v.loading && t("click", g);
|
|
78
|
+
}, _ = T(() => {
|
|
79
|
+
const g = v.round;
|
|
80
|
+
return typeof g == "boolean" ? g ? "999px" : "6px" : typeof g == "number" ? `${g}px` : String(g);
|
|
81
81
|
});
|
|
82
|
-
return (
|
|
83
|
-
class:
|
|
84
|
-
style:
|
|
82
|
+
return (g, p) => (u(), f("button", {
|
|
83
|
+
class: G(["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: ee({ borderRadius: _.value }),
|
|
85
85
|
disabled: e.disabled || e.loading,
|
|
86
|
-
onClick:
|
|
86
|
+
onClick: y
|
|
87
87
|
}, [
|
|
88
|
-
e.loading ? (u(),
|
|
89
|
-
e.preIcon ||
|
|
90
|
-
|
|
91
|
-
e.preIcon ? (u(),
|
|
88
|
+
e.loading ? (u(), f("span", Nt)) : (u(), f(ne, { key: 1 }, [
|
|
89
|
+
e.preIcon || g.$slots.preIcon ? (u(), f("span", Wt, [
|
|
90
|
+
q(g.$slots, "preIcon", {}, () => [
|
|
91
|
+
e.preIcon ? (u(), te(X, {
|
|
92
92
|
key: 0,
|
|
93
93
|
name: e.preIcon
|
|
94
|
-
}, null, 8, ["name"])) :
|
|
94
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
95
95
|
], !0)
|
|
96
|
-
])) :
|
|
96
|
+
])) : x("", !0)
|
|
97
97
|
], 64)),
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
q(g.$slots, "default", {}, () => [
|
|
99
|
+
_e(L(e.label), 1)
|
|
100
100
|
], !0),
|
|
101
|
-
!e.loading && (e.suffixIcon ||
|
|
102
|
-
|
|
103
|
-
e.suffixIcon ? (u(),
|
|
101
|
+
!e.loading && (e.suffixIcon || g.$slots.suffixIcon) ? (u(), f("span", Ht, [
|
|
102
|
+
q(g.$slots, "suffixIcon", {}, () => [
|
|
103
|
+
e.suffixIcon ? (u(), te(X, {
|
|
104
104
|
key: 0,
|
|
105
105
|
name: e.suffixIcon
|
|
106
|
-
}, null, 8, ["name"])) :
|
|
106
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
107
107
|
], !0)
|
|
108
|
-
])) :
|
|
109
|
-
], 14,
|
|
108
|
+
])) : x("", !0)
|
|
109
|
+
], 14, Pt));
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
112
|
-
|
|
113
|
-
function
|
|
114
|
-
return e.component(
|
|
111
|
+
}), we = /* @__PURE__ */ le(Ot, [["__scopeId", "data-v-4c6a5e4f"]]);
|
|
112
|
+
we.name = "rc-button";
|
|
113
|
+
function ft(e) {
|
|
114
|
+
return e.component(we.name, we), e;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ ae({
|
|
117
117
|
name: "rc-descriptions-item",
|
|
118
118
|
__name: "item",
|
|
119
119
|
props: {
|
|
@@ -124,42 +124,42 @@ const Bt = { class: "rc-desc-item__value" }, Nt = /* @__PURE__ */ fe({
|
|
|
124
124
|
},
|
|
125
125
|
setup(e) {
|
|
126
126
|
const r = e;
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
return Math.min(
|
|
131
|
-
}),
|
|
132
|
-
const
|
|
133
|
-
if (!
|
|
134
|
-
const
|
|
135
|
-
return `calc((100% - ${
|
|
136
|
-
}), p =
|
|
137
|
-
const
|
|
138
|
-
return
|
|
127
|
+
Ie("rcDescItemWidth", void 0), Ie("rcDescSingleWidth", ""), Ie("rcDescGap", "0px");
|
|
128
|
+
const v = Ie("rcDescGapPx", 0), t = Ie("rcDescColCount", 1), y = Ie("rcDescLabelWidth", ""), _ = T(() => {
|
|
129
|
+
const s = typeof r.span == "string" ? parseInt(r.span, 10) : r.span, m = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, E = !Number.isNaN(s) && s > 0 ? s : 1;
|
|
130
|
+
return Math.min(E, m || 1);
|
|
131
|
+
}), g = T(() => {
|
|
132
|
+
const s = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, m = typeof (v == null ? void 0 : v.value) == "number" ? v.value : v, E = _.value;
|
|
133
|
+
if (!s || s <= 1 || E >= s) return "100%";
|
|
134
|
+
const D = (s - 1) * m, k = (E - 1) * m;
|
|
135
|
+
return `calc((100% - ${D}px) * ${E} / ${s} + ${k}px)`;
|
|
136
|
+
}), p = T(() => {
|
|
137
|
+
const s = typeof (y == null ? void 0 : y.value) == "string" ? y.value : y, m = r.labelWidth !== "" ? r.labelWidth : s || "";
|
|
138
|
+
return m ? { width: typeof m == "number" ? `${m}px` : String(m), flex: "0 0 auto" } : {};
|
|
139
139
|
});
|
|
140
|
-
return (
|
|
140
|
+
return (s, m) => (u(), f("div", {
|
|
141
141
|
class: "rc-desc-item",
|
|
142
|
-
style:
|
|
142
|
+
style: ee({ width: g.value, flex: `0 0 ${g.value}` })
|
|
143
143
|
}, [
|
|
144
|
-
|
|
144
|
+
$("div", {
|
|
145
145
|
class: "rc-desc-item__label",
|
|
146
|
-
style:
|
|
146
|
+
style: ee(p.value)
|
|
147
147
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
q(s.$slots, "label", {}, () => [
|
|
149
|
+
_e(L(e.label), 1)
|
|
150
150
|
], !0)
|
|
151
151
|
], 4),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
$("div", Ut, [
|
|
153
|
+
q(s.$slots, "default", {}, () => [
|
|
154
|
+
_e(L(e.value), 1)
|
|
155
155
|
], !0)
|
|
156
156
|
])
|
|
157
157
|
], 4));
|
|
158
158
|
}
|
|
159
|
-
}),
|
|
159
|
+
}), Fe = /* @__PURE__ */ le(Kt, [["__scopeId", "data-v-970d0b99"]]), jt = { class: "rc-descriptions" }, Gt = {
|
|
160
160
|
key: 0,
|
|
161
161
|
class: "rc-descriptions__title"
|
|
162
|
-
},
|
|
162
|
+
}, qt = /* @__PURE__ */ ae({
|
|
163
163
|
name: "rc-descriptions",
|
|
164
164
|
__name: "index",
|
|
165
165
|
props: {
|
|
@@ -171,66 +171,66 @@ const Bt = { class: "rc-desc-item__value" }, Nt = /* @__PURE__ */ fe({
|
|
|
171
171
|
keyMap: {}
|
|
172
172
|
},
|
|
173
173
|
setup(e) {
|
|
174
|
-
const r = e,
|
|
175
|
-
const
|
|
176
|
-
return !Number.isNaN(
|
|
177
|
-
}),
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
|
|
174
|
+
const r = e, v = M(null), t = T(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)), y = T(() => {
|
|
175
|
+
const m = typeof r.column == "string" ? Number.parseInt(r.column, 10) : r.column ?? 1;
|
|
176
|
+
return !Number.isNaN(m) && m > 0 ? m : 1;
|
|
177
|
+
}), _ = M("100%"), g = M("100%");
|
|
178
|
+
Tt(() => {
|
|
179
|
+
const m = y.value;
|
|
180
|
+
if (m <= 1)
|
|
181
|
+
_.value = "100%", g.value = "100%";
|
|
182
182
|
else {
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
const E = typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0, k = `calc((100% - ${(m - 1) * E}px) / ${m})`;
|
|
184
|
+
g.value = k, _.value = k;
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
187
|
-
const p =
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
var
|
|
191
|
-
const
|
|
192
|
-
return (
|
|
193
|
-
label:
|
|
194
|
-
value:
|
|
186
|
+
}), Ve("rcDescItemWidth", _), Ve("rcDescSingleWidth", g), Ve("rcDescColCount", y), Ve("rcDescGapPx", T(() => typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0));
|
|
187
|
+
const p = T(() => r.labelWidth === "" || r.labelWidth === void 0 ? "" : typeof r.labelWidth == "number" ? `${r.labelWidth}px` : String(r.labelWidth));
|
|
188
|
+
Ve("rcDescLabelWidth", p), Ve("rcDescGap", T(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)));
|
|
189
|
+
const s = T(() => {
|
|
190
|
+
var D, k, R;
|
|
191
|
+
const m = ((D = r.keyMap) == null ? void 0 : D.key) ?? "label", E = ((k = r.keyMap) == null ? void 0 : k.value) ?? "value";
|
|
192
|
+
return (R = r.data) != null && R.length ? r.data.map((F) => ({
|
|
193
|
+
label: F == null ? void 0 : F[m],
|
|
194
|
+
value: F == null ? void 0 : F[E]
|
|
195
195
|
})) : [];
|
|
196
196
|
});
|
|
197
|
-
return (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
return (m, E) => (u(), f("div", jt, [
|
|
198
|
+
m.$slots.title || e.title ? (u(), f("div", Gt, [
|
|
199
|
+
q(m.$slots, "title", {}, () => [
|
|
200
|
+
_e(L(e.title), 1)
|
|
201
201
|
], !0)
|
|
202
|
-
])) :
|
|
203
|
-
|
|
202
|
+
])) : x("", !0),
|
|
203
|
+
$("div", {
|
|
204
204
|
class: "rc-descriptions__body",
|
|
205
|
-
style:
|
|
205
|
+
style: ee({ gap: t.value }),
|
|
206
206
|
ref_key: "wrapEl",
|
|
207
|
-
ref:
|
|
207
|
+
ref: v
|
|
208
208
|
}, [
|
|
209
|
-
|
|
210
|
-
key:
|
|
211
|
-
label:
|
|
212
|
-
value:
|
|
209
|
+
s.value.length ? (u(!0), f(ne, { key: 0 }, ie(s.value, (D, k) => (u(), te(Fe, {
|
|
210
|
+
key: k,
|
|
211
|
+
label: D.label,
|
|
212
|
+
value: D.value,
|
|
213
213
|
"label-width": e.labelWidth
|
|
214
|
-
}, null, 8, ["label", "value", "label-width"]))), 128)) :
|
|
214
|
+
}, null, 8, ["label", "value", "label-width"]))), 128)) : q(m.$slots, "default", { key: 1 }, void 0, !0)
|
|
215
215
|
], 4)
|
|
216
216
|
]));
|
|
217
217
|
}
|
|
218
|
-
}), Pe = /* @__PURE__ */
|
|
218
|
+
}), Pe = /* @__PURE__ */ le(qt, [["__scopeId", "data-v-5fcaa235"]]);
|
|
219
219
|
Pe.name = "rc-descriptions";
|
|
220
|
-
|
|
221
|
-
function
|
|
222
|
-
return e.component(Pe.name, Pe), e.component("RcDescriptions", Pe), e.component(
|
|
220
|
+
Fe.name = "rc-descriptions-item";
|
|
221
|
+
function vt(e) {
|
|
222
|
+
return e.component(Pe.name, Pe), e.component("RcDescriptions", Pe), e.component(Fe.name, Fe), e.component("RcDescriptionsItem", Fe), e;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const za = Pe, La = Fe, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card__title-text" }, Xt = {
|
|
225
225
|
key: 0,
|
|
226
226
|
class: "rc-card__status"
|
|
227
|
-
},
|
|
227
|
+
}, Zt = {
|
|
228
228
|
key: 1,
|
|
229
229
|
class: "rc-card__divider"
|
|
230
|
-
},
|
|
230
|
+
}, en = {
|
|
231
231
|
key: 2,
|
|
232
232
|
class: "rc-card__action"
|
|
233
|
-
},
|
|
233
|
+
}, tn = /* @__PURE__ */ ae({
|
|
234
234
|
name: "rc-card",
|
|
235
235
|
__name: "index",
|
|
236
236
|
props: {
|
|
@@ -248,84 +248,84 @@ const gn = Pe, _n = Te, Ot = { class: "rc-card__title" }, zt = { class: "rc-card
|
|
|
248
248
|
height: { default: "" }
|
|
249
249
|
},
|
|
250
250
|
setup(e) {
|
|
251
|
-
const r = e,
|
|
251
|
+
const r = e, v = T(() => {
|
|
252
252
|
const p = typeof r.round == "boolean" ? r.round ? "12px" : "0" : typeof r.round == "number" ? `${r.round}px` : String(r.round);
|
|
253
253
|
return {
|
|
254
254
|
backgroundColor: r.color || "var(--rc-white)",
|
|
255
255
|
borderRadius: p,
|
|
256
|
-
boxShadow:
|
|
257
|
-
width:
|
|
258
|
-
height:
|
|
256
|
+
boxShadow: g(r.elevation),
|
|
257
|
+
width: _(r.width),
|
|
258
|
+
height: _(r.height)
|
|
259
259
|
};
|
|
260
|
-
}),
|
|
260
|
+
}), t = T(() => r.padding || "16px"), y = T(
|
|
261
261
|
() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)
|
|
262
262
|
);
|
|
263
|
-
function
|
|
263
|
+
function _(p) {
|
|
264
264
|
return p == null || p === "" ? "" : typeof p == "number" ? `${p}px` : String(p);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function g(p) {
|
|
267
267
|
if (!p || p <= 0) return "none";
|
|
268
|
-
const
|
|
269
|
-
return `0 ${Math.round(
|
|
270
|
-
|
|
271
|
-
)}px ${Math.round(
|
|
272
|
-
}
|
|
273
|
-
return (p,
|
|
274
|
-
class:
|
|
275
|
-
style:
|
|
268
|
+
const s = 4 * p;
|
|
269
|
+
return `0 ${Math.round(s / 2)}px ${s}px rgba(0,0,0,0.06), 0 ${Math.round(
|
|
270
|
+
s / 4
|
|
271
|
+
)}px ${Math.round(s / 2)}px rgba(0,0,0,0.04)`;
|
|
272
|
+
}
|
|
273
|
+
return (p, s) => (u(), f("div", {
|
|
274
|
+
class: G(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
|
|
275
|
+
style: ee(v.value)
|
|
276
276
|
}, [
|
|
277
|
-
p.$slots.title || e.title || p.$slots.status || e.status ? (u(),
|
|
277
|
+
p.$slots.title || e.title || p.$slots.status || e.status ? (u(), f("div", {
|
|
278
278
|
key: 0,
|
|
279
279
|
class: "rc-card__top",
|
|
280
|
-
style:
|
|
280
|
+
style: ee({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
|
|
281
281
|
}, [
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
$("div", Jt, [
|
|
283
|
+
q(p.$slots, "title", {}, () => [
|
|
284
|
+
$("span", Qt, L(e.title), 1)
|
|
285
285
|
], !0)
|
|
286
286
|
]),
|
|
287
|
-
p.$slots.status || e.status ? (u(),
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
p.$slots.status || e.status ? (u(), f("div", Xt, [
|
|
288
|
+
q(p.$slots, "status", {}, () => [
|
|
289
|
+
$("span", {
|
|
290
290
|
class: "rc-card__status-text",
|
|
291
|
-
style:
|
|
292
|
-
},
|
|
291
|
+
style: ee({ color: e.statusColor || "var(--rc-primary)" })
|
|
292
|
+
}, L(e.status), 5)
|
|
293
293
|
], !0)
|
|
294
|
-
])) :
|
|
295
|
-
], 4)) :
|
|
296
|
-
|
|
294
|
+
])) : x("", !0)
|
|
295
|
+
], 4)) : x("", !0),
|
|
296
|
+
$("div", {
|
|
297
297
|
class: "rc-card__body",
|
|
298
|
-
style:
|
|
298
|
+
style: ee({ padding: t.value, gap: y.value })
|
|
299
299
|
}, [
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
q(p.$slots, "content", {}, () => [
|
|
301
|
+
q(p.$slots, "default", {}, void 0, !0)
|
|
302
302
|
], !0)
|
|
303
303
|
], 4),
|
|
304
|
-
p.$slots.action ? (u(),
|
|
305
|
-
p.$slots.action ? (u(),
|
|
306
|
-
|
|
307
|
-
])) :
|
|
304
|
+
p.$slots.action ? (u(), f("div", Zt)) : x("", !0),
|
|
305
|
+
p.$slots.action ? (u(), f("div", en, [
|
|
306
|
+
q(p.$slots, "action", {}, void 0, !0)
|
|
307
|
+
])) : x("", !0)
|
|
308
308
|
], 6));
|
|
309
309
|
}
|
|
310
|
-
}),
|
|
311
|
-
|
|
312
|
-
const
|
|
313
|
-
function
|
|
314
|
-
return e.component(
|
|
310
|
+
}), Ze = /* @__PURE__ */ le(tn, [["__scopeId", "data-v-a7b95214"]]);
|
|
311
|
+
Ze.name = "rc-card";
|
|
312
|
+
const nn = "RcCard";
|
|
313
|
+
function mt(e) {
|
|
314
|
+
return e.component(Ze.name, Ze), e.component(nn, Ze), e;
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const an = {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "rc-toast__mask"
|
|
319
|
-
},
|
|
319
|
+
}, ln = { class: "rc-toast__content" }, on = {
|
|
320
320
|
key: 0,
|
|
321
321
|
class: "rc-toast__spinner"
|
|
322
|
-
},
|
|
322
|
+
}, rn = {
|
|
323
323
|
key: 1,
|
|
324
324
|
class: "rc-toast__icon rc-toast__icon--success"
|
|
325
|
-
},
|
|
325
|
+
}, sn = {
|
|
326
326
|
key: 2,
|
|
327
327
|
class: "rc-toast__icon rc-toast__icon--fail"
|
|
328
|
-
},
|
|
328
|
+
}, un = { class: "rc-toast__text" }, cn = /* @__PURE__ */ ae({
|
|
329
329
|
__name: "index",
|
|
330
330
|
props: {
|
|
331
331
|
message: { default: "" },
|
|
@@ -335,154 +335,154 @@ const qt = {
|
|
|
335
335
|
onAfterLeave: {}
|
|
336
336
|
},
|
|
337
337
|
setup(e, { expose: r }) {
|
|
338
|
-
const
|
|
339
|
-
let
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
function
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
return r({ close:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
}),
|
|
351
|
-
|
|
352
|
-
}), (p,
|
|
353
|
-
(u(),
|
|
354
|
-
|
|
338
|
+
const v = e, t = M(!0);
|
|
339
|
+
let y;
|
|
340
|
+
function _() {
|
|
341
|
+
y && (clearTimeout(y), y = null);
|
|
342
|
+
}
|
|
343
|
+
function g() {
|
|
344
|
+
_(), t.value = !1;
|
|
345
|
+
}
|
|
346
|
+
return r({ close: g }), nt(() => {
|
|
347
|
+
v.duration && v.duration > 0 && (y = setTimeout(() => {
|
|
348
|
+
g();
|
|
349
|
+
}, v.duration));
|
|
350
|
+
}), at(() => {
|
|
351
|
+
_();
|
|
352
|
+
}), (p, s) => (u(), f(ne, null, [
|
|
353
|
+
(u(), te(ut, { to: "body" }, [
|
|
354
|
+
K(Ee, {
|
|
355
355
|
name: "rc-toast-fade",
|
|
356
356
|
onAfterLeave: e.onAfterLeave
|
|
357
357
|
}, {
|
|
358
|
-
default:
|
|
359
|
-
|
|
358
|
+
default: Z(() => [
|
|
359
|
+
t.value ? (u(), f("div", {
|
|
360
360
|
key: 0,
|
|
361
|
-
class:
|
|
361
|
+
class: G(["rc-toast", [`rc-toast--${e.type}`]])
|
|
362
362
|
}, [
|
|
363
|
-
e.mask ? (u(),
|
|
364
|
-
|
|
365
|
-
e.type === "loading" ? (u(),
|
|
366
|
-
|
|
363
|
+
e.mask ? (u(), f("div", an)) : x("", !0),
|
|
364
|
+
$("div", ln, [
|
|
365
|
+
e.type === "loading" ? (u(), f("div", on)) : e.type === "success" ? (u(), f("div", rn)) : e.type === "fail" ? (u(), f("div", sn)) : x("", !0),
|
|
366
|
+
$("div", un, L(e.message), 1)
|
|
367
367
|
])
|
|
368
|
-
], 2)) :
|
|
368
|
+
], 2)) : x("", !0)
|
|
369
369
|
]),
|
|
370
370
|
_: 1
|
|
371
371
|
}, 8, ["onAfterLeave"])
|
|
372
372
|
])),
|
|
373
|
-
|
|
373
|
+
q(p.$slots, "default", {}, void 0, !0)
|
|
374
374
|
], 64));
|
|
375
375
|
}
|
|
376
|
-
}),
|
|
377
|
-
let
|
|
378
|
-
function
|
|
379
|
-
|
|
376
|
+
}), et = /* @__PURE__ */ le(cn, [["__scopeId", "data-v-d234c9c5"]]);
|
|
377
|
+
let Te = null, Ye = null;
|
|
378
|
+
function pt() {
|
|
379
|
+
Te && (Te.unmount(), Te = null), Ye && (document.body.removeChild(Ye), Ye = null);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Pa(e) {
|
|
382
382
|
const r = typeof e == "string" ? { message: e } : e || {};
|
|
383
|
-
|
|
384
|
-
const
|
|
383
|
+
pt(), Ye = document.createElement("div"), document.body.appendChild(Ye);
|
|
384
|
+
const v = {
|
|
385
385
|
message: r.message,
|
|
386
386
|
type: r.type ?? "text",
|
|
387
387
|
duration: r.duration ?? 2e3,
|
|
388
388
|
mask: r.mask ?? !1,
|
|
389
389
|
onAfterLeave: () => {
|
|
390
|
-
var
|
|
391
|
-
|
|
390
|
+
var t;
|
|
391
|
+
pt(), (t = r.onClose) == null || t.call(r);
|
|
392
392
|
}
|
|
393
393
|
};
|
|
394
|
-
return
|
|
395
|
-
close:
|
|
394
|
+
return Te = Et(et, v), Te.mount(Ye), {
|
|
395
|
+
close: dn
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
var e, r,
|
|
400
|
-
|
|
398
|
+
function dn() {
|
|
399
|
+
var e, r, v;
|
|
400
|
+
Te && ((v = (r = (e = Te._instance) == null ? void 0 : e.exposed) == null ? void 0 : r.close) == null || v.call(r));
|
|
401
401
|
}
|
|
402
|
-
|
|
403
|
-
function
|
|
404
|
-
return e.component(
|
|
402
|
+
et.name = "rc-toast";
|
|
403
|
+
function yt(e) {
|
|
404
|
+
return e.component(et.name, et), e;
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const fn = {
|
|
407
407
|
class: "rc-message",
|
|
408
408
|
role: "alert",
|
|
409
409
|
"aria-live": "polite"
|
|
410
|
-
},
|
|
410
|
+
}, vn = { class: "rc-message__content" }, mn = /* @__PURE__ */ ae({
|
|
411
411
|
__name: "index",
|
|
412
412
|
setup(e, { expose: r }) {
|
|
413
|
-
const
|
|
414
|
-
let
|
|
415
|
-
function
|
|
416
|
-
const p =
|
|
417
|
-
p >= 0 &&
|
|
418
|
-
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
|
-
return r({ add:
|
|
424
|
-
|
|
413
|
+
const v = Bt([]);
|
|
414
|
+
let t = 1;
|
|
415
|
+
function y(g) {
|
|
416
|
+
const p = v.findIndex((s) => s.id === g);
|
|
417
|
+
p >= 0 && v.splice(p, 1);
|
|
418
|
+
}
|
|
419
|
+
function _(g, p, s) {
|
|
420
|
+
const m = t++;
|
|
421
|
+
return v.push({ id: m, type: g, content: p, duration: s }), s > 0 && window.setTimeout(() => y(m), s), m;
|
|
422
|
+
}
|
|
423
|
+
return r({ add: _, remove: y }), (g, p) => (u(), f("div", fn, [
|
|
424
|
+
K(At, {
|
|
425
425
|
name: "rc-message-fade",
|
|
426
426
|
tag: "div"
|
|
427
427
|
}, {
|
|
428
|
-
default:
|
|
429
|
-
(u(!0),
|
|
430
|
-
key:
|
|
431
|
-
class:
|
|
428
|
+
default: Z(() => [
|
|
429
|
+
(u(!0), f(ne, null, ie(v, (s) => (u(), f("div", {
|
|
430
|
+
key: s.id,
|
|
431
|
+
class: G(["rc-message__item", `rc-message--${s.type}`])
|
|
432
432
|
}, [
|
|
433
|
-
|
|
433
|
+
$("span", vn, L(s.content), 1)
|
|
434
434
|
], 2))), 128))
|
|
435
435
|
]),
|
|
436
436
|
_: 1
|
|
437
437
|
})
|
|
438
438
|
]));
|
|
439
439
|
}
|
|
440
|
-
}),
|
|
441
|
-
let
|
|
442
|
-
function
|
|
440
|
+
}), pn = /* @__PURE__ */ le(mn, [["__scopeId", "data-v-87811df0"]]);
|
|
441
|
+
let Re = null, Me = null;
|
|
442
|
+
function yn() {
|
|
443
443
|
var r;
|
|
444
|
-
if (
|
|
445
|
-
|
|
446
|
-
const e =
|
|
447
|
-
|
|
444
|
+
if (Re && Me) return;
|
|
445
|
+
Re = document.createElement("div"), document.body.appendChild(Re);
|
|
446
|
+
const e = K(pn, {});
|
|
447
|
+
Ct(e, Re), Me = (r = e.component) == null ? void 0 : r.exposed;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
return (
|
|
449
|
+
function Ae(e, r, v) {
|
|
450
|
+
var y;
|
|
451
|
+
yn();
|
|
452
|
+
const t = typeof v == "number" ? v : e === "loading" ? 0 : 2e3;
|
|
453
|
+
return (y = Me == null ? void 0 : Me.add) == null ? void 0 : y.call(Me, e, r, t);
|
|
454
454
|
}
|
|
455
|
-
const
|
|
455
|
+
const hn = {
|
|
456
456
|
open(e) {
|
|
457
|
-
return
|
|
457
|
+
return Ae(e.type || "info", e.content, e.duration);
|
|
458
458
|
},
|
|
459
459
|
info(e, r) {
|
|
460
|
-
return
|
|
460
|
+
return Ae("info", e, r);
|
|
461
461
|
},
|
|
462
462
|
success(e, r) {
|
|
463
|
-
return
|
|
463
|
+
return Ae("success", e, r);
|
|
464
464
|
},
|
|
465
465
|
warning(e, r) {
|
|
466
|
-
return
|
|
466
|
+
return Ae("warning", e, r);
|
|
467
467
|
},
|
|
468
468
|
error(e, r) {
|
|
469
|
-
return
|
|
469
|
+
return Ae("error", e, r);
|
|
470
470
|
},
|
|
471
471
|
loading(e, r) {
|
|
472
|
-
return
|
|
472
|
+
return Ae("loading", e, r);
|
|
473
473
|
},
|
|
474
474
|
destroy() {
|
|
475
|
-
|
|
475
|
+
Re && (Ct(null, Re), Re.remove(), Re = null, Me = null);
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
function
|
|
479
|
-
return e.config.globalProperties.$message =
|
|
478
|
+
function ht(e) {
|
|
479
|
+
return e.config.globalProperties.$message = hn, e;
|
|
480
480
|
}
|
|
481
|
-
|
|
482
|
-
function
|
|
483
|
-
return e.component(
|
|
481
|
+
X.name = "rc-icon";
|
|
482
|
+
function gt(e) {
|
|
483
|
+
return e.component(X.name, X), e.component("RcIcon", X), e;
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const gn = { class: "rc-popup__content" }, _n = /* @__PURE__ */ ae({
|
|
486
486
|
name: "rc-popup",
|
|
487
487
|
__name: "index",
|
|
488
488
|
props: {
|
|
@@ -500,116 +500,116 @@ const ua = { class: "rc-popup__content" }, ia = /* @__PURE__ */ fe({
|
|
|
500
500
|
lockScroll: { type: Boolean, default: !0 }
|
|
501
501
|
},
|
|
502
502
|
emits: ["update:modelValue", "open", "close", "click-overlay"],
|
|
503
|
-
setup(e, { expose: r, emit:
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
() =>
|
|
503
|
+
setup(e, { expose: r, emit: v }) {
|
|
504
|
+
const t = e, y = v, _ = M(), g = M(t.modelValue);
|
|
505
|
+
De(
|
|
506
|
+
() => t.modelValue,
|
|
507
507
|
(c) => {
|
|
508
|
-
|
|
508
|
+
g.value = c, c ? (y("open"), t.lockScroll && E()) : (y("close"), t.lockScroll && D());
|
|
509
509
|
},
|
|
510
510
|
{ immediate: !0 }
|
|
511
|
-
),
|
|
512
|
-
c !==
|
|
511
|
+
), De(g, (c) => {
|
|
512
|
+
c !== t.modelValue && y("update:modelValue", c);
|
|
513
513
|
});
|
|
514
|
-
const p =
|
|
515
|
-
let
|
|
516
|
-
function
|
|
517
|
-
|
|
514
|
+
const p = T(() => `rc-popup-slide-${t.position}`), s = T(() => ({ ...t.popupStyle || {} }));
|
|
515
|
+
let m = !1;
|
|
516
|
+
function E() {
|
|
517
|
+
m || (m = !0, document.body.style.overflow = "hidden");
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
|
|
519
|
+
function D() {
|
|
520
|
+
m && (m = !1, document.body.style.overflow = "");
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
522
|
+
function k() {
|
|
523
|
+
y("click-overlay"), t.closeOnClickOverlay && F();
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
525
|
+
function R() {
|
|
526
|
+
F();
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
528
|
+
function F() {
|
|
529
|
+
g.value = !1;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
|
|
531
|
+
function C() {
|
|
532
|
+
g.value = !0;
|
|
533
533
|
}
|
|
534
|
-
return
|
|
535
|
-
|
|
534
|
+
return at(() => {
|
|
535
|
+
D();
|
|
536
536
|
}), r({
|
|
537
|
-
open:
|
|
538
|
-
close:
|
|
539
|
-
visible:
|
|
540
|
-
}), (c,
|
|
541
|
-
|
|
542
|
-
default:
|
|
543
|
-
|
|
537
|
+
open: C,
|
|
538
|
+
close: F,
|
|
539
|
+
visible: g
|
|
540
|
+
}), (c, ce) => (u(), te(ut, { to: "body" }, [
|
|
541
|
+
K(Ee, { name: "rc-popup-fade" }, {
|
|
542
|
+
default: Z(() => [
|
|
543
|
+
g.value && t.overlay ? (u(), f("div", {
|
|
544
544
|
key: 0,
|
|
545
|
-
class:
|
|
546
|
-
style:
|
|
547
|
-
onClick:
|
|
548
|
-
}, null, 6)) :
|
|
545
|
+
class: G(["rc-popup__overlay", { "rc-popup__overlay--transparent": t.overlayClass === "transparent" }]),
|
|
546
|
+
style: ee(t.overlayStyle),
|
|
547
|
+
onClick: k
|
|
548
|
+
}, null, 6)) : x("", !0)
|
|
549
549
|
]),
|
|
550
550
|
_: 1
|
|
551
551
|
}),
|
|
552
|
-
|
|
553
|
-
default:
|
|
554
|
-
|
|
552
|
+
K(Ee, { name: p.value }, {
|
|
553
|
+
default: Z(() => [
|
|
554
|
+
g.value ? (u(), f("div", {
|
|
555
555
|
key: 0,
|
|
556
556
|
ref_key: "popupRef",
|
|
557
|
-
ref:
|
|
558
|
-
class:
|
|
557
|
+
ref: _,
|
|
558
|
+
class: G(["rc-popup", [
|
|
559
559
|
`rc-popup--${e.position}`,
|
|
560
560
|
{ "rc-popup--round": e.round }
|
|
561
561
|
]]),
|
|
562
|
-
style:
|
|
563
|
-
onClick:
|
|
562
|
+
style: ee(s.value),
|
|
563
|
+
onClick: ce[0] || (ce[0] = He(() => {
|
|
564
564
|
}, ["stop"]))
|
|
565
565
|
}, [
|
|
566
|
-
e.closeable ? (u(),
|
|
566
|
+
e.closeable ? (u(), f("div", {
|
|
567
567
|
key: 0,
|
|
568
|
-
class:
|
|
569
|
-
onClick:
|
|
568
|
+
class: G(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
|
|
569
|
+
onClick: R
|
|
570
570
|
}, [
|
|
571
|
-
|
|
571
|
+
K(X, {
|
|
572
572
|
name: e.closeIcon,
|
|
573
573
|
class: "rc-popup__close-icon"
|
|
574
574
|
}, null, 8, ["name"])
|
|
575
|
-
], 2)) :
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
], 2)) : x("", !0),
|
|
576
|
+
$("div", gn, [
|
|
577
|
+
q(c.$slots, "default", {}, void 0, !0)
|
|
578
578
|
])
|
|
579
|
-
], 6)) :
|
|
579
|
+
], 6)) : x("", !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
|
+
}), Ne = /* @__PURE__ */ le(_n, [["__scopeId", "data-v-f1696784"]]);
|
|
586
|
+
Ne.name = "rc-popup";
|
|
587
|
+
const kn = "RcPopup";
|
|
588
|
+
function _t(e) {
|
|
589
|
+
return e.component(Ne.name, Ne), e.component(kn, Ne), e;
|
|
590
590
|
}
|
|
591
|
-
const
|
|
591
|
+
const bn = {
|
|
592
592
|
key: 0,
|
|
593
593
|
class: "rc-calendar__header"
|
|
594
|
-
},
|
|
594
|
+
}, wn = { class: "rc-calendar__header-title" }, $n = {
|
|
595
595
|
key: 1,
|
|
596
596
|
class: "rc-calendar__shortcuts"
|
|
597
|
-
},
|
|
597
|
+
}, xn = { class: "rc-calendar__shortcuts-scroll" }, Dn = ["onClick"], Cn = { class: "rc-calendar__month-title" }, Sn = { class: "rc-calendar__weekdays" }, In = { class: "rc-calendar__days" }, Mn = ["onClick"], Rn = { class: "rc-calendar__day-content" }, Vn = { class: "rc-calendar__day-text" }, Tn = {
|
|
598
598
|
key: 0,
|
|
599
599
|
class: "rc-calendar__day-bottom"
|
|
600
|
-
},
|
|
600
|
+
}, En = {
|
|
601
601
|
key: 2,
|
|
602
602
|
class: "rc-calendar__footer"
|
|
603
|
-
},
|
|
603
|
+
}, Bn = {
|
|
604
604
|
key: 0,
|
|
605
605
|
class: "rc-calendar__month-picker-overlay"
|
|
606
|
-
},
|
|
606
|
+
}, An = { class: "rc-calendar__month-picker" }, Fn = { class: "rc-calendar__month-picker-header" }, Yn = { class: "rc-calendar__month-picker-title" }, zn = { key: 0 }, Ln = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "rc-calendar__year-picker-content"
|
|
609
|
-
},
|
|
609
|
+
}, Pn = { class: "rc-calendar__year-picker-grid" }, Nn = ["onClick"], Wn = {
|
|
610
610
|
key: 1,
|
|
611
611
|
class: "rc-calendar__month-picker-content"
|
|
612
|
-
},
|
|
612
|
+
}, Hn = ["onClick"], Xe = 48, ue = 3, lt = 7, On = /* @__PURE__ */ ae({
|
|
613
613
|
__name: "panel-content",
|
|
614
614
|
props: {
|
|
615
615
|
showTitle: { type: Boolean },
|
|
@@ -626,244 +626,244 @@ const fa = {
|
|
|
626
626
|
maxRangeDays: {}
|
|
627
627
|
},
|
|
628
628
|
emits: ["select-day", "clear", "confirm", "shortcut-select"],
|
|
629
|
-
setup(e, { expose: r, emit:
|
|
630
|
-
const
|
|
631
|
-
function
|
|
632
|
-
if (!
|
|
633
|
-
const
|
|
634
|
-
return isNaN(
|
|
635
|
-
}
|
|
636
|
-
function p(
|
|
637
|
-
const
|
|
638
|
-
return `${
|
|
639
|
-
}
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
() => [
|
|
629
|
+
setup(e, { expose: r, emit: v }) {
|
|
630
|
+
const t = e, y = v, _ = ["日", "一", "二", "三", "四", "五", "六"];
|
|
631
|
+
function g(a) {
|
|
632
|
+
if (!a) return null;
|
|
633
|
+
const i = new Date(a);
|
|
634
|
+
return isNaN(i.getTime()) ? null : i;
|
|
635
|
+
}
|
|
636
|
+
function p(a) {
|
|
637
|
+
const i = a.getFullYear(), h = String(a.getMonth() + 1).padStart(2, "0"), A = String(a.getDate()).padStart(2, "0");
|
|
638
|
+
return `${i}-${h}-${A}`;
|
|
639
|
+
}
|
|
640
|
+
const s = M(/* @__PURE__ */ new Date());
|
|
641
|
+
De(
|
|
642
|
+
() => [t.selectedDate, t.rangeStart],
|
|
643
643
|
() => {
|
|
644
|
-
if (
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
} else if (!
|
|
648
|
-
const
|
|
649
|
-
|
|
644
|
+
if (t.range && t.rangeStart) {
|
|
645
|
+
const a = g(t.rangeStart);
|
|
646
|
+
a && (s.value = a);
|
|
647
|
+
} else if (!t.range && t.selectedDate) {
|
|
648
|
+
const a = g(t.selectedDate);
|
|
649
|
+
a && (s.value = a);
|
|
650
650
|
}
|
|
651
651
|
},
|
|
652
652
|
{ immediate: !0 }
|
|
653
653
|
);
|
|
654
|
-
function
|
|
655
|
-
const
|
|
656
|
-
return
|
|
654
|
+
function m(a) {
|
|
655
|
+
const i = /* @__PURE__ */ new Date();
|
|
656
|
+
return a.getFullYear() === i.getFullYear() && a.getMonth() === i.getMonth() && a.getDate() === i.getDate();
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
if (!
|
|
660
|
-
const
|
|
661
|
-
return
|
|
658
|
+
function E(a) {
|
|
659
|
+
if (!t.rangeStart || !t.rangeEnd) return !1;
|
|
660
|
+
const i = p(a), h = t.rangeStart, A = t.rangeEnd;
|
|
661
|
+
return i > h && i < A;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
if (
|
|
663
|
+
function D(a) {
|
|
664
|
+
if (t.disabledDate && t.disabledDate(a))
|
|
665
665
|
return !0;
|
|
666
|
-
const
|
|
667
|
-
return !!(
|
|
668
|
-
}
|
|
669
|
-
function
|
|
670
|
-
const
|
|
671
|
-
for (let
|
|
672
|
-
const
|
|
673
|
-
date: new Date(
|
|
666
|
+
const i = p(a);
|
|
667
|
+
return !!(t.minDate && i < t.minDate || t.maxDate && i > t.maxDate);
|
|
668
|
+
}
|
|
669
|
+
function k(a, i) {
|
|
670
|
+
const h = new Date(a, i, 1), A = new Date(a, i + 1, 0), P = h.getDay(), he = A.getDate(), ge = [], ct = new Date(a, i, 0).getDate();
|
|
671
|
+
for (let oe = P - 1; oe >= 0; oe--) {
|
|
672
|
+
const re = {
|
|
673
|
+
date: new Date(a, i - 1, ct - oe),
|
|
674
674
|
type: "prev-month",
|
|
675
|
-
text: String(
|
|
675
|
+
text: String(ct - oe)
|
|
676
676
|
};
|
|
677
|
-
if (
|
|
678
|
-
const
|
|
679
|
-
|
|
677
|
+
if (t.formatter) {
|
|
678
|
+
const se = t.formatter(re);
|
|
679
|
+
se.text && (re.text = se.text), se.bottomInfo && (re.bottomInfo = se.bottomInfo);
|
|
680
680
|
}
|
|
681
|
-
|
|
681
|
+
ge.push(re);
|
|
682
682
|
}
|
|
683
|
-
for (let
|
|
684
|
-
const
|
|
685
|
-
date: new Date(
|
|
683
|
+
for (let oe = 1; oe <= he; oe++) {
|
|
684
|
+
const re = {
|
|
685
|
+
date: new Date(a, i, oe),
|
|
686
686
|
type: "current-month",
|
|
687
|
-
text: String(
|
|
687
|
+
text: String(oe)
|
|
688
688
|
};
|
|
689
|
-
if (
|
|
690
|
-
const
|
|
691
|
-
|
|
689
|
+
if (t.formatter) {
|
|
690
|
+
const se = t.formatter(re);
|
|
691
|
+
se.text && (re.text = se.text), se.bottomInfo && (re.bottomInfo = se.bottomInfo);
|
|
692
692
|
}
|
|
693
|
-
|
|
693
|
+
ge.push(re);
|
|
694
694
|
}
|
|
695
|
-
const
|
|
696
|
-
for (let
|
|
697
|
-
const
|
|
698
|
-
date: new Date(
|
|
695
|
+
const Vt = 42 - ge.length;
|
|
696
|
+
for (let oe = 1; oe <= Vt; oe++) {
|
|
697
|
+
const re = {
|
|
698
|
+
date: new Date(a, i + 1, oe),
|
|
699
699
|
type: "next-month",
|
|
700
|
-
text: String(
|
|
700
|
+
text: String(oe)
|
|
701
701
|
};
|
|
702
|
-
if (
|
|
703
|
-
const
|
|
704
|
-
|
|
702
|
+
if (t.formatter) {
|
|
703
|
+
const se = t.formatter(re);
|
|
704
|
+
se.text && (re.text = se.text), se.bottomInfo && (re.bottomInfo = se.bottomInfo);
|
|
705
705
|
}
|
|
706
|
-
|
|
706
|
+
ge.push(re);
|
|
707
707
|
}
|
|
708
|
-
return
|
|
709
|
-
}
|
|
710
|
-
const
|
|
711
|
-
const
|
|
712
|
-
return
|
|
713
|
-
}),
|
|
714
|
-
const
|
|
715
|
-
return `${
|
|
708
|
+
return ge;
|
|
709
|
+
}
|
|
710
|
+
const R = T(() => {
|
|
711
|
+
const a = s.value.getFullYear(), i = s.value.getMonth();
|
|
712
|
+
return k(a, i);
|
|
713
|
+
}), F = T(() => {
|
|
714
|
+
const a = s.value.getFullYear(), i = s.value.getMonth() + 1;
|
|
715
|
+
return `${a}年${i}月`;
|
|
716
716
|
});
|
|
717
|
-
function
|
|
718
|
-
const
|
|
719
|
-
if (
|
|
720
|
-
return
|
|
721
|
-
const
|
|
722
|
-
return
|
|
723
|
-
}
|
|
724
|
-
const c =
|
|
725
|
-
function
|
|
726
|
-
if (!
|
|
717
|
+
function C(a) {
|
|
718
|
+
const i = [];
|
|
719
|
+
if (a.type !== "current-month" && i.push("is-other-month"), m(a.date) && i.push("is-today"), D(a.date))
|
|
720
|
+
return i.push("is-disabled"), i;
|
|
721
|
+
const h = p(a.date);
|
|
722
|
+
return t.range ? (t.rangeStart === h && i.push("is-start"), t.rangeEnd === h && i.push("is-end"), E(a.date) && i.push("is-in-range")) : t.selectedDate === h && i.push("is-selected"), i;
|
|
723
|
+
}
|
|
724
|
+
const c = T(() => !!(t.rangeStart && t.rangeEnd)), ce = T(() => t.rangeStart && t.rangeEnd ? 2 : t.rangeStart || t.rangeEnd ? 1 : 0);
|
|
725
|
+
function pe(a) {
|
|
726
|
+
if (!t.minDate && !t.maxDate)
|
|
727
727
|
return !1;
|
|
728
|
-
const
|
|
729
|
-
return !!(
|
|
730
|
-
}
|
|
731
|
-
function
|
|
732
|
-
const
|
|
733
|
-
if (
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
728
|
+
const i = t.minDate ? g(t.minDate) : null, h = t.maxDate ? g(t.maxDate) : null;
|
|
729
|
+
return !!(i && a < i.getFullYear() || h && a > h.getFullYear());
|
|
730
|
+
}
|
|
731
|
+
function ye(a, i) {
|
|
732
|
+
const h = t.minDate ? g(t.minDate) : null, A = t.maxDate ? g(t.maxDate) : null;
|
|
733
|
+
if (h) {
|
|
734
|
+
const P = h.getFullYear(), he = h.getMonth() + 1;
|
|
735
|
+
if (a < P || a === P && i < he)
|
|
736
736
|
return !0;
|
|
737
737
|
}
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
738
|
+
if (A) {
|
|
739
|
+
const P = A.getFullYear(), he = A.getMonth() + 1;
|
|
740
|
+
if (a > P || a === P && i > he)
|
|
741
741
|
return !0;
|
|
742
742
|
}
|
|
743
743
|
return !1;
|
|
744
744
|
}
|
|
745
|
-
const
|
|
746
|
-
const
|
|
747
|
-
for (let
|
|
748
|
-
|
|
749
|
-
return
|
|
745
|
+
const H = M(!1), N = M("year"), O = M(s.value.getFullYear()), Y = M(s.value.getMonth() + 1), W = M(), S = M(1900), V = M(1920), I = M(1900), z = M(2100), de = T(() => {
|
|
746
|
+
const a = [], h = Math.floor((S.value - I.value) / ue) - 3, A = Math.ceil((V.value - I.value) / ue) + 3, P = I.value + Math.max(0, h) * ue, he = I.value + A * ue - 1;
|
|
747
|
+
for (let ge = P; ge <= he; ge++)
|
|
748
|
+
a.push(ge);
|
|
749
|
+
return a;
|
|
750
750
|
});
|
|
751
|
-
|
|
752
|
-
|
|
751
|
+
De(() => s.value, (a) => {
|
|
752
|
+
O.value = a.getFullYear(), Y.value = a.getMonth() + 1;
|
|
753
753
|
}, { immediate: !0 });
|
|
754
|
-
function
|
|
755
|
-
if (!
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
function
|
|
760
|
-
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
if (
|
|
764
|
-
const
|
|
765
|
-
|
|
754
|
+
function ke() {
|
|
755
|
+
if (!W.value) return;
|
|
756
|
+
const a = W.value.scrollTop, h = Math.max(0, Math.floor(a / Xe)), A = I.value + h * ue, P = A + lt * ue - 1;
|
|
757
|
+
A < I.value ? I.value = A - 100 : P > z.value && (z.value = P + 100), (A !== S.value || P !== V.value) && (S.value = A, V.value = P);
|
|
758
|
+
}
|
|
759
|
+
function be() {
|
|
760
|
+
O.value = s.value.getFullYear(), Y.value = s.value.getMonth() + 1, N.value = "year", H.value = !0;
|
|
761
|
+
const a = O.value;
|
|
762
|
+
a < I.value ? I.value = Math.floor(a / 100) * 100 : a > z.value && (z.value = Math.ceil(a / 100) * 100 + 99), Be(() => {
|
|
763
|
+
if (W.value) {
|
|
764
|
+
const i = Math.floor((a - I.value) / ue), h = Math.max(0, i - 2);
|
|
765
|
+
S.value = I.value + h * ue, V.value = S.value + lt * ue - 1, Ce(a);
|
|
766
766
|
}
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
if (!
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
769
|
+
function Ce(a) {
|
|
770
|
+
if (!W.value) return;
|
|
771
|
+
a < I.value ? I.value = Math.floor(a / 100) * 100 : a > z.value && (z.value = Math.ceil(a / 100) * 100 + 99);
|
|
772
|
+
const i = Math.floor((a - I.value) / ue), h = i * Xe;
|
|
773
|
+
W.value.scrollTop = h;
|
|
774
|
+
const A = Math.max(0, i - 2);
|
|
775
|
+
S.value = I.value + A * ue, V.value = S.value + lt * ue - 1;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const
|
|
779
|
-
|
|
777
|
+
function b() {
|
|
778
|
+
const a = new Date(s.value);
|
|
779
|
+
a.setMonth(a.getMonth() - 1), s.value = a;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
const
|
|
783
|
-
|
|
781
|
+
function o() {
|
|
782
|
+
const a = new Date(s.value);
|
|
783
|
+
a.setMonth(a.getMonth() + 1), s.value = a;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
786
|
-
|
|
785
|
+
function B(a) {
|
|
786
|
+
pe(a) || (O.value = a, N.value = "month");
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
|
|
788
|
+
function j(a) {
|
|
789
|
+
ye(O.value, a) || (Y.value = a, fe());
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
const
|
|
793
|
-
|
|
791
|
+
function fe() {
|
|
792
|
+
const a = new Date(s.value);
|
|
793
|
+
a.setFullYear(O.value), a.setMonth(Y.value - 1), s.value = a, H.value = !1, N.value = "year";
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
795
|
+
function ve(a) {
|
|
796
|
+
y("select-day", a);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
|
|
798
|
+
function $e() {
|
|
799
|
+
y("clear");
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
801
|
+
function n() {
|
|
802
|
+
me.value && $e();
|
|
803
803
|
}
|
|
804
804
|
function l() {
|
|
805
|
-
|
|
805
|
+
y("confirm");
|
|
806
806
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
807
|
+
function d() {
|
|
808
|
+
H.value = !1;
|
|
809
809
|
}
|
|
810
|
-
function
|
|
811
|
-
N.value =
|
|
810
|
+
function w(a) {
|
|
811
|
+
N.value = a;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
|
|
813
|
+
function J() {
|
|
814
|
+
const i = (/* @__PURE__ */ new Date()).getFullYear();
|
|
815
|
+
pe(i) || (O.value = i, N.value = "month");
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
const
|
|
819
|
-
|
|
817
|
+
function U() {
|
|
818
|
+
const i = (/* @__PURE__ */ new Date()).getMonth() + 1;
|
|
819
|
+
ye(O.value, i) || (Y.value = i, fe());
|
|
820
820
|
}
|
|
821
|
-
const
|
|
822
|
-
function
|
|
823
|
-
const
|
|
824
|
-
if (!
|
|
825
|
-
const
|
|
826
|
-
return Math.ceil(
|
|
821
|
+
const me = T(() => t.range ? !!(t.rangeStart || t.rangeEnd) : !!t.selectedDate);
|
|
822
|
+
function Se(a, i) {
|
|
823
|
+
const h = g(a), A = g(i);
|
|
824
|
+
if (!h || !A) return 0;
|
|
825
|
+
const P = Math.abs(A.getTime() - h.getTime());
|
|
826
|
+
return Math.ceil(P / (1e3 * 60 * 60 * 24)) + 1;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function xe() {
|
|
829
829
|
return p(/* @__PURE__ */ new Date());
|
|
830
830
|
}
|
|
831
|
-
function Be() {
|
|
832
|
-
const t = /* @__PURE__ */ new Date(), o = t.getDay(), d = t.getDate() - o + (o === 0 ? -6 : 1);
|
|
833
|
-
return new Date(t.getFullYear(), t.getMonth(), d);
|
|
834
|
-
}
|
|
835
|
-
function Oe() {
|
|
836
|
-
const t = Be(), o = new Date(t);
|
|
837
|
-
return o.setDate(t.getDate() + 6), o;
|
|
838
|
-
}
|
|
839
831
|
function ze() {
|
|
840
|
-
const
|
|
841
|
-
return new Date(
|
|
832
|
+
const a = /* @__PURE__ */ new Date(), i = a.getDay(), h = a.getDate() - i + (i === 0 ? -6 : 1);
|
|
833
|
+
return new Date(a.getFullYear(), a.getMonth(), h);
|
|
842
834
|
}
|
|
843
|
-
function
|
|
844
|
-
const
|
|
845
|
-
return
|
|
835
|
+
function Oe() {
|
|
836
|
+
const a = ze(), i = new Date(a);
|
|
837
|
+
return i.setDate(a.getDate() + 6), i;
|
|
846
838
|
}
|
|
847
839
|
function Ue() {
|
|
848
|
-
const
|
|
849
|
-
return new Date(
|
|
840
|
+
const a = /* @__PURE__ */ new Date();
|
|
841
|
+
return new Date(a.getFullYear(), a.getMonth(), 1);
|
|
850
842
|
}
|
|
851
|
-
function
|
|
852
|
-
const
|
|
853
|
-
return new Date(
|
|
843
|
+
function Le() {
|
|
844
|
+
const a = /* @__PURE__ */ new Date();
|
|
845
|
+
return new Date(a.getFullYear(), a.getMonth() + 1, 0);
|
|
854
846
|
}
|
|
855
847
|
function Ke() {
|
|
856
|
-
const
|
|
857
|
-
return new Date(
|
|
848
|
+
const a = /* @__PURE__ */ new Date();
|
|
849
|
+
return new Date(a.getFullYear(), a.getMonth() - 2, 1);
|
|
850
|
+
}
|
|
851
|
+
function je() {
|
|
852
|
+
const a = /* @__PURE__ */ new Date();
|
|
853
|
+
return new Date(a.getFullYear(), 0, 1);
|
|
858
854
|
}
|
|
859
|
-
|
|
855
|
+
function Ge() {
|
|
856
|
+
const a = /* @__PURE__ */ new Date();
|
|
857
|
+
return new Date(a.getFullYear(), 11, 31);
|
|
858
|
+
}
|
|
859
|
+
const qe = [
|
|
860
860
|
{
|
|
861
861
|
key: "today",
|
|
862
862
|
label: "本日",
|
|
863
863
|
days: 1,
|
|
864
864
|
getRange: () => {
|
|
865
|
-
const
|
|
866
|
-
return [
|
|
865
|
+
const a = xe();
|
|
866
|
+
return [a, a];
|
|
867
867
|
}
|
|
868
868
|
},
|
|
869
869
|
{
|
|
@@ -871,32 +871,32 @@ const fa = {
|
|
|
871
871
|
label: "本周",
|
|
872
872
|
days: 7,
|
|
873
873
|
getRange: () => {
|
|
874
|
-
const
|
|
875
|
-
return [
|
|
874
|
+
const a = p(ze()), i = p(Oe());
|
|
875
|
+
return [a, i];
|
|
876
876
|
}
|
|
877
877
|
},
|
|
878
878
|
{
|
|
879
879
|
key: "month",
|
|
880
880
|
label: "本月",
|
|
881
881
|
getRange: () => {
|
|
882
|
-
const
|
|
883
|
-
return [
|
|
882
|
+
const a = p(Ue()), i = p(Le());
|
|
883
|
+
return [a, i];
|
|
884
884
|
}
|
|
885
885
|
},
|
|
886
886
|
{
|
|
887
887
|
key: "threeMonths",
|
|
888
888
|
label: "近三月",
|
|
889
889
|
getRange: () => {
|
|
890
|
-
const
|
|
891
|
-
return [
|
|
890
|
+
const a = p(Ke()), i = p(Le());
|
|
891
|
+
return [a, i];
|
|
892
892
|
}
|
|
893
893
|
},
|
|
894
894
|
{
|
|
895
895
|
key: "year",
|
|
896
896
|
label: "本年",
|
|
897
897
|
getRange: () => {
|
|
898
|
-
const
|
|
899
|
-
return [
|
|
898
|
+
const a = p(je()), i = p(Ge());
|
|
899
|
+
return [a, i];
|
|
900
900
|
}
|
|
901
901
|
},
|
|
902
902
|
{
|
|
@@ -904,8 +904,8 @@ const fa = {
|
|
|
904
904
|
label: "近7天",
|
|
905
905
|
days: 7,
|
|
906
906
|
getRange: () => {
|
|
907
|
-
const
|
|
908
|
-
return
|
|
907
|
+
const a = /* @__PURE__ */ new Date(), i = new Date(a);
|
|
908
|
+
return i.setDate(a.getDate() - 6), [p(i), xe()];
|
|
909
909
|
}
|
|
910
910
|
},
|
|
911
911
|
{
|
|
@@ -913,213 +913,213 @@ const fa = {
|
|
|
913
913
|
label: "近30天",
|
|
914
914
|
days: 30,
|
|
915
915
|
getRange: () => {
|
|
916
|
-
const
|
|
917
|
-
return
|
|
916
|
+
const a = /* @__PURE__ */ new Date(), i = new Date(a);
|
|
917
|
+
return i.setDate(a.getDate() - 29), [p(i), xe()];
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
],
|
|
921
|
-
if (
|
|
922
|
-
if (
|
|
923
|
-
return
|
|
920
|
+
], Je = T(() => qe.filter((a) => {
|
|
921
|
+
if (t.maxRangeDays !== void 0) {
|
|
922
|
+
if (a.days !== void 0)
|
|
923
|
+
return a.days <= t.maxRangeDays;
|
|
924
924
|
{
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
927
|
-
return
|
|
925
|
+
const i = a.getRange();
|
|
926
|
+
if (i)
|
|
927
|
+
return Se(i[0], i[1]) <= t.maxRangeDays;
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
930
|
return !0;
|
|
931
931
|
}));
|
|
932
|
-
function
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
935
|
-
if (
|
|
932
|
+
function Qe(a) {
|
|
933
|
+
const i = a.getRange();
|
|
934
|
+
if (i) {
|
|
935
|
+
if (t.minDate && i[0] < t.minDate || t.maxDate && i[1] > t.maxDate)
|
|
936
936
|
return;
|
|
937
|
-
|
|
937
|
+
y("shortcut-select", i);
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
return r({
|
|
941
|
-
yearScrollRef:
|
|
942
|
-
}), (
|
|
943
|
-
e.showTitle ? (u(),
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
class:
|
|
947
|
-
onClick:
|
|
941
|
+
yearScrollRef: W
|
|
942
|
+
}), (a, i) => (u(), f("div", null, [
|
|
943
|
+
e.showTitle ? (u(), f("div", bn, [
|
|
944
|
+
$("div", wn, L(e.title), 1),
|
|
945
|
+
$("span", {
|
|
946
|
+
class: G(["rc-calendar__header-clear", { "is-disabled": !me.value }]),
|
|
947
|
+
onClick: n
|
|
948
948
|
}, " 清空 ", 2)
|
|
949
|
-
])) :
|
|
950
|
-
e.range ? (u(),
|
|
951
|
-
|
|
952
|
-
(u(!0),
|
|
953
|
-
key:
|
|
949
|
+
])) : x("", !0),
|
|
950
|
+
e.range ? (u(), f("div", $n, [
|
|
951
|
+
$("div", xn, [
|
|
952
|
+
(u(!0), f(ne, null, ie(Je.value, (h) => (u(), f("div", {
|
|
953
|
+
key: h.key,
|
|
954
954
|
class: "rc-calendar__shortcut-item",
|
|
955
|
-
onClick: (
|
|
956
|
-
},
|
|
955
|
+
onClick: (A) => Qe(h)
|
|
956
|
+
}, L(h.label), 9, Dn))), 128))
|
|
957
957
|
])
|
|
958
|
-
])) :
|
|
959
|
-
|
|
960
|
-
|
|
958
|
+
])) : x("", !0),
|
|
959
|
+
$("div", Cn, [
|
|
960
|
+
$("div", {
|
|
961
961
|
class: "rc-calendar__nav-button",
|
|
962
|
-
onClick:
|
|
962
|
+
onClick: b
|
|
963
963
|
}, [
|
|
964
|
-
|
|
964
|
+
K(Q(X), {
|
|
965
965
|
name: "icon_caret-left",
|
|
966
966
|
class: "rc-calendar__nav-icon"
|
|
967
967
|
})
|
|
968
968
|
]),
|
|
969
|
-
|
|
969
|
+
$("div", {
|
|
970
970
|
class: "rc-calendar__month-text",
|
|
971
|
-
onClick:
|
|
972
|
-
}, F
|
|
973
|
-
|
|
971
|
+
onClick: be
|
|
972
|
+
}, L(F.value), 1),
|
|
973
|
+
$("div", {
|
|
974
974
|
class: "rc-calendar__nav-button",
|
|
975
|
-
onClick:
|
|
975
|
+
onClick: o
|
|
976
976
|
}, [
|
|
977
|
-
|
|
977
|
+
K(Q(X), {
|
|
978
978
|
name: "icon_caret-right",
|
|
979
979
|
class: "rc-calendar__nav-icon"
|
|
980
980
|
})
|
|
981
981
|
])
|
|
982
982
|
]),
|
|
983
|
-
|
|
984
|
-
(u(),
|
|
985
|
-
key:
|
|
983
|
+
$("div", Sn, [
|
|
984
|
+
(u(), f(ne, null, ie(_, (h) => $("div", {
|
|
985
|
+
key: h,
|
|
986
986
|
class: "rc-calendar__weekday"
|
|
987
|
-
},
|
|
987
|
+
}, L(h), 1)), 64))
|
|
988
988
|
]),
|
|
989
|
-
|
|
990
|
-
(u(!0),
|
|
991
|
-
key:
|
|
992
|
-
class:
|
|
993
|
-
onClick: (
|
|
989
|
+
$("div", In, [
|
|
990
|
+
(u(!0), f(ne, null, ie(R.value, (h, A) => (u(), f("div", {
|
|
991
|
+
key: A,
|
|
992
|
+
class: G(["rc-calendar__day", C(h)]),
|
|
993
|
+
onClick: (P) => ve(h)
|
|
994
994
|
}, [
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
995
|
+
$("div", Rn, [
|
|
996
|
+
$("span", Vn, L(h.text), 1),
|
|
997
|
+
h.bottomInfo ? (u(), f("span", Tn, L(h.bottomInfo), 1)) : x("", !0)
|
|
998
998
|
])
|
|
999
|
-
], 10,
|
|
999
|
+
], 10, Mn))), 128))
|
|
1000
1000
|
]),
|
|
1001
|
-
e.range && e.showFooter ? (u(),
|
|
1002
|
-
|
|
1001
|
+
e.range && e.showFooter ? (u(), f("div", En, [
|
|
1002
|
+
K(Q(we), {
|
|
1003
1003
|
type: "default",
|
|
1004
1004
|
class: "rc-calendar__footer-reset",
|
|
1005
|
-
onClick:
|
|
1005
|
+
onClick: $e
|
|
1006
1006
|
}, {
|
|
1007
|
-
default:
|
|
1008
|
-
|
|
1007
|
+
default: Z(() => [...i[2] || (i[2] = [
|
|
1008
|
+
_e("取消", -1)
|
|
1009
1009
|
])]),
|
|
1010
1010
|
_: 1
|
|
1011
1011
|
}),
|
|
1012
|
-
|
|
1012
|
+
K(Q(we), {
|
|
1013
1013
|
type: "primary",
|
|
1014
1014
|
class: "rc-calendar__footer-confirm",
|
|
1015
1015
|
disabled: !c.value,
|
|
1016
1016
|
onClick: l
|
|
1017
1017
|
}, {
|
|
1018
|
-
default:
|
|
1019
|
-
|
|
1018
|
+
default: Z(() => [
|
|
1019
|
+
_e(L(c.value ? `确定(${ce.value}项)` : "确定"), 1)
|
|
1020
1020
|
]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}, 8, ["disabled"])
|
|
1023
|
-
])) :
|
|
1024
|
-
|
|
1025
|
-
default:
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1023
|
+
])) : x("", !0),
|
|
1024
|
+
K(Ee, { name: "rc-calendar-fade" }, {
|
|
1025
|
+
default: Z(() => [
|
|
1026
|
+
H.value ? (u(), f("div", Bn, [
|
|
1027
|
+
$("div", An, [
|
|
1028
|
+
$("div", Fn, [
|
|
1029
|
+
K(Q(we), {
|
|
1030
1030
|
type: "default",
|
|
1031
1031
|
mode: "text",
|
|
1032
1032
|
size: "small",
|
|
1033
|
-
onClick:
|
|
1033
|
+
onClick: d
|
|
1034
1034
|
}, {
|
|
1035
|
-
default:
|
|
1036
|
-
|
|
1035
|
+
default: Z(() => [...i[3] || (i[3] = [
|
|
1036
|
+
_e("取消", -1)
|
|
1037
1037
|
])]),
|
|
1038
1038
|
_: 1
|
|
1039
1039
|
}),
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
onClick:
|
|
1043
|
-
},
|
|
1044
|
-
N.value === "month" ? (u(),
|
|
1045
|
-
N.value === "month" ? (u(),
|
|
1040
|
+
$("div", Yn, [
|
|
1041
|
+
$("span", {
|
|
1042
|
+
onClick: i[0] || (i[0] = (h) => w("year"))
|
|
1043
|
+
}, L(O.value) + "年", 1),
|
|
1044
|
+
N.value === "month" ? (u(), f("span", zn, " - ")) : x("", !0),
|
|
1045
|
+
N.value === "month" ? (u(), f("span", {
|
|
1046
1046
|
key: 1,
|
|
1047
|
-
onClick:
|
|
1048
|
-
},
|
|
1047
|
+
onClick: i[1] || (i[1] = (h) => w("month"))
|
|
1048
|
+
}, L(Y.value) + "月", 1)) : x("", !0)
|
|
1049
1049
|
]),
|
|
1050
|
-
N.value === "year" ? (u(),
|
|
1050
|
+
N.value === "year" ? (u(), te(Q(we), {
|
|
1051
1051
|
key: 0,
|
|
1052
1052
|
type: "primary",
|
|
1053
1053
|
mode: "text",
|
|
1054
1054
|
size: "small",
|
|
1055
|
-
onClick:
|
|
1055
|
+
onClick: J
|
|
1056
1056
|
}, {
|
|
1057
|
-
default:
|
|
1058
|
-
|
|
1057
|
+
default: Z(() => [...i[4] || (i[4] = [
|
|
1058
|
+
_e(" 本年 ", -1)
|
|
1059
1059
|
])]),
|
|
1060
1060
|
_: 1
|
|
1061
|
-
})) :
|
|
1062
|
-
N.value === "month" ? (u(),
|
|
1061
|
+
})) : x("", !0),
|
|
1062
|
+
N.value === "month" ? (u(), te(Q(we), {
|
|
1063
1063
|
key: 1,
|
|
1064
1064
|
type: "primary",
|
|
1065
1065
|
mode: "text",
|
|
1066
1066
|
size: "small",
|
|
1067
|
-
onClick:
|
|
1067
|
+
onClick: U
|
|
1068
1068
|
}, {
|
|
1069
|
-
default:
|
|
1070
|
-
|
|
1069
|
+
default: Z(() => [...i[5] || (i[5] = [
|
|
1070
|
+
_e(" 本月 ", -1)
|
|
1071
1071
|
])]),
|
|
1072
1072
|
_: 1
|
|
1073
|
-
})) :
|
|
1073
|
+
})) : x("", !0)
|
|
1074
1074
|
]),
|
|
1075
|
-
N.value === "year" ? (u(),
|
|
1076
|
-
|
|
1075
|
+
N.value === "year" ? (u(), f("div", Ln, [
|
|
1076
|
+
$("div", {
|
|
1077
1077
|
class: "rc-calendar__year-picker-scroll",
|
|
1078
1078
|
ref_key: "yearScrollRef",
|
|
1079
|
-
ref:
|
|
1080
|
-
onScroll:
|
|
1079
|
+
ref: W,
|
|
1080
|
+
onScroll: ke
|
|
1081
1081
|
}, [
|
|
1082
|
-
|
|
1082
|
+
$("div", {
|
|
1083
1083
|
class: "rc-calendar__year-picker-spacer",
|
|
1084
|
-
style:
|
|
1084
|
+
style: ee({ height: `${Math.floor((S.value - I.value) / ue) * Xe}px` })
|
|
1085
1085
|
}, null, 4),
|
|
1086
|
-
|
|
1087
|
-
(u(!0),
|
|
1088
|
-
key:
|
|
1089
|
-
class:
|
|
1090
|
-
"is-selected":
|
|
1091
|
-
"is-disabled":
|
|
1086
|
+
$("div", Pn, [
|
|
1087
|
+
(u(!0), f(ne, null, ie(de.value, (h) => (u(), f("div", {
|
|
1088
|
+
key: h,
|
|
1089
|
+
class: G(["rc-calendar__year-picker-item", {
|
|
1090
|
+
"is-selected": O.value === h,
|
|
1091
|
+
"is-disabled": pe(h)
|
|
1092
1092
|
}]),
|
|
1093
|
-
onClick: (
|
|
1094
|
-
},
|
|
1093
|
+
onClick: (A) => B(h)
|
|
1094
|
+
}, L(h), 11, Nn))), 128))
|
|
1095
1095
|
]),
|
|
1096
|
-
|
|
1096
|
+
$("div", {
|
|
1097
1097
|
class: "rc-calendar__year-picker-spacer",
|
|
1098
|
-
style:
|
|
1098
|
+
style: ee({ height: `${Math.ceil((z.value - V.value) / ue) * Xe}px` })
|
|
1099
1099
|
}, null, 4)
|
|
1100
1100
|
], 544)
|
|
1101
|
-
])) :
|
|
1102
|
-
N.value === "month" ? (u(),
|
|
1103
|
-
(u(),
|
|
1104
|
-
key:
|
|
1105
|
-
class:
|
|
1106
|
-
"is-selected":
|
|
1107
|
-
"is-disabled":
|
|
1101
|
+
])) : x("", !0),
|
|
1102
|
+
N.value === "month" ? (u(), f("div", Wn, [
|
|
1103
|
+
(u(), f(ne, null, ie(12, (h) => $("div", {
|
|
1104
|
+
key: h,
|
|
1105
|
+
class: G(["rc-calendar__month-picker-item", {
|
|
1106
|
+
"is-selected": Y.value === h,
|
|
1107
|
+
"is-disabled": ye(O.value, h)
|
|
1108
1108
|
}]),
|
|
1109
|
-
onClick: (
|
|
1110
|
-
},
|
|
1111
|
-
])) :
|
|
1109
|
+
onClick: (A) => j(h)
|
|
1110
|
+
}, L(h) + "月 ", 11, Hn)), 64))
|
|
1111
|
+
])) : x("", !0)
|
|
1112
1112
|
])
|
|
1113
|
-
])) :
|
|
1113
|
+
])) : x("", !0)
|
|
1114
1114
|
]),
|
|
1115
1115
|
_: 1
|
|
1116
1116
|
})
|
|
1117
1117
|
]));
|
|
1118
1118
|
}
|
|
1119
|
-
}),
|
|
1119
|
+
}), kt = /* @__PURE__ */ le(On, [["__scopeId", "data-v-0bf1834b"]]), Un = { class: "rc-calendar" }, Kn = ["placeholder"], jn = { class: "rc-calendar__input-actions" }, Gn = {
|
|
1120
1120
|
key: 1,
|
|
1121
1121
|
class: "rc-calendar__panel"
|
|
1122
|
-
},
|
|
1122
|
+
}, qn = /* @__PURE__ */ ae({
|
|
1123
1123
|
name: "rc-calendar",
|
|
1124
1124
|
__name: "index",
|
|
1125
1125
|
props: {
|
|
@@ -1138,189 +1138,189 @@ const fa = {
|
|
|
1138
1138
|
},
|
|
1139
1139
|
emits: ["update:modelValue", "change", "confirm"],
|
|
1140
1140
|
setup(e, { emit: r }) {
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1141
|
+
const v = e, t = r, y = M(), _ = M(), g = M(!1), p = M(""), s = T(() => v.range === !0 || typeof v.range == "number"), m = T(() => typeof v.range == "number" ? v.range : void 0), E = T(() => (b) => {
|
|
1142
|
+
if (v.disabledDate && v.disabledDate(b))
|
|
1143
1143
|
return !0;
|
|
1144
|
-
if (
|
|
1145
|
-
const
|
|
1146
|
-
if (
|
|
1144
|
+
if (m.value !== void 0 && k.value && !R.value) {
|
|
1145
|
+
const o = c(b);
|
|
1146
|
+
if (C(k.value) && ce(k.value, o) > m.value)
|
|
1147
1147
|
return !0;
|
|
1148
1148
|
}
|
|
1149
1149
|
return !1;
|
|
1150
|
-
}),
|
|
1151
|
-
|
|
1152
|
-
() =>
|
|
1153
|
-
(
|
|
1154
|
-
|
|
1150
|
+
}), D = M(null), k = M(null), R = M(null);
|
|
1151
|
+
De(
|
|
1152
|
+
() => v.modelValue,
|
|
1153
|
+
(b) => {
|
|
1154
|
+
s.value ? Array.isArray(b) && b.length === 2 ? (k.value = b[0], R.value = N(b[1])) : (k.value = null, R.value = null) : D.value = typeof b == "string" ? b : null, F();
|
|
1155
1155
|
},
|
|
1156
1156
|
{ immediate: !0 }
|
|
1157
1157
|
);
|
|
1158
|
-
function
|
|
1159
|
-
|
|
1158
|
+
function F() {
|
|
1159
|
+
v.mode === "popup" && (s.value ? k.value && R.value ? p.value = `${k.value} ~ ${R.value}` : k.value ? p.value = `${k.value} ~ ` : p.value = "" : p.value = D.value || "");
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1162
|
-
if (!
|
|
1163
|
-
const
|
|
1164
|
-
return isNaN(
|
|
1161
|
+
function C(b) {
|
|
1162
|
+
if (!b) return null;
|
|
1163
|
+
const o = new Date(b);
|
|
1164
|
+
return isNaN(o.getTime()) ? null : o;
|
|
1165
1165
|
}
|
|
1166
|
-
function c(
|
|
1167
|
-
const
|
|
1168
|
-
return `${
|
|
1166
|
+
function c(b) {
|
|
1167
|
+
const o = b.getFullYear(), B = String(b.getMonth() + 1).padStart(2, "0"), j = String(b.getDate()).padStart(2, "0");
|
|
1168
|
+
return `${o}-${B}-${j}`;
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1173
|
-
const
|
|
1174
|
-
return Math.ceil(
|
|
1170
|
+
function ce(b, o) {
|
|
1171
|
+
const B = C(b), j = C(o);
|
|
1172
|
+
if (!B || !j) return 0;
|
|
1173
|
+
const fe = Math.abs(j.getTime() - B.getTime());
|
|
1174
|
+
return Math.ceil(fe / (1e3 * 60 * 60 * 24));
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
const
|
|
1178
|
-
return
|
|
1176
|
+
function pe(b) {
|
|
1177
|
+
const o = C(b);
|
|
1178
|
+
return o ? (o.setDate(o.getDate() + 1), c(o)) : b;
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const
|
|
1182
|
-
return
|
|
1180
|
+
function ye(b) {
|
|
1181
|
+
const o = C(b);
|
|
1182
|
+
return o ? (o.setDate(o.getDate() - 1), c(o)) : b;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1184
|
+
function H(b) {
|
|
1185
|
+
return v.endDateOffset && s.value ? pe(b) : b;
|
|
1186
1186
|
}
|
|
1187
|
-
function N(
|
|
1188
|
-
return
|
|
1187
|
+
function N(b) {
|
|
1188
|
+
return v.endDateOffset && s.value ? ye(b) : b;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
if (
|
|
1190
|
+
function O(b) {
|
|
1191
|
+
if (b.type !== "current-month" || v.disabledDate && v.disabledDate(b.date))
|
|
1192
1192
|
return;
|
|
1193
|
-
const
|
|
1194
|
-
if (!(
|
|
1195
|
-
if (
|
|
1196
|
-
if (!
|
|
1197
|
-
|
|
1193
|
+
const o = c(b.date);
|
|
1194
|
+
if (!(v.minDate && o < v.minDate) && !(v.maxDate && o > v.maxDate)) {
|
|
1195
|
+
if (s.value)
|
|
1196
|
+
if (!k.value || k.value && R.value)
|
|
1197
|
+
k.value = o, R.value = null;
|
|
1198
1198
|
else {
|
|
1199
|
-
let
|
|
1200
|
-
if (
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1199
|
+
let B = k.value, j = o;
|
|
1200
|
+
if (o < k.value && (j = k.value, B = o), k.value = B, R.value = j, k.value && R.value) {
|
|
1201
|
+
const fe = H(R.value), ve = [k.value, fe];
|
|
1202
|
+
t("update:modelValue", ve), t("change", ve), v.showFooter || Y();
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
else {
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1206
|
+
D.value = o;
|
|
1207
|
+
const B = o;
|
|
1208
|
+
t("update:modelValue", B), t("change", B), v.mode && I();
|
|
1209
1209
|
}
|
|
1210
|
-
|
|
1210
|
+
F();
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
if (
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1213
|
+
function Y() {
|
|
1214
|
+
if (k.value && R.value) {
|
|
1215
|
+
const b = H(R.value), o = [k.value, b];
|
|
1216
|
+
t("update:modelValue", o), t("change", o), t("confirm", o), I();
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1219
|
+
function W() {
|
|
1220
|
+
s.value ? (k.value = null, R.value = null) : D.value = null;
|
|
1221
|
+
const b = null;
|
|
1222
|
+
t("update:modelValue", b), t("change", b), F();
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1225
|
-
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1224
|
+
function S(b) {
|
|
1225
|
+
k.value = b[0], R.value = b[1];
|
|
1226
|
+
const o = H(b[1]), B = [b[0], o];
|
|
1227
|
+
t("update:modelValue", B), t("change", B), v.showFooter ? F() : Y();
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1234
|
-
}
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1237
|
-
}
|
|
1238
|
-
function
|
|
1239
|
-
|
|
1240
|
-
}
|
|
1241
|
-
function
|
|
1242
|
-
|
|
1243
|
-
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1246
|
-
}
|
|
1247
|
-
function
|
|
1248
|
-
const
|
|
1249
|
-
if (
|
|
1250
|
-
const
|
|
1251
|
-
if (
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1229
|
+
function V() {
|
|
1230
|
+
g.value = !0;
|
|
1231
|
+
}
|
|
1232
|
+
function I() {
|
|
1233
|
+
g.value = !1;
|
|
1234
|
+
}
|
|
1235
|
+
function z(b) {
|
|
1236
|
+
g.value = b;
|
|
1237
|
+
}
|
|
1238
|
+
function de() {
|
|
1239
|
+
V();
|
|
1240
|
+
}
|
|
1241
|
+
function ke() {
|
|
1242
|
+
v.mode === "popup" && Ce();
|
|
1243
|
+
}
|
|
1244
|
+
function be() {
|
|
1245
|
+
g.value || V();
|
|
1246
|
+
}
|
|
1247
|
+
function Ce() {
|
|
1248
|
+
const b = p.value.trim();
|
|
1249
|
+
if (s.value) {
|
|
1250
|
+
const o = b.split("~").map((B) => B.trim());
|
|
1251
|
+
if (o.length === 2 && o[0] && o[1]) {
|
|
1252
|
+
const B = C(o[0]), j = C(o[1]);
|
|
1253
|
+
if (B && j && !isNaN(B.getTime()) && !isNaN(j.getTime())) {
|
|
1254
|
+
k.value = c(B);
|
|
1255
|
+
const fe = c(j);
|
|
1256
|
+
R.value = N(fe);
|
|
1257
|
+
const ve = H(R.value), $e = [k.value, ve];
|
|
1258
|
+
t("update:modelValue", $e), t("change", $e);
|
|
1259
1259
|
return;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
} else {
|
|
1263
|
-
const
|
|
1264
|
-
if (
|
|
1265
|
-
|
|
1263
|
+
const o = C(b);
|
|
1264
|
+
if (o && !isNaN(o.getTime())) {
|
|
1265
|
+
D.value = c(o), t("update:modelValue", D.value), t("change", D.value);
|
|
1266
1266
|
return;
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
|
-
|
|
1269
|
+
F();
|
|
1270
1270
|
}
|
|
1271
|
-
return (
|
|
1272
|
-
e.mode === "popup" ? (u(),
|
|
1271
|
+
return (b, o) => (u(), f("div", Un, [
|
|
1272
|
+
e.mode === "popup" ? (u(), f("div", {
|
|
1273
1273
|
key: 0,
|
|
1274
1274
|
class: "rc-calendar__input",
|
|
1275
|
-
onClick:
|
|
1275
|
+
onClick: V
|
|
1276
1276
|
}, [
|
|
1277
|
-
|
|
1277
|
+
St($("input", {
|
|
1278
1278
|
ref_key: "inputRef",
|
|
1279
|
-
ref:
|
|
1280
|
-
"onUpdate:modelValue":
|
|
1279
|
+
ref: y,
|
|
1280
|
+
"onUpdate:modelValue": o[0] || (o[0] = (B) => p.value = B),
|
|
1281
1281
|
type: "text",
|
|
1282
1282
|
class: "rc-calendar__input-field",
|
|
1283
1283
|
placeholder: e.placeholder,
|
|
1284
1284
|
readonly: "",
|
|
1285
|
-
onFocus:
|
|
1286
|
-
onBlur:
|
|
1287
|
-
onInput:
|
|
1288
|
-
}, null, 40,
|
|
1289
|
-
[
|
|
1285
|
+
onFocus: de,
|
|
1286
|
+
onBlur: ke,
|
|
1287
|
+
onInput: be
|
|
1288
|
+
}, null, 40, Kn), [
|
|
1289
|
+
[It, p.value]
|
|
1290
1290
|
]),
|
|
1291
|
-
|
|
1292
|
-
|
|
1291
|
+
$("div", jn, [
|
|
1292
|
+
K(Q(X), {
|
|
1293
1293
|
name: "icon_a-rili",
|
|
1294
1294
|
class: "rc-calendar__input-icon"
|
|
1295
1295
|
})
|
|
1296
1296
|
])
|
|
1297
|
-
])) :
|
|
1298
|
-
e.mode === "default" ? (u(),
|
|
1299
|
-
|
|
1297
|
+
])) : x("", !0),
|
|
1298
|
+
e.mode === "default" ? (u(), f("div", Gn, [
|
|
1299
|
+
K(kt, {
|
|
1300
1300
|
"show-title": e.showTitle,
|
|
1301
1301
|
title: e.title,
|
|
1302
|
-
range:
|
|
1303
|
-
"selected-date":
|
|
1304
|
-
"range-start":
|
|
1305
|
-
"range-end":
|
|
1302
|
+
range: s.value,
|
|
1303
|
+
"selected-date": D.value,
|
|
1304
|
+
"range-start": k.value,
|
|
1305
|
+
"range-end": R.value,
|
|
1306
1306
|
"min-date": e.minDate,
|
|
1307
1307
|
"max-date": e.maxDate,
|
|
1308
|
-
"disabled-date":
|
|
1308
|
+
"disabled-date": E.value,
|
|
1309
1309
|
formatter: e.formatter,
|
|
1310
1310
|
"show-footer": !1,
|
|
1311
|
-
"max-range-days":
|
|
1312
|
-
onSelectDay:
|
|
1313
|
-
onClear:
|
|
1314
|
-
onConfirm:
|
|
1315
|
-
onShortcutSelect:
|
|
1311
|
+
"max-range-days": m.value,
|
|
1312
|
+
onSelectDay: O,
|
|
1313
|
+
onClear: W,
|
|
1314
|
+
onConfirm: Y,
|
|
1315
|
+
onShortcutSelect: S
|
|
1316
1316
|
}, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "max-range-days"])
|
|
1317
|
-
])) :
|
|
1318
|
-
e.mode === "popup" ? (u(),
|
|
1317
|
+
])) : x("", !0),
|
|
1318
|
+
e.mode === "popup" ? (u(), te(Q(Ne), {
|
|
1319
1319
|
key: 2,
|
|
1320
|
-
modelValue:
|
|
1320
|
+
modelValue: g.value,
|
|
1321
1321
|
"onUpdate:modelValue": [
|
|
1322
|
-
|
|
1323
|
-
|
|
1322
|
+
o[1] || (o[1] = (B) => g.value = B),
|
|
1323
|
+
z
|
|
1324
1324
|
],
|
|
1325
1325
|
position: "bottom",
|
|
1326
1326
|
overlay: !0,
|
|
@@ -1328,67 +1328,67 @@ const fa = {
|
|
|
1328
1328
|
"close-on-click-overlay": !0,
|
|
1329
1329
|
"lock-scroll": !0
|
|
1330
1330
|
}, {
|
|
1331
|
-
default:
|
|
1332
|
-
|
|
1331
|
+
default: Z(() => [
|
|
1332
|
+
$("div", {
|
|
1333
1333
|
ref_key: "popupPanelRef",
|
|
1334
|
-
ref:
|
|
1334
|
+
ref: _,
|
|
1335
1335
|
class: "rc-calendar__panel"
|
|
1336
1336
|
}, [
|
|
1337
|
-
|
|
1337
|
+
K(kt, {
|
|
1338
1338
|
"show-title": e.showTitle,
|
|
1339
1339
|
title: e.title,
|
|
1340
|
-
range:
|
|
1341
|
-
"selected-date":
|
|
1342
|
-
"range-start":
|
|
1343
|
-
"range-end":
|
|
1340
|
+
range: s.value,
|
|
1341
|
+
"selected-date": D.value,
|
|
1342
|
+
"range-start": k.value,
|
|
1343
|
+
"range-end": R.value,
|
|
1344
1344
|
"min-date": e.minDate,
|
|
1345
1345
|
"max-date": e.maxDate,
|
|
1346
|
-
"disabled-date":
|
|
1346
|
+
"disabled-date": E.value,
|
|
1347
1347
|
formatter: e.formatter,
|
|
1348
1348
|
"show-footer": e.showFooter,
|
|
1349
|
-
"max-range-days":
|
|
1350
|
-
onSelectDay:
|
|
1351
|
-
onClear:
|
|
1352
|
-
onConfirm:
|
|
1353
|
-
onShortcutSelect:
|
|
1349
|
+
"max-range-days": m.value,
|
|
1350
|
+
onSelectDay: O,
|
|
1351
|
+
onClear: W,
|
|
1352
|
+
onConfirm: Y,
|
|
1353
|
+
onShortcutSelect: S
|
|
1354
1354
|
}, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "show-footer", "max-range-days"])
|
|
1355
1355
|
], 512)
|
|
1356
1356
|
]),
|
|
1357
1357
|
_: 1
|
|
1358
|
-
}, 8, ["modelValue"])) :
|
|
1358
|
+
}, 8, ["modelValue"])) : x("", !0)
|
|
1359
1359
|
]));
|
|
1360
1360
|
}
|
|
1361
|
-
}), We = /* @__PURE__ */
|
|
1361
|
+
}), We = /* @__PURE__ */ le(qn, [["__scopeId", "data-v-96b29c22"]]);
|
|
1362
1362
|
We.name = "rc-calendar";
|
|
1363
|
-
const
|
|
1364
|
-
function
|
|
1365
|
-
return e.component(We.name, We), e.component(
|
|
1363
|
+
const Jn = "RcCalendar";
|
|
1364
|
+
function bt(e) {
|
|
1365
|
+
return e.component(We.name, We), e.component(Jn, We), e;
|
|
1366
1366
|
}
|
|
1367
|
-
const
|
|
1367
|
+
const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Zn = ["onClick"], ea = { class: "rc-search-area__item-label" }, ta = { class: "rc-search-area__panel-content" }, na = {
|
|
1368
1368
|
key: 1,
|
|
1369
1369
|
class: "rc-search-area__input-wrapper"
|
|
1370
|
-
},
|
|
1370
|
+
}, aa = ["placeholder"], la = {
|
|
1371
1371
|
key: 2,
|
|
1372
1372
|
class: "rc-search-area__calendar-wrapper"
|
|
1373
|
-
},
|
|
1373
|
+
}, oa = {
|
|
1374
1374
|
key: 3,
|
|
1375
1375
|
class: "rc-search-area__tree-container"
|
|
1376
|
-
},
|
|
1376
|
+
}, ra = { class: "rc-search-area__tree-group-title" }, sa = { class: "rc-search-area__tree-group-options" }, ua = ["onClick"], ia = { class: "rc-search-area__option-label" }, ca = {
|
|
1377
1377
|
key: 4,
|
|
1378
1378
|
class: "rc-search-area__tree-container"
|
|
1379
|
-
},
|
|
1379
|
+
}, da = { class: "rc-search-area__tree-group-title" }, fa = { class: "rc-search-area__tree-group-options" }, va = ["onClick"], ma = { class: "rc-search-area__option-label" }, pa = {
|
|
1380
1380
|
key: 5,
|
|
1381
1381
|
class: "rc-search-area__options-grid"
|
|
1382
|
-
},
|
|
1382
|
+
}, ya = ["onClick"], ha = { class: "rc-search-area__option-label" }, ga = {
|
|
1383
1383
|
key: 6,
|
|
1384
1384
|
class: "rc-search-area__options-grid"
|
|
1385
|
-
},
|
|
1385
|
+
}, _a = ["onClick"], ka = { class: "rc-search-area__option-label" }, ba = {
|
|
1386
1386
|
key: 7,
|
|
1387
1387
|
class: "rc-search-area__empty"
|
|
1388
|
-
},
|
|
1388
|
+
}, wa = {
|
|
1389
1389
|
key: 0,
|
|
1390
1390
|
class: "rc-search-area__panel-footer"
|
|
1391
|
-
},
|
|
1391
|
+
}, $a = /* @__PURE__ */ ae({
|
|
1392
1392
|
name: "rc-search-area",
|
|
1393
1393
|
__name: "index",
|
|
1394
1394
|
props: {
|
|
@@ -1398,462 +1398,968 @@ const Oa = { class: "rc-search-area" }, za = { class: "rc-search-area__bar" }, U
|
|
|
1398
1398
|
autoConfirm: { type: Boolean, default: !1 }
|
|
1399
1399
|
},
|
|
1400
1400
|
emits: ["update:modelValue", "change"],
|
|
1401
|
-
setup(e, { expose: r, emit:
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1401
|
+
setup(e, { expose: r, emit: v }) {
|
|
1402
|
+
const t = e, y = v, _ = M(null), g = M(null), p = M(null), s = M({ top: "0px" }), m = async () => {
|
|
1403
|
+
if (_.value === null || !g.value)
|
|
1404
1404
|
return;
|
|
1405
|
-
await
|
|
1406
|
-
const l =
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1409
|
-
if (
|
|
1405
|
+
await Be();
|
|
1406
|
+
const l = g.value.getBoundingClientRect().top;
|
|
1407
|
+
s.value = { top: `${l}px` };
|
|
1408
|
+
}, E = (n) => {
|
|
1409
|
+
if (_.value === null || !g.value)
|
|
1410
1410
|
return;
|
|
1411
|
-
const l =
|
|
1412
|
-
if (
|
|
1411
|
+
const l = n.target;
|
|
1412
|
+
if (g.value.contains(l))
|
|
1413
1413
|
return;
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1417
|
-
if (
|
|
1414
|
+
const d = g.value.closest(".rc-search-area");
|
|
1415
|
+
if (d) {
|
|
1416
|
+
const w = d.querySelector(".rc-search-area__bar");
|
|
1417
|
+
if (w && w.contains(l))
|
|
1418
1418
|
return;
|
|
1419
1419
|
}
|
|
1420
|
-
|
|
1420
|
+
H();
|
|
1421
1421
|
};
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
}),
|
|
1425
|
-
window.removeEventListener("resize",
|
|
1422
|
+
De(_, async (n) => {
|
|
1423
|
+
n !== null ? (await Be(), m(), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), document.addEventListener("click", E, !0)) : (window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0), document.removeEventListener("click", E, !0));
|
|
1424
|
+
}), at(() => {
|
|
1425
|
+
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0), document.removeEventListener("click", E, !0);
|
|
1426
1426
|
});
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1429
|
-
|
|
1427
|
+
const D = M({}), k = M(""), R = M(null), F = M({}), C = M({ ...t.modelValue });
|
|
1428
|
+
De(() => t.modelValue, (n) => {
|
|
1429
|
+
C.value = { ...n || {} };
|
|
1430
1430
|
}, { deep: !0, immediate: !0 });
|
|
1431
|
-
const c =
|
|
1431
|
+
const c = T(() => _.value === null ? null : t.items[_.value]), ce = T(() => {
|
|
1432
1432
|
if (!c.value) return "";
|
|
1433
|
-
const
|
|
1434
|
-
return
|
|
1435
|
-
}),
|
|
1436
|
-
const l =
|
|
1437
|
-
if (l == null || l === "" ||
|
|
1438
|
-
return
|
|
1439
|
-
if (
|
|
1433
|
+
const n = $e(c.value);
|
|
1434
|
+
return n > 0 ? `(${n}项)` : "";
|
|
1435
|
+
}), pe = (n) => {
|
|
1436
|
+
const l = C.value[n.key];
|
|
1437
|
+
if (l == null || l === "" || n.slot)
|
|
1438
|
+
return n.label;
|
|
1439
|
+
if (n.type === "input") {
|
|
1440
1440
|
if (l && String(l).trim())
|
|
1441
|
-
return `${
|
|
1442
|
-
} else if (
|
|
1441
|
+
return `${n.label}: ${l}`;
|
|
1442
|
+
} else if (n.type === "calendar") {
|
|
1443
1443
|
if (l) {
|
|
1444
1444
|
if (Array.isArray(l) && l.length === 2)
|
|
1445
|
-
return `${
|
|
1445
|
+
return `${n.label}: ${l[0]} ~ ${l[1]}`;
|
|
1446
1446
|
if (typeof l == "string")
|
|
1447
|
-
return `${
|
|
1447
|
+
return `${n.label}: ${l}`;
|
|
1448
1448
|
}
|
|
1449
|
-
} else if (
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1452
|
-
return `${
|
|
1449
|
+
} else if (n.type === "single" || n.type === "tree-single") {
|
|
1450
|
+
const d = W(n, l);
|
|
1451
|
+
if (d)
|
|
1452
|
+
return `${n.label}: ${Y(d, n)}`;
|
|
1453
1453
|
} else {
|
|
1454
|
-
const
|
|
1455
|
-
if (
|
|
1456
|
-
const
|
|
1457
|
-
const
|
|
1458
|
-
return
|
|
1459
|
-
}).filter((
|
|
1460
|
-
if (
|
|
1461
|
-
return `${
|
|
1454
|
+
const d = Array.isArray(l) ? l : [l];
|
|
1455
|
+
if (d.length > 0) {
|
|
1456
|
+
const w = d.map((J) => {
|
|
1457
|
+
const U = W(n, J);
|
|
1458
|
+
return U ? Y(U, n) : null;
|
|
1459
|
+
}).filter((J) => J !== null);
|
|
1460
|
+
if (w.length > 0)
|
|
1461
|
+
return `${n.label}: ${w.join("、")}`;
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
return
|
|
1465
|
-
},
|
|
1466
|
-
const l =
|
|
1464
|
+
return n.label;
|
|
1465
|
+
}, ye = (n) => {
|
|
1466
|
+
const l = t.items[n];
|
|
1467
1467
|
if (!l) return;
|
|
1468
|
-
if (
|
|
1469
|
-
|
|
1468
|
+
if (_.value === n) {
|
|
1469
|
+
_.value = null;
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
|
-
const
|
|
1473
|
-
l.slot ?
|
|
1474
|
-
},
|
|
1475
|
-
|
|
1476
|
-
}, N = (
|
|
1472
|
+
const d = C.value[l.key];
|
|
1473
|
+
l.slot ? d != null ? Array.isArray(d) ? F.value[l.key] = [...d] : typeof d == "object" ? F.value[l.key] = { ...d } : F.value[l.key] = d : F.value[l.key] = void 0 : l.type === "input" ? k.value = d != null ? String(d) : "" : l.type === "calendar" ? R.value = d ?? null : l.type === "single" || l.type === "tree-single" ? D.value[l.key] = d !== void 0 ? d : null : D.value[l.key] = d !== void 0 ? Array.isArray(d) ? [...d] : [d] : [], _.value = n;
|
|
1474
|
+
}, H = () => {
|
|
1475
|
+
_.value = null;
|
|
1476
|
+
}, N = (n, l) => {
|
|
1477
1477
|
if (!l)
|
|
1478
|
-
return typeof
|
|
1479
|
-
const
|
|
1478
|
+
return typeof n == "string" ? n : n.label || String(n.value);
|
|
1479
|
+
const d = n;
|
|
1480
1480
|
if (l.renderItem) {
|
|
1481
1481
|
if (typeof l.renderItem == "string")
|
|
1482
|
-
return String(typeof
|
|
1482
|
+
return String(typeof d == "object" && d !== null ? d[l.renderItem] ?? "" : d);
|
|
1483
1483
|
{
|
|
1484
|
-
const
|
|
1485
|
-
return
|
|
1484
|
+
const w = l.renderItem(d);
|
|
1485
|
+
return w != null ? String(w) : "";
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
return typeof
|
|
1489
|
-
},
|
|
1488
|
+
return typeof n == "string" ? n : n.label || String(n.value);
|
|
1489
|
+
}, O = (n, l) => {
|
|
1490
1490
|
if (!l)
|
|
1491
|
-
return typeof
|
|
1492
|
-
const
|
|
1493
|
-
return l.format ? typeof l.format == "string" ? typeof
|
|
1494
|
-
},
|
|
1495
|
-
const
|
|
1496
|
-
if (
|
|
1497
|
-
if (typeof
|
|
1498
|
-
return String(typeof
|
|
1491
|
+
return typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
|
|
1492
|
+
const d = n;
|
|
1493
|
+
return l.format ? typeof l.format == "string" ? typeof d == "object" && d !== null ? d[l.format] : d : l.format(d) : typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
|
|
1494
|
+
}, Y = (n, l) => {
|
|
1495
|
+
const d = n, w = l.renderResult || l.renderItem;
|
|
1496
|
+
if (w) {
|
|
1497
|
+
if (typeof w == "string")
|
|
1498
|
+
return String(typeof d == "object" && d !== null ? d[w] ?? "" : d);
|
|
1499
1499
|
{
|
|
1500
|
-
const
|
|
1501
|
-
return
|
|
1500
|
+
const J = w(d);
|
|
1501
|
+
return J != null ? String(J) : "";
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
|
-
return N(
|
|
1505
|
-
},
|
|
1506
|
-
const
|
|
1507
|
-
if (!
|
|
1508
|
-
const
|
|
1509
|
-
for (const
|
|
1510
|
-
const
|
|
1511
|
-
if (
|
|
1512
|
-
return
|
|
1513
|
-
if (typeof
|
|
1514
|
-
const
|
|
1515
|
-
if (Array.isArray(
|
|
1516
|
-
const
|
|
1517
|
-
if (
|
|
1504
|
+
return N(n, l);
|
|
1505
|
+
}, W = (n, l, d) => {
|
|
1506
|
+
const w = d || n.options;
|
|
1507
|
+
if (!w) return null;
|
|
1508
|
+
const J = n.childrenKey || "children";
|
|
1509
|
+
for (const U of w) {
|
|
1510
|
+
const me = O(U, n);
|
|
1511
|
+
if (me === l || String(me) === String(l))
|
|
1512
|
+
return U;
|
|
1513
|
+
if (typeof U == "object" && U !== null) {
|
|
1514
|
+
const Se = U[J];
|
|
1515
|
+
if (Array.isArray(Se) && Se.length > 0) {
|
|
1516
|
+
const xe = W(n, l, Se);
|
|
1517
|
+
if (xe) return xe;
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
return null;
|
|
1522
|
-
},
|
|
1523
|
-
const
|
|
1524
|
-
if (!
|
|
1525
|
-
const
|
|
1526
|
-
for (const
|
|
1527
|
-
if (
|
|
1528
|
-
const
|
|
1529
|
-
Array.isArray(
|
|
1522
|
+
}, S = (n, l) => {
|
|
1523
|
+
const d = l || n.options;
|
|
1524
|
+
if (!d) return [];
|
|
1525
|
+
const w = n.childrenKey || "children", J = [];
|
|
1526
|
+
for (const U of d)
|
|
1527
|
+
if (J.push(U), typeof U == "object" && U !== null) {
|
|
1528
|
+
const me = U[w];
|
|
1529
|
+
Array.isArray(me) && me.length > 0 && J.push(...S(n, me));
|
|
1530
1530
|
}
|
|
1531
|
-
return
|
|
1532
|
-
},
|
|
1531
|
+
return J;
|
|
1532
|
+
}, V = (n) => {
|
|
1533
1533
|
if (!c.value) return !1;
|
|
1534
|
-
const l = c.value.key,
|
|
1535
|
-
return c.value.type === "single" || c.value.type === "tree-single" ?
|
|
1536
|
-
},
|
|
1537
|
-
if (!
|
|
1538
|
-
const l =
|
|
1539
|
-
return (
|
|
1540
|
-
if (typeof
|
|
1541
|
-
const
|
|
1542
|
-
return Array.isArray(
|
|
1534
|
+
const l = c.value.key, d = D.value[l], w = O(n, c.value);
|
|
1535
|
+
return c.value.type === "single" || c.value.type === "tree-single" ? d != null && d === w : (Array.isArray(d) ? d : []).some((U) => U === w || String(U) === String(w));
|
|
1536
|
+
}, I = (n) => n ? n.childrenKey ? S(n) : n.options || [] : [], z = (n) => {
|
|
1537
|
+
if (!n) return [];
|
|
1538
|
+
const l = n.childrenKey || "children";
|
|
1539
|
+
return (n.options || []).filter((d) => {
|
|
1540
|
+
if (typeof d == "string") return !1;
|
|
1541
|
+
const w = d[l];
|
|
1542
|
+
return Array.isArray(w) && w.length > 0;
|
|
1543
1543
|
});
|
|
1544
|
-
},
|
|
1545
|
-
if (!l || typeof
|
|
1546
|
-
const
|
|
1547
|
-
return Array.isArray(
|
|
1548
|
-
},
|
|
1549
|
-
if (
|
|
1550
|
-
return
|
|
1551
|
-
},
|
|
1552
|
-
if (
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1544
|
+
}, de = (n, l) => {
|
|
1545
|
+
if (!l || typeof n == "string") return [];
|
|
1546
|
+
const d = l.childrenKey || "children", w = n[d];
|
|
1547
|
+
return Array.isArray(w) ? w : [];
|
|
1548
|
+
}, ke = (n) => {
|
|
1549
|
+
if (n)
|
|
1550
|
+
return F.value[n.key] !== void 0 ? F.value[n.key] : C.value[n.key];
|
|
1551
|
+
}, be = (n, l) => {
|
|
1552
|
+
if (n && (F.value[n.key] = l, t.autoConfirm)) {
|
|
1553
|
+
const d = n.key;
|
|
1554
|
+
C.value[d] = l, y("update:modelValue", { ...C.value }), y("change", { ...C.value }, n), H();
|
|
1555
1555
|
}
|
|
1556
|
-
},
|
|
1556
|
+
}, Ce = (n) => {
|
|
1557
1557
|
if (!c.value) return;
|
|
1558
|
-
const l = c.value.key,
|
|
1559
|
-
|
|
1560
|
-
let
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1558
|
+
const l = c.value.key, d = O(n, c.value);
|
|
1559
|
+
C.value[l];
|
|
1560
|
+
let w;
|
|
1561
|
+
D.value[l] === d ? w = void 0 : w = d, C.value[l] = w, y("update:modelValue", { ...C.value }), y("change", { ...C.value }, c.value), H();
|
|
1562
|
+
}, b = (n) => {
|
|
1563
1563
|
if (!c.value) return;
|
|
1564
|
-
const l = c.value.key,
|
|
1565
|
-
(
|
|
1564
|
+
const l = c.value.key, d = O(n, c.value), w = Array.isArray(D.value[l]) ? [...D.value[l]] : [], J = w.findIndex(
|
|
1565
|
+
(U) => U === d || String(U) === String(d)
|
|
1566
1566
|
);
|
|
1567
|
-
if (
|
|
1568
|
-
const
|
|
1569
|
-
|
|
1567
|
+
if (J >= 0 ? w.splice(J, 1) : w.push(d), D.value[l] = w, t.autoConfirm) {
|
|
1568
|
+
const U = w.length > 0 ? w : void 0;
|
|
1569
|
+
C.value[l] = U, y("update:modelValue", { ...C.value }), y("change", { ...C.value }, c.value), H();
|
|
1570
1570
|
}
|
|
1571
|
-
},
|
|
1571
|
+
}, o = () => {
|
|
1572
1572
|
if (!c.value) return;
|
|
1573
|
-
const
|
|
1574
|
-
c.value.slot ?
|
|
1575
|
-
},
|
|
1576
|
-
if (
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1573
|
+
const n = c.value.key;
|
|
1574
|
+
c.value.slot ? F.value[n] = void 0 : c.value.type === "input" ? k.value = "" : c.value.type === "calendar" ? R.value = null : c.value.type === "single" || c.value.type === "tree-single" ? D.value[n] = null : D.value[n] = [];
|
|
1575
|
+
}, B = () => {
|
|
1576
|
+
if (t.autoConfirm && c.value) {
|
|
1577
|
+
const n = c.value.key, l = k.value.trim() || void 0;
|
|
1578
|
+
C.value[n] = l, y("update:modelValue", { ...C.value }), y("change", { ...C.value }, c.value), H();
|
|
1579
1579
|
}
|
|
1580
|
-
},
|
|
1581
|
-
if (
|
|
1582
|
-
const l = c.value.key,
|
|
1583
|
-
|
|
1580
|
+
}, j = (n) => {
|
|
1581
|
+
if (R.value = n, t.autoConfirm && c.value) {
|
|
1582
|
+
const l = c.value.key, d = n ?? void 0;
|
|
1583
|
+
C.value[l] = d, y("update:modelValue", { ...C.value }), y("change", { ...C.value }, c.value), H();
|
|
1584
1584
|
}
|
|
1585
|
-
},
|
|
1585
|
+
}, fe = () => {
|
|
1586
1586
|
if (!c.value) return;
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1587
|
+
const n = c.value.key;
|
|
1588
|
+
C.value[n];
|
|
1589
1589
|
let l;
|
|
1590
1590
|
if (c.value.slot)
|
|
1591
|
-
l =
|
|
1591
|
+
l = F.value[n], C.value[n] = l;
|
|
1592
1592
|
else if (c.value.type === "input")
|
|
1593
|
-
l =
|
|
1593
|
+
l = k.value.trim() || void 0, C.value[n] = l;
|
|
1594
1594
|
else if (c.value.type === "calendar")
|
|
1595
|
-
l =
|
|
1595
|
+
l = R.value !== null && R.value !== void 0 ? R.value : void 0, C.value[n] = l;
|
|
1596
1596
|
else if (c.value.type === "single" || c.value.type === "tree-single") {
|
|
1597
|
-
const
|
|
1598
|
-
l =
|
|
1597
|
+
const d = D.value[n];
|
|
1598
|
+
l = d ?? void 0, C.value[n] = l;
|
|
1599
1599
|
} else {
|
|
1600
|
-
const
|
|
1601
|
-
l = Array.isArray(
|
|
1600
|
+
const d = D.value[n];
|
|
1601
|
+
l = Array.isArray(d) && d.length > 0 ? d : void 0, C.value[n] = l;
|
|
1602
1602
|
}
|
|
1603
|
-
|
|
1604
|
-
},
|
|
1605
|
-
const l =
|
|
1606
|
-
return l == null || l === "" ? 0 :
|
|
1607
|
-
},
|
|
1608
|
-
if (
|
|
1609
|
-
const
|
|
1610
|
-
return
|
|
1603
|
+
y("update:modelValue", { ...C.value }), y("change", { ...C.value }, c.value), H();
|
|
1604
|
+
}, ve = (n) => {
|
|
1605
|
+
const l = C.value[n.key];
|
|
1606
|
+
return l == null || l === "" ? 0 : n.slot ? 1 : n.type === "input" ? String(l).trim() ? 1 : 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : l ? 1 : 0;
|
|
1607
|
+
}, $e = (n) => {
|
|
1608
|
+
if (n.slot) {
|
|
1609
|
+
const d = F.value[n.key];
|
|
1610
|
+
return d != null && d !== "" ? 1 : 0;
|
|
1611
1611
|
} else {
|
|
1612
|
-
if (
|
|
1613
|
-
return
|
|
1614
|
-
if (
|
|
1615
|
-
return
|
|
1612
|
+
if (n.type === "input")
|
|
1613
|
+
return k.value.trim() ? 1 : 0;
|
|
1614
|
+
if (n.type === "calendar")
|
|
1615
|
+
return R.value !== null && R.value !== void 0 ? 1 : 0;
|
|
1616
1616
|
}
|
|
1617
|
-
const l =
|
|
1618
|
-
return l == null || l === "" ? 0 :
|
|
1617
|
+
const l = D.value[n.key];
|
|
1618
|
+
return l == null || l === "" ? 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : 0;
|
|
1619
1619
|
};
|
|
1620
1620
|
return r({
|
|
1621
1621
|
/** 获取当前筛选值 */
|
|
1622
|
-
getValues: () => ({
|
|
1622
|
+
getValues: () => ({ ...C.value }),
|
|
1623
1623
|
/** 重置所有筛选 */
|
|
1624
1624
|
reset: () => {
|
|
1625
|
-
|
|
1625
|
+
C.value = {}, D.value = {}, F.value = {}, y("update:modelValue", {});
|
|
1626
1626
|
}
|
|
1627
|
-
}), (
|
|
1628
|
-
|
|
1629
|
-
(u(!0),
|
|
1630
|
-
key:
|
|
1631
|
-
class:
|
|
1632
|
-
"is-active":
|
|
1633
|
-
"has-value":
|
|
1627
|
+
}), (n, l) => (u(), f("div", Qn, [
|
|
1628
|
+
$("div", Xn, [
|
|
1629
|
+
(u(!0), f(ne, null, ie(t.items, (d, w) => (u(), f("div", {
|
|
1630
|
+
key: w,
|
|
1631
|
+
class: G(["rc-search-area__item", {
|
|
1632
|
+
"is-active": _.value === w,
|
|
1633
|
+
"has-value": ve(d) > 0
|
|
1634
1634
|
}]),
|
|
1635
|
-
onClick: (
|
|
1635
|
+
onClick: (J) => ye(w)
|
|
1636
1636
|
}, [
|
|
1637
|
-
|
|
1638
|
-
|
|
1637
|
+
$("span", ea, L(pe(d)), 1),
|
|
1638
|
+
K(Q(X), {
|
|
1639
1639
|
name: "icon_a-xiala2",
|
|
1640
|
-
color:
|
|
1641
|
-
class:
|
|
1640
|
+
color: _.value !== w && ve(d) > 0 ? "#1677ff" : "#969799",
|
|
1641
|
+
class: G(["rc-search-area__item-arrow", { "is-up": _.value === w }])
|
|
1642
1642
|
}, null, 8, ["color", "class"])
|
|
1643
|
-
], 10,
|
|
1643
|
+
], 10, Zn))), 128))
|
|
1644
1644
|
]),
|
|
1645
|
-
|
|
1646
|
-
default:
|
|
1647
|
-
|
|
1645
|
+
K(Ee, { name: "rc-search-area-fade" }, {
|
|
1646
|
+
default: Z(() => [
|
|
1647
|
+
_.value !== null && t.showMask ? (u(), f("div", {
|
|
1648
1648
|
key: 0,
|
|
1649
1649
|
ref_key: "maskRef",
|
|
1650
1650
|
ref: p,
|
|
1651
1651
|
class: "rc-search-area__mask",
|
|
1652
|
-
style:
|
|
1653
|
-
onClick:
|
|
1654
|
-
}, null, 4)) :
|
|
1652
|
+
style: ee(s.value),
|
|
1653
|
+
onClick: H
|
|
1654
|
+
}, null, 4)) : x("", !0)
|
|
1655
1655
|
]),
|
|
1656
1656
|
_: 1
|
|
1657
1657
|
}),
|
|
1658
|
-
|
|
1659
|
-
default:
|
|
1660
|
-
var
|
|
1658
|
+
K(Ee, { name: "rc-search-area-slide" }, {
|
|
1659
|
+
default: Z(() => {
|
|
1660
|
+
var d, w, J, U, me, Se, xe, ze, Oe, Ue, Le, Ke, je, Ge, qe, Je, Qe, a, i;
|
|
1661
1661
|
return [
|
|
1662
|
-
|
|
1662
|
+
_.value !== null ? (u(), f("div", {
|
|
1663
1663
|
key: 0,
|
|
1664
1664
|
ref_key: "panelRef",
|
|
1665
|
-
ref:
|
|
1665
|
+
ref: g,
|
|
1666
1666
|
class: "rc-search-area__panel"
|
|
1667
1667
|
}, [
|
|
1668
|
-
|
|
1669
|
-
(
|
|
1668
|
+
$("div", ta, [
|
|
1669
|
+
(d = c.value) != null && d.slot && n.$slots[c.value.key] ? q(n.$slots, c.value.key, {
|
|
1670
1670
|
key: 0,
|
|
1671
|
-
value:
|
|
1672
|
-
"update:value": (
|
|
1673
|
-
}, void 0, !0) : ((
|
|
1674
|
-
|
|
1675
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1671
|
+
value: ke(c.value),
|
|
1672
|
+
"update:value": (h) => be(c.value, h)
|
|
1673
|
+
}, void 0, !0) : ((w = c.value) == null ? void 0 : w.type) === "input" ? (u(), f("div", na, [
|
|
1674
|
+
St($("input", {
|
|
1675
|
+
"onUpdate:modelValue": l[0] || (l[0] = (h) => k.value = h),
|
|
1676
1676
|
type: "text",
|
|
1677
1677
|
class: "rc-search-area__input",
|
|
1678
1678
|
placeholder: c.value.placeholder || "请输入",
|
|
1679
|
-
onInput:
|
|
1680
|
-
}, null, 40,
|
|
1681
|
-
[
|
|
1679
|
+
onInput: B
|
|
1680
|
+
}, null, 40, aa), [
|
|
1681
|
+
[It, k.value]
|
|
1682
1682
|
])
|
|
1683
|
-
])) : ((
|
|
1684
|
-
|
|
1685
|
-
modelValue:
|
|
1686
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
1687
|
-
range: ((
|
|
1683
|
+
])) : ((J = c.value) == null ? void 0 : J.type) === "calendar" ? (u(), f("div", la, [
|
|
1684
|
+
K(Q(We), {
|
|
1685
|
+
modelValue: R.value,
|
|
1686
|
+
"onUpdate:modelValue": l[1] || (l[1] = (h) => R.value = h),
|
|
1687
|
+
range: ((U = c.value.calendarConfig) == null ? void 0 : U.range) || !1,
|
|
1688
1688
|
mode: "default",
|
|
1689
|
-
"min-date": (
|
|
1690
|
-
"max-date": (
|
|
1691
|
-
"disabled-date": (
|
|
1692
|
-
formatter: (
|
|
1689
|
+
"min-date": (me = c.value.calendarConfig) == null ? void 0 : me.minDate,
|
|
1690
|
+
"max-date": (Se = c.value.calendarConfig) == null ? void 0 : Se.maxDate,
|
|
1691
|
+
"disabled-date": (xe = c.value.calendarConfig) == null ? void 0 : xe.disabledDate,
|
|
1692
|
+
formatter: (ze = c.value.calendarConfig) == null ? void 0 : ze.formatter,
|
|
1693
1693
|
"end-date-offset": ((Oe = c.value.calendarConfig) == null ? void 0 : Oe.endDateOffset) || !1,
|
|
1694
|
-
onChange:
|
|
1694
|
+
onChange: j
|
|
1695
1695
|
}, null, 8, ["modelValue", "range", "min-date", "max-date", "disabled-date", "formatter", "end-date-offset"])
|
|
1696
|
-
])) : ((
|
|
1697
|
-
(u(!0),
|
|
1698
|
-
key:
|
|
1696
|
+
])) : ((Ue = c.value) == null ? void 0 : Ue.type) === "tree-single" ? (u(), f("div", oa, [
|
|
1697
|
+
(u(!0), f(ne, null, ie(z(c.value), (h, A) => (u(), f("div", {
|
|
1698
|
+
key: A,
|
|
1699
1699
|
class: "rc-search-area__tree-group"
|
|
1700
1700
|
}, [
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
(u(!0),
|
|
1704
|
-
key:
|
|
1705
|
-
class:
|
|
1706
|
-
onClick: (
|
|
1701
|
+
$("div", ra, L(N(h, c.value || void 0)), 1),
|
|
1702
|
+
$("div", sa, [
|
|
1703
|
+
(u(!0), f(ne, null, ie(de(h, c.value), (P, he) => (u(), f("div", {
|
|
1704
|
+
key: he,
|
|
1705
|
+
class: G(["rc-search-area__option", { "is-selected": V(P) }]),
|
|
1706
|
+
onClick: (ge) => Ce(P)
|
|
1707
1707
|
}, [
|
|
1708
|
-
|
|
1709
|
-
|
|
1708
|
+
$("span", ia, L(N(P, c.value || void 0)), 1),
|
|
1709
|
+
V(P) ? (u(), te(Q(X), {
|
|
1710
1710
|
key: 0,
|
|
1711
1711
|
name: "icon_check",
|
|
1712
1712
|
class: "rc-search-area__option-check"
|
|
1713
|
-
})) :
|
|
1714
|
-
], 10,
|
|
1713
|
+
})) : x("", !0)
|
|
1714
|
+
], 10, ua))), 128))
|
|
1715
1715
|
])
|
|
1716
1716
|
]))), 128))
|
|
1717
|
-
])) : ((
|
|
1718
|
-
(u(!0),
|
|
1719
|
-
key:
|
|
1717
|
+
])) : ((Le = c.value) == null ? void 0 : Le.type) === "tree-multiple" ? (u(), f("div", ca, [
|
|
1718
|
+
(u(!0), f(ne, null, ie(z(c.value), (h, A) => (u(), f("div", {
|
|
1719
|
+
key: A,
|
|
1720
1720
|
class: "rc-search-area__tree-group"
|
|
1721
1721
|
}, [
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
(u(!0),
|
|
1725
|
-
key:
|
|
1726
|
-
class:
|
|
1727
|
-
onClick: (
|
|
1722
|
+
$("div", da, L(N(h, c.value || void 0)), 1),
|
|
1723
|
+
$("div", fa, [
|
|
1724
|
+
(u(!0), f(ne, null, ie(de(h, c.value), (P, he) => (u(), f("div", {
|
|
1725
|
+
key: he,
|
|
1726
|
+
class: G(["rc-search-area__option", { "is-selected": V(P) }]),
|
|
1727
|
+
onClick: (ge) => b(P)
|
|
1728
1728
|
}, [
|
|
1729
|
-
|
|
1730
|
-
|
|
1729
|
+
$("span", ma, L(N(P, c.value || void 0)), 1),
|
|
1730
|
+
V(P) ? (u(), te(Q(X), {
|
|
1731
1731
|
key: 0,
|
|
1732
1732
|
name: "icon_check",
|
|
1733
1733
|
class: "rc-search-area__option-check"
|
|
1734
|
-
})) :
|
|
1735
|
-
], 10,
|
|
1734
|
+
})) : x("", !0)
|
|
1735
|
+
], 10, va))), 128))
|
|
1736
1736
|
])
|
|
1737
1737
|
]))), 128))
|
|
1738
|
-
])) : ((
|
|
1739
|
-
(u(!0),
|
|
1740
|
-
key:
|
|
1741
|
-
class:
|
|
1742
|
-
onClick: (
|
|
1738
|
+
])) : ((Ke = c.value) == null ? void 0 : Ke.type) === "single" ? (u(), f("div", pa, [
|
|
1739
|
+
(u(!0), f(ne, null, ie(I(c.value), (h, A) => (u(), f("div", {
|
|
1740
|
+
key: A,
|
|
1741
|
+
class: G(["rc-search-area__option", { "is-selected": V(h) }]),
|
|
1742
|
+
onClick: (P) => Ce(h)
|
|
1743
1743
|
}, [
|
|
1744
|
-
|
|
1745
|
-
|
|
1744
|
+
$("span", ha, L(N(h, c.value || void 0)), 1),
|
|
1745
|
+
V(h) ? (u(), te(Q(X), {
|
|
1746
1746
|
key: 0,
|
|
1747
1747
|
name: "icon_check",
|
|
1748
1748
|
class: "rc-search-area__option-check"
|
|
1749
|
-
})) :
|
|
1750
|
-
], 10,
|
|
1751
|
-
])) : (u(),
|
|
1752
|
-
(u(!0),
|
|
1753
|
-
key:
|
|
1754
|
-
class:
|
|
1755
|
-
onClick: (
|
|
1749
|
+
})) : x("", !0)
|
|
1750
|
+
], 10, ya))), 128))
|
|
1751
|
+
])) : (u(), f("div", ga, [
|
|
1752
|
+
(u(!0), f(ne, null, ie(I(c.value), (h, A) => (u(), f("div", {
|
|
1753
|
+
key: A,
|
|
1754
|
+
class: G(["rc-search-area__option", { "is-selected": V(h) }]),
|
|
1755
|
+
onClick: (P) => b(h)
|
|
1756
1756
|
}, [
|
|
1757
|
-
|
|
1758
|
-
|
|
1757
|
+
$("span", ka, L(N(h, c.value || void 0)), 1),
|
|
1758
|
+
V(h) ? (u(), te(Q(X), {
|
|
1759
1759
|
key: 0,
|
|
1760
1760
|
name: "icon_check",
|
|
1761
1761
|
class: "rc-search-area__option-check"
|
|
1762
|
-
})) :
|
|
1763
|
-
], 10,
|
|
1762
|
+
})) : x("", !0)
|
|
1763
|
+
], 10, _a))), 128))
|
|
1764
1764
|
])),
|
|
1765
|
-
((
|
|
1766
|
-
|
|
1767
|
-
])])) :
|
|
1765
|
+
((je = c.value) == null ? void 0 : je.type) !== "input" && ((Ge = c.value) == null ? void 0 : Ge.type) !== "calendar" && !((qe = c.value) != null && qe.slot) && ((Qe = (Je = c.value) == null ? void 0 : Je.options) == null ? void 0 : Qe.length) === 0 ? (u(), f("div", ba, [...l[2] || (l[2] = [
|
|
1766
|
+
$("p", null, "暂无选项", -1)
|
|
1767
|
+
])])) : x("", !0)
|
|
1768
1768
|
]),
|
|
1769
|
-
!
|
|
1770
|
-
|
|
1769
|
+
!t.autoConfirm && ((a = c.value) == null ? void 0 : a.type) !== "single" && ((i = c.value) == null ? void 0 : i.type) !== "tree-single" ? (u(), f("div", wa, [
|
|
1770
|
+
K(Q(we), {
|
|
1771
1771
|
block: "",
|
|
1772
|
-
onClick:
|
|
1772
|
+
onClick: o
|
|
1773
1773
|
}, {
|
|
1774
|
-
default:
|
|
1775
|
-
|
|
1774
|
+
default: Z(() => [...l[3] || (l[3] = [
|
|
1775
|
+
_e(" 重置 ", -1)
|
|
1776
1776
|
])]),
|
|
1777
1777
|
_: 1
|
|
1778
1778
|
}),
|
|
1779
|
-
|
|
1779
|
+
K(Q(we), {
|
|
1780
1780
|
type: "primary",
|
|
1781
1781
|
block: "",
|
|
1782
|
-
onClick:
|
|
1782
|
+
onClick: fe
|
|
1783
1783
|
}, {
|
|
1784
|
-
default:
|
|
1785
|
-
|
|
1784
|
+
default: Z(() => [
|
|
1785
|
+
_e(" 确定" + L(ce.value), 1)
|
|
1786
1786
|
]),
|
|
1787
1787
|
_: 1
|
|
1788
1788
|
})
|
|
1789
|
-
])) :
|
|
1790
|
-
], 512)) :
|
|
1789
|
+
])) : x("", !0)
|
|
1790
|
+
], 512)) : x("", !0)
|
|
1791
1791
|
];
|
|
1792
1792
|
}),
|
|
1793
1793
|
_: 3
|
|
1794
1794
|
})
|
|
1795
1795
|
]));
|
|
1796
1796
|
}
|
|
1797
|
-
}),
|
|
1798
|
-
e.component("RcSearchArea",
|
|
1799
|
-
},
|
|
1797
|
+
}), wt = /* @__PURE__ */ le($a, [["__scopeId", "data-v-dd3a69e1"]]), $t = (e) => {
|
|
1798
|
+
e.component("RcSearchArea", wt), e.component("rc-search-area", wt);
|
|
1799
|
+
}, xa = {
|
|
1800
|
+
key: 0,
|
|
1801
|
+
class: "rc-input__prepend"
|
|
1802
|
+
}, Da = { class: "rc-input__wrapper" }, Ca = {
|
|
1803
|
+
key: 0,
|
|
1804
|
+
class: "rc-input__prefix"
|
|
1805
|
+
}, Sa = {
|
|
1806
|
+
key: 1,
|
|
1807
|
+
class: "rc-input__suffix"
|
|
1808
|
+
}, Ia = {
|
|
1809
|
+
key: 0,
|
|
1810
|
+
class: "rc-input__suffix-inner"
|
|
1811
|
+
}, Ma = {
|
|
1812
|
+
key: 2,
|
|
1813
|
+
class: "rc-input__count"
|
|
1814
|
+
}, Ra = {
|
|
1815
|
+
key: 1,
|
|
1816
|
+
class: "rc-input__append"
|
|
1817
|
+
}, Va = /* @__PURE__ */ ae({
|
|
1818
|
+
__name: "index",
|
|
1819
|
+
props: {
|
|
1820
|
+
modelValue: { default: "" },
|
|
1821
|
+
type: { default: "text" },
|
|
1822
|
+
size: { default: "default" },
|
|
1823
|
+
placeholder: { default: "请输入" },
|
|
1824
|
+
disabled: { type: Boolean, default: !1 },
|
|
1825
|
+
clearable: { type: Boolean, default: !1 },
|
|
1826
|
+
showPassword: { type: Boolean, default: !1 },
|
|
1827
|
+
readonly: { type: Boolean, default: !1 },
|
|
1828
|
+
maxlength: { default: void 0 },
|
|
1829
|
+
minlength: { default: void 0 },
|
|
1830
|
+
showWordLimit: { type: Boolean, default: !1 },
|
|
1831
|
+
rows: { default: 2 },
|
|
1832
|
+
autosize: { type: [Boolean, Object], default: !1 },
|
|
1833
|
+
resize: { default: void 0 },
|
|
1834
|
+
prefixIcon: { default: "" },
|
|
1835
|
+
suffixIcon: { default: "" },
|
|
1836
|
+
autocomplete: { default: "off" },
|
|
1837
|
+
name: { default: void 0 },
|
|
1838
|
+
autofocus: { type: Boolean, default: !1 },
|
|
1839
|
+
form: { default: void 0 },
|
|
1840
|
+
tabindex: { default: void 0 },
|
|
1841
|
+
formatter: { type: Function, default: void 0 },
|
|
1842
|
+
parser: { type: Function, default: void 0 }
|
|
1843
|
+
},
|
|
1844
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "keydown", "mouseenter", "mouseleave", "compositionstart", "compositionupdate", "compositionend"],
|
|
1845
|
+
setup(e, { expose: r, emit: v }) {
|
|
1846
|
+
const t = e, y = v, _ = M(), g = M(t.modelValue ?? ""), p = M(!1), s = M(!1), m = M(!1);
|
|
1847
|
+
De(
|
|
1848
|
+
() => t.modelValue,
|
|
1849
|
+
(o) => {
|
|
1850
|
+
g.value = o ?? "";
|
|
1851
|
+
}
|
|
1852
|
+
);
|
|
1853
|
+
const E = T(() => t.type === "password" ? s.value ? "text" : "password" : t.type), D = T(() => {
|
|
1854
|
+
const o = String(g.value ?? "");
|
|
1855
|
+
return t.formatter && !m.value ? t.formatter(o) : o;
|
|
1856
|
+
}), k = T(() => {
|
|
1857
|
+
const o = g.value;
|
|
1858
|
+
return o !== "" && o !== null && o !== void 0;
|
|
1859
|
+
}), R = T(() => String(g.value ?? "").length), F = Ft(), C = T(() => !!(t.suffixIcon || t.showPassword && t.type === "password" || t.clearable && k.value && !t.disabled && !t.readonly || F.suffix)), c = T(() => {
|
|
1860
|
+
if (t.type !== "textarea") return {};
|
|
1861
|
+
const o = {};
|
|
1862
|
+
return t.autosize ? o.resize = "none" : t.resize !== void 0 ? o.resize = t.resize : o.resize = "vertical", o;
|
|
1863
|
+
});
|
|
1864
|
+
function ce(o) {
|
|
1865
|
+
let j = o.target.value;
|
|
1866
|
+
t.parser && !m.value && (j = t.parser(j)), g.value = j, y("update:modelValue", j), y("input", j), t.type === "textarea" && t.autosize && Be(() => {
|
|
1867
|
+
de();
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
function pe(o) {
|
|
1871
|
+
p.value = !0, y("focus", o);
|
|
1872
|
+
}
|
|
1873
|
+
function ye(o) {
|
|
1874
|
+
p.value = !1;
|
|
1875
|
+
const B = g.value;
|
|
1876
|
+
y("blur", o), y("change", B);
|
|
1877
|
+
}
|
|
1878
|
+
function H() {
|
|
1879
|
+
g.value = "", y("update:modelValue", ""), y("input", ""), y("change", ""), y("clear"), Be(() => {
|
|
1880
|
+
var o;
|
|
1881
|
+
(o = _.value) == null || o.focus();
|
|
1882
|
+
});
|
|
1883
|
+
}
|
|
1884
|
+
function N() {
|
|
1885
|
+
s.value = !s.value;
|
|
1886
|
+
}
|
|
1887
|
+
function O(o) {
|
|
1888
|
+
y("keydown", o), o.key === "Enter" && t.type !== "textarea" && y("change", g.value);
|
|
1889
|
+
}
|
|
1890
|
+
function Y(o) {
|
|
1891
|
+
y("mouseenter", o);
|
|
1892
|
+
}
|
|
1893
|
+
function W(o) {
|
|
1894
|
+
y("mouseleave", o);
|
|
1895
|
+
}
|
|
1896
|
+
function S(o) {
|
|
1897
|
+
m.value = !0, y("compositionstart", o);
|
|
1898
|
+
}
|
|
1899
|
+
function V(o) {
|
|
1900
|
+
y("compositionupdate", o);
|
|
1901
|
+
}
|
|
1902
|
+
function I(o) {
|
|
1903
|
+
m.value = !1, y("compositionend", o), o.target && ce(o);
|
|
1904
|
+
}
|
|
1905
|
+
function z() {
|
|
1906
|
+
var o;
|
|
1907
|
+
t.disabled || t.readonly || (o = _.value) == null || o.focus();
|
|
1908
|
+
}
|
|
1909
|
+
function de() {
|
|
1910
|
+
if (t.type !== "textarea" || !_.value) return;
|
|
1911
|
+
const o = _.value;
|
|
1912
|
+
if (t.autosize) {
|
|
1913
|
+
o.style.height = "auto";
|
|
1914
|
+
const B = o.scrollHeight;
|
|
1915
|
+
if (typeof t.autosize == "object") {
|
|
1916
|
+
const { minRows: j = 2, maxRows: fe } = t.autosize, ve = parseInt(getComputedStyle(o).lineHeight) || 20, $e = j * ve, n = fe ? fe * ve : 1 / 0;
|
|
1917
|
+
o.style.height = `${Math.min(Math.max(B, $e), n)}px`;
|
|
1918
|
+
} else
|
|
1919
|
+
o.style.height = `${B}px`;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
function ke() {
|
|
1923
|
+
var o;
|
|
1924
|
+
(o = _.value) == null || o.focus();
|
|
1925
|
+
}
|
|
1926
|
+
function be() {
|
|
1927
|
+
var o;
|
|
1928
|
+
(o = _.value) == null || o.blur();
|
|
1929
|
+
}
|
|
1930
|
+
function Ce() {
|
|
1931
|
+
_.value && "select" in _.value && _.value.select();
|
|
1932
|
+
}
|
|
1933
|
+
function b() {
|
|
1934
|
+
H();
|
|
1935
|
+
}
|
|
1936
|
+
return nt(() => {
|
|
1937
|
+
t.type === "textarea" && t.autosize && de();
|
|
1938
|
+
}), r({
|
|
1939
|
+
focus: ke,
|
|
1940
|
+
blur: be,
|
|
1941
|
+
select: Ce,
|
|
1942
|
+
clear: b,
|
|
1943
|
+
resizeTextarea: de,
|
|
1944
|
+
inputRef: _
|
|
1945
|
+
}), (o, B) => (u(), f("div", {
|
|
1946
|
+
class: G(["rc-input", [
|
|
1947
|
+
`rc-input--${e.size}`,
|
|
1948
|
+
{
|
|
1949
|
+
"is-disabled": e.disabled,
|
|
1950
|
+
"is-focused": p.value,
|
|
1951
|
+
"is-readonly": e.readonly,
|
|
1952
|
+
"rc-input--textarea": e.type === "textarea",
|
|
1953
|
+
"has-prepend": o.$slots.prepend,
|
|
1954
|
+
"has-append": o.$slots.append
|
|
1955
|
+
}
|
|
1956
|
+
]]),
|
|
1957
|
+
onClick: z
|
|
1958
|
+
}, [
|
|
1959
|
+
o.$slots.prepend ? (u(), f("div", xa, [
|
|
1960
|
+
q(o.$slots, "prepend", {}, void 0, !0)
|
|
1961
|
+
])) : x("", !0),
|
|
1962
|
+
$("div", Da, [
|
|
1963
|
+
e.prefixIcon || o.$slots.prefix ? (u(), f("div", Ca, [
|
|
1964
|
+
q(o.$slots, "prefix", {}, () => [
|
|
1965
|
+
e.prefixIcon ? (u(), te(Q(X), {
|
|
1966
|
+
key: 0,
|
|
1967
|
+
name: e.prefixIcon,
|
|
1968
|
+
class: "rc-input__prefix-icon"
|
|
1969
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
1970
|
+
], !0)
|
|
1971
|
+
])) : x("", !0),
|
|
1972
|
+
(u(), te(Yt(e.type === "textarea" ? "textarea" : "input"), {
|
|
1973
|
+
ref_key: "inputRef",
|
|
1974
|
+
ref: _,
|
|
1975
|
+
value: D.value,
|
|
1976
|
+
type: E.value,
|
|
1977
|
+
class: G(["rc-input__field", { "rc-input__field--textarea": e.type === "textarea" }]),
|
|
1978
|
+
placeholder: e.placeholder,
|
|
1979
|
+
disabled: e.disabled,
|
|
1980
|
+
readonly: e.readonly,
|
|
1981
|
+
maxlength: e.maxlength,
|
|
1982
|
+
minlength: e.minlength,
|
|
1983
|
+
rows: e.rows,
|
|
1984
|
+
autocomplete: e.autocomplete,
|
|
1985
|
+
name: e.name,
|
|
1986
|
+
autofocus: e.autofocus,
|
|
1987
|
+
form: e.form,
|
|
1988
|
+
tabindex: e.tabindex,
|
|
1989
|
+
style: ee(c.value),
|
|
1990
|
+
onInput: ce,
|
|
1991
|
+
onFocus: pe,
|
|
1992
|
+
onBlur: ye,
|
|
1993
|
+
onKeydown: O,
|
|
1994
|
+
onMouseenter: Y,
|
|
1995
|
+
onMouseleave: W,
|
|
1996
|
+
onCompositionstart: S,
|
|
1997
|
+
onCompositionupdate: V,
|
|
1998
|
+
onCompositionend: I
|
|
1999
|
+
}, null, 40, ["value", "type", "class", "placeholder", "disabled", "readonly", "maxlength", "minlength", "rows", "autocomplete", "name", "autofocus", "form", "tabindex", "style"])),
|
|
2000
|
+
C.value ? (u(), f("div", Sa, [
|
|
2001
|
+
o.$slots.suffix ? (u(), f("div", Ia, [
|
|
2002
|
+
q(o.$slots, "suffix", {}, void 0, !0)
|
|
2003
|
+
])) : x("", !0),
|
|
2004
|
+
e.showPassword && e.type === "password" && k.value ? (u(), f("button", {
|
|
2005
|
+
key: 1,
|
|
2006
|
+
type: "button",
|
|
2007
|
+
class: "rc-input__password-toggle",
|
|
2008
|
+
onClick: He(N, ["stop"])
|
|
2009
|
+
}, [
|
|
2010
|
+
K(Q(X), {
|
|
2011
|
+
color: s.value ? "#1677ff" : "#999",
|
|
2012
|
+
name: s.value ? "icon_view" : "icon_view-off"
|
|
2013
|
+
}, null, 8, ["color", "name"])
|
|
2014
|
+
])) : x("", !0),
|
|
2015
|
+
e.clearable && k.value && !e.disabled && !e.readonly ? (u(), f("button", {
|
|
2016
|
+
key: 2,
|
|
2017
|
+
type: "button",
|
|
2018
|
+
class: "rc-input__clear",
|
|
2019
|
+
onClick: He(H, ["stop"])
|
|
2020
|
+
}, [
|
|
2021
|
+
K(Q(X), {
|
|
2022
|
+
name: "icon_close",
|
|
2023
|
+
class: "rc-input__clear-icon"
|
|
2024
|
+
})
|
|
2025
|
+
])) : x("", !0),
|
|
2026
|
+
e.suffixIcon && !e.clearable && !e.showPassword ? (u(), te(Q(X), {
|
|
2027
|
+
key: 3,
|
|
2028
|
+
name: e.suffixIcon,
|
|
2029
|
+
class: "rc-input__suffix-icon"
|
|
2030
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
2031
|
+
])) : x("", !0),
|
|
2032
|
+
e.showWordLimit && e.maxlength ? (u(), f("span", Ma, L(R.value) + " / " + L(e.maxlength), 1)) : x("", !0)
|
|
2033
|
+
]),
|
|
2034
|
+
o.$slots.append ? (u(), f("div", Ra, [
|
|
2035
|
+
q(o.$slots, "append", {}, void 0, !0)
|
|
2036
|
+
])) : x("", !0)
|
|
2037
|
+
], 2));
|
|
2038
|
+
}
|
|
2039
|
+
}), ot = /* @__PURE__ */ le(Va, [["__scopeId", "data-v-df2c9b31"]]);
|
|
2040
|
+
ot.name = "rc-input";
|
|
2041
|
+
function xt(e) {
|
|
2042
|
+
return e.component(ot.name, ot), e;
|
|
2043
|
+
}
|
|
2044
|
+
const Ta = /* @__PURE__ */ ae({
|
|
2045
|
+
name: "rc-dropdown-menu",
|
|
2046
|
+
__name: "menu",
|
|
2047
|
+
props: {
|
|
2048
|
+
visible: { type: Boolean, default: void 0 },
|
|
2049
|
+
effect: { default: "light" },
|
|
2050
|
+
maxHeight: { default: "" }
|
|
2051
|
+
},
|
|
2052
|
+
emits: ["mouseenter", "mouseleave"],
|
|
2053
|
+
setup(e, { expose: r, emit: v }) {
|
|
2054
|
+
const t = e, y = M(), _ = T(() => t.visible === void 0 ? !0 : t.visible), g = T(() => t.visible !== void 0), p = T(() => {
|
|
2055
|
+
const s = {};
|
|
2056
|
+
return t.maxHeight && (s.maxHeight = typeof t.maxHeight == "number" ? `${t.maxHeight}px` : t.maxHeight, s.overflowY = "auto"), s;
|
|
2057
|
+
});
|
|
2058
|
+
return r({
|
|
2059
|
+
menuRef: y
|
|
2060
|
+
}), (s, m) => g.value ? (u(), te(ut, {
|
|
2061
|
+
key: 0,
|
|
2062
|
+
to: "body"
|
|
2063
|
+
}, [
|
|
2064
|
+
K(Ee, { name: "rc-dropdown-fade" }, {
|
|
2065
|
+
default: Z(() => [
|
|
2066
|
+
_.value ? (u(), f("ul", {
|
|
2067
|
+
key: 0,
|
|
2068
|
+
ref_key: "menuRef",
|
|
2069
|
+
ref: y,
|
|
2070
|
+
class: G(["rc-dropdown-menu", [`rc-dropdown-menu--${e.effect}`]]),
|
|
2071
|
+
style: ee(p.value),
|
|
2072
|
+
onClick: m[0] || (m[0] = He(() => {
|
|
2073
|
+
}, ["stop"])),
|
|
2074
|
+
onMouseenter: m[1] || (m[1] = (E) => s.$emit("mouseenter", E)),
|
|
2075
|
+
onMouseleave: m[2] || (m[2] = (E) => s.$emit("mouseleave", E))
|
|
2076
|
+
}, [
|
|
2077
|
+
q(s.$slots, "default", {}, void 0, !0)
|
|
2078
|
+
], 38)) : x("", !0)
|
|
2079
|
+
]),
|
|
2080
|
+
_: 3
|
|
2081
|
+
})
|
|
2082
|
+
])) : (u(), f("ul", {
|
|
2083
|
+
key: 1,
|
|
2084
|
+
ref_key: "menuRef",
|
|
2085
|
+
ref: y,
|
|
2086
|
+
class: G(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${e.effect}`]]),
|
|
2087
|
+
style: ee(p.value),
|
|
2088
|
+
onClick: m[3] || (m[3] = He(() => {
|
|
2089
|
+
}, ["stop"])),
|
|
2090
|
+
onMouseenter: m[4] || (m[4] = (E) => s.$emit("mouseenter", E)),
|
|
2091
|
+
onMouseleave: m[5] || (m[5] = (E) => s.$emit("mouseleave", E))
|
|
2092
|
+
}, [
|
|
2093
|
+
q(s.$slots, "default", {}, void 0, !0)
|
|
2094
|
+
], 38));
|
|
2095
|
+
}
|
|
2096
|
+
}), tt = /* @__PURE__ */ le(Ta, [["__scopeId", "data-v-288e2690"]]), Ea = /* @__PURE__ */ ae({
|
|
2097
|
+
name: "rc-dropdown",
|
|
2098
|
+
__name: "index",
|
|
2099
|
+
props: {
|
|
2100
|
+
placement: { default: "bottom" },
|
|
2101
|
+
trigger: { default: "hover" },
|
|
2102
|
+
disabled: { type: Boolean, default: !1 },
|
|
2103
|
+
effect: { default: "light" },
|
|
2104
|
+
maxHeight: { default: "" },
|
|
2105
|
+
hideOnClick: { type: Boolean, default: !0 },
|
|
2106
|
+
showTimeout: { default: 150 },
|
|
2107
|
+
hideTimeout: { default: 150 }
|
|
2108
|
+
},
|
|
2109
|
+
emits: ["command", "visible-change"],
|
|
2110
|
+
setup(e, { expose: r, emit: v }) {
|
|
2111
|
+
const t = e, y = v, _ = M(), g = M(), p = M(!1);
|
|
2112
|
+
let s = null, m = null;
|
|
2113
|
+
function E(Y) {
|
|
2114
|
+
t.hideOnClick && (p.value = !1), Y !== void 0 && y("command", Y);
|
|
2115
|
+
}
|
|
2116
|
+
Ve("handleItemClick", E);
|
|
2117
|
+
function D() {
|
|
2118
|
+
t.disabled || (s && (clearTimeout(s), s = null), m && (clearTimeout(m), m = null), s = setTimeout(() => {
|
|
2119
|
+
p.value = !0, requestAnimationFrame(() => {
|
|
2120
|
+
Be(() => {
|
|
2121
|
+
H();
|
|
2122
|
+
});
|
|
2123
|
+
});
|
|
2124
|
+
}, t.showTimeout));
|
|
2125
|
+
}
|
|
2126
|
+
function k() {
|
|
2127
|
+
t.trigger === "hover" && c.value || (m && (clearTimeout(m), m = null), s && (clearTimeout(s), s = null), m = setTimeout(() => {
|
|
2128
|
+
p.value = !1, c.value = !1;
|
|
2129
|
+
}, t.hideTimeout));
|
|
2130
|
+
}
|
|
2131
|
+
function R() {
|
|
2132
|
+
t.disabled || (p.value ? k() : D());
|
|
2133
|
+
}
|
|
2134
|
+
function F() {
|
|
2135
|
+
t.trigger === "hover" && !t.disabled && D();
|
|
2136
|
+
}
|
|
2137
|
+
function C() {
|
|
2138
|
+
t.trigger === "hover" && setTimeout(() => {
|
|
2139
|
+
c.value || k();
|
|
2140
|
+
}, 50);
|
|
2141
|
+
}
|
|
2142
|
+
const c = M(!1);
|
|
2143
|
+
function ce() {
|
|
2144
|
+
t.trigger === "hover" && (c.value = !0, s && (clearTimeout(s), s = null), m && (clearTimeout(m), m = null));
|
|
2145
|
+
}
|
|
2146
|
+
function pe() {
|
|
2147
|
+
t.trigger === "hover" && (c.value = !1, k());
|
|
2148
|
+
}
|
|
2149
|
+
function ye(Y) {
|
|
2150
|
+
t.trigger === "click" && !t.disabled && (Y.stopPropagation(), R());
|
|
2151
|
+
}
|
|
2152
|
+
function H() {
|
|
2153
|
+
var be;
|
|
2154
|
+
if (!_.value || !((be = g.value) != null && be.menuRef)) return;
|
|
2155
|
+
const Y = _.value, W = g.value.menuRef;
|
|
2156
|
+
if (!Y || !W) return;
|
|
2157
|
+
const S = Y.getBoundingClientRect(), V = W.getBoundingClientRect();
|
|
2158
|
+
if (V.width === 0 || V.height === 0) {
|
|
2159
|
+
setTimeout(() => {
|
|
2160
|
+
p.value && H();
|
|
2161
|
+
}, 10);
|
|
2162
|
+
return;
|
|
2163
|
+
}
|
|
2164
|
+
let I = 0, z = 0;
|
|
2165
|
+
switch (t.placement) {
|
|
2166
|
+
case "top":
|
|
2167
|
+
I = S.top - V.height, z = S.left;
|
|
2168
|
+
break;
|
|
2169
|
+
case "top-start":
|
|
2170
|
+
I = S.top - V.height, z = S.left;
|
|
2171
|
+
break;
|
|
2172
|
+
case "top-end":
|
|
2173
|
+
I = S.top - V.height, z = S.left + S.width - V.width;
|
|
2174
|
+
break;
|
|
2175
|
+
case "bottom":
|
|
2176
|
+
I = S.bottom, z = S.left + (S.width - V.width) / 2;
|
|
2177
|
+
break;
|
|
2178
|
+
case "bottom-start":
|
|
2179
|
+
I = S.bottom, z = S.left;
|
|
2180
|
+
break;
|
|
2181
|
+
case "bottom-end":
|
|
2182
|
+
I = S.bottom, z = S.left + S.width - V.width;
|
|
2183
|
+
break;
|
|
2184
|
+
case "left":
|
|
2185
|
+
I = S.top + (S.height - V.height) / 2, z = S.left - V.width;
|
|
2186
|
+
break;
|
|
2187
|
+
case "left-start":
|
|
2188
|
+
I = S.top, z = S.left - V.width;
|
|
2189
|
+
break;
|
|
2190
|
+
case "left-end":
|
|
2191
|
+
I = S.top + S.height - V.height, z = S.left - V.width;
|
|
2192
|
+
break;
|
|
2193
|
+
case "right":
|
|
2194
|
+
I = S.top + (S.height - V.height) / 2, z = S.right;
|
|
2195
|
+
break;
|
|
2196
|
+
case "right-start":
|
|
2197
|
+
I = S.top, z = S.right;
|
|
2198
|
+
break;
|
|
2199
|
+
case "right-end":
|
|
2200
|
+
I = S.top + S.height - V.height, z = S.right;
|
|
2201
|
+
break;
|
|
2202
|
+
}
|
|
2203
|
+
const de = window.innerWidth, ke = window.innerHeight;
|
|
2204
|
+
z < 0 && (z = 8), z + V.width > de && (z = de - V.width - 8), I < 0 && (I = 8), I + V.height > ke && (I = ke - V.height - 8), W.style.top = `${I}px`, W.style.left = `${z}px`, W.style.position = "fixed", W.style.visibility = "visible", W.style.display = "block";
|
|
2205
|
+
}
|
|
2206
|
+
De(p, (Y) => {
|
|
2207
|
+
y("visible-change", Y), Y ? (requestAnimationFrame(() => {
|
|
2208
|
+
Be(() => {
|
|
2209
|
+
H();
|
|
2210
|
+
});
|
|
2211
|
+
}), document.addEventListener("click", N)) : document.removeEventListener("click", N);
|
|
2212
|
+
});
|
|
2213
|
+
function N(Y) {
|
|
2214
|
+
if (t.trigger === "click" && !t.disabled) {
|
|
2215
|
+
const W = Y.target;
|
|
2216
|
+
_.value && !_.value.contains(W) && k();
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
function O() {
|
|
2220
|
+
p.value && H();
|
|
2221
|
+
}
|
|
2222
|
+
return nt(() => {
|
|
2223
|
+
window.addEventListener("resize", O), window.addEventListener("scroll", O, !0);
|
|
2224
|
+
}), at(() => {
|
|
2225
|
+
s && clearTimeout(s), m && clearTimeout(m), document.removeEventListener("click", N), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
|
|
2226
|
+
}), r({
|
|
2227
|
+
show: D,
|
|
2228
|
+
hide: k,
|
|
2229
|
+
toggle: R,
|
|
2230
|
+
visible: p
|
|
2231
|
+
}), (Y, W) => (u(), f("div", {
|
|
2232
|
+
ref_key: "dropdownRef",
|
|
2233
|
+
ref: _,
|
|
2234
|
+
class: G(["rc-dropdown", { "is-disabled": e.disabled }]),
|
|
2235
|
+
onMouseenter: F,
|
|
2236
|
+
onMouseleave: C,
|
|
2237
|
+
onClick: ye
|
|
2238
|
+
}, [
|
|
2239
|
+
q(Y.$slots, "default", {}, void 0, !0),
|
|
2240
|
+
K(tt, {
|
|
2241
|
+
ref_key: "menuRef",
|
|
2242
|
+
ref: g,
|
|
2243
|
+
visible: p.value,
|
|
2244
|
+
effect: e.effect,
|
|
2245
|
+
"max-height": e.maxHeight,
|
|
2246
|
+
onMouseenter: ce,
|
|
2247
|
+
onMouseleave: pe
|
|
2248
|
+
}, {
|
|
2249
|
+
default: Z(() => [
|
|
2250
|
+
q(Y.$slots, "dropdown", {}, void 0, !0)
|
|
2251
|
+
]),
|
|
2252
|
+
_: 3
|
|
2253
|
+
}, 8, ["visible", "effect", "max-height"])
|
|
2254
|
+
], 34));
|
|
2255
|
+
}
|
|
2256
|
+
}), rt = /* @__PURE__ */ le(Ea, [["__scopeId", "data-v-30feb4c4"]]), Ba = { class: "rc-dropdown-item__text" }, Aa = /* @__PURE__ */ ae({
|
|
2257
|
+
name: "rc-dropdown-item",
|
|
2258
|
+
__name: "item",
|
|
2259
|
+
props: {
|
|
2260
|
+
command: { default: void 0 },
|
|
2261
|
+
disabled: { type: Boolean, default: !1 },
|
|
2262
|
+
divided: { type: Boolean, default: !1 },
|
|
2263
|
+
icon: { default: "" }
|
|
2264
|
+
},
|
|
2265
|
+
setup(e) {
|
|
2266
|
+
const r = e, v = Ie("handleItemClick", () => {
|
|
2267
|
+
});
|
|
2268
|
+
function t(y) {
|
|
2269
|
+
if (r.disabled) {
|
|
2270
|
+
y.stopPropagation();
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2273
|
+
v(r.command);
|
|
2274
|
+
}
|
|
2275
|
+
return (y, _) => (u(), f("li", {
|
|
2276
|
+
class: G(["rc-dropdown-item", {
|
|
2277
|
+
"is-disabled": e.disabled,
|
|
2278
|
+
"is-divided": e.divided
|
|
2279
|
+
}]),
|
|
2280
|
+
onClick: t
|
|
2281
|
+
}, [
|
|
2282
|
+
e.icon ? (u(), te(X, {
|
|
2283
|
+
key: 0,
|
|
2284
|
+
name: e.icon,
|
|
2285
|
+
class: "rc-dropdown-item__icon"
|
|
2286
|
+
}, null, 8, ["name"])) : x("", !0),
|
|
2287
|
+
$("span", Ba, [
|
|
2288
|
+
q(y.$slots, "default", {}, void 0, !0)
|
|
2289
|
+
])
|
|
2290
|
+
], 2));
|
|
2291
|
+
}
|
|
2292
|
+
}), st = /* @__PURE__ */ le(Aa, [["__scopeId", "data-v-7c739fdf"]]);
|
|
2293
|
+
rt.name = "rc-dropdown";
|
|
2294
|
+
tt.name = "rc-dropdown-menu";
|
|
2295
|
+
st.name = "rc-dropdown-item";
|
|
2296
|
+
function Dt(e) {
|
|
2297
|
+
return e.component(rt.name, rt), e.component(tt.name, tt), e.component(st.name, st), e;
|
|
2298
|
+
}
|
|
2299
|
+
const it = Symbol("RECYCLE_UI_CONFIG"), Mt = {
|
|
1800
2300
|
prefix: "rc",
|
|
1801
2301
|
autoRegister: !0,
|
|
1802
|
-
provideKey:
|
|
2302
|
+
provideKey: it,
|
|
1803
2303
|
// 预留主题/其他全局配置
|
|
1804
2304
|
theme: {},
|
|
1805
2305
|
// IconFont 默认配置(可在 app.use 时覆盖)
|
|
1806
|
-
iconCssUrl: "//at.alicdn.com/t/c/
|
|
2306
|
+
iconCssUrl: "//at.alicdn.com/t/c/font_4252799_2vm5jrrzfvq.css",
|
|
1807
2307
|
iconClass: "iconfont"
|
|
1808
2308
|
};
|
|
1809
|
-
function
|
|
1810
|
-
r.autoRegister !== !1 && (typeof
|
|
2309
|
+
function Fa(e, r) {
|
|
2310
|
+
r.autoRegister !== !1 && (typeof ft == "function" && ft(e), typeof vt == "function" && vt(e), typeof mt == "function" && mt(e), typeof yt == "function" && yt(e), typeof gt == "function" && gt(e), typeof ht == "function" && ht(e), typeof $t == "function" && $t(e), typeof bt == "function" && bt(e), typeof _t == "function" && _t(e), typeof xt == "function" && xt(e), typeof Dt == "function" && Dt(e));
|
|
1811
2311
|
}
|
|
1812
|
-
const
|
|
1813
|
-
const
|
|
1814
|
-
if (e.provide(
|
|
1815
|
-
const
|
|
1816
|
-
if (!document.head.querySelector(
|
|
1817
|
-
const
|
|
1818
|
-
|
|
2312
|
+
const Rt = (e, r) => {
|
|
2313
|
+
const v = { ...Mt, ...r || {} };
|
|
2314
|
+
if (e.provide(v.provideKey ?? it, v), e.config.globalProperties.$recycleUI = v, typeof window < "u" && v.iconCssUrl) {
|
|
2315
|
+
const t = `link[rel="stylesheet"][data-rcui-icon="true"][href="${v.iconCssUrl}"]`;
|
|
2316
|
+
if (!document.head.querySelector(t)) {
|
|
2317
|
+
const _ = document.createElement("link");
|
|
2318
|
+
_.rel = "stylesheet", _.href = v.iconCssUrl, _.setAttribute("data-rcui-icon", "true"), document.head.appendChild(_);
|
|
1819
2319
|
}
|
|
1820
2320
|
}
|
|
1821
|
-
return
|
|
1822
|
-
},
|
|
1823
|
-
function
|
|
2321
|
+
return Fa(e, v), e;
|
|
2322
|
+
}, Na = { install: Rt };
|
|
2323
|
+
function Wa(e) {
|
|
1824
2324
|
return {
|
|
1825
2325
|
install(r) {
|
|
1826
|
-
|
|
2326
|
+
Rt(r, e);
|
|
1827
2327
|
}
|
|
1828
2328
|
};
|
|
1829
2329
|
}
|
|
1830
2330
|
export {
|
|
1831
|
-
|
|
1832
|
-
|
|
2331
|
+
it as RECYCLE_UI_SYMBOL,
|
|
2332
|
+
we as RcButton,
|
|
1833
2333
|
We as RcCalendar,
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
2334
|
+
Ze as RcCard,
|
|
2335
|
+
za as RcDescriptions,
|
|
2336
|
+
La as RcDescriptionsItem,
|
|
2337
|
+
rt as RcDropdown,
|
|
2338
|
+
st as RcDropdownItem,
|
|
2339
|
+
tt as RcDropdownMenu,
|
|
2340
|
+
X as RcIcon,
|
|
2341
|
+
ot as RcInput,
|
|
2342
|
+
Ne as RcPopup,
|
|
2343
|
+
wt as RcSearchArea,
|
|
2344
|
+
et as RcToast,
|
|
2345
|
+
Wa as createRecycleUI,
|
|
2346
|
+
Na as default,
|
|
2347
|
+
Mt as defaultRecycleUIConfig,
|
|
2348
|
+
dn as hideToast,
|
|
2349
|
+
Rt as install,
|
|
2350
|
+
ft as installButton,
|
|
2351
|
+
bt as installCalendar,
|
|
2352
|
+
mt as installCard,
|
|
2353
|
+
vt as installDescriptions,
|
|
2354
|
+
Dt as installDropdown,
|
|
2355
|
+
gt as installIcon,
|
|
2356
|
+
xt as installInput,
|
|
2357
|
+
ht as installMessage,
|
|
2358
|
+
_t as installPopup,
|
|
2359
|
+
$t as installSearchArea,
|
|
2360
|
+
hn as message,
|
|
2361
|
+
za as rcDescriptions,
|
|
2362
|
+
La as rcDescriptionsItem,
|
|
2363
|
+
Pa as showToast
|
|
1858
2364
|
};
|
|
1859
2365
|
//# sourceMappingURL=index.mjs.map
|