@nhdropshipping/y-components 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/yinput.vue.d.ts +8 -3
- package/dist/components/yinput.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +946 -935
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as be, computed as
|
|
1
|
+
import { defineComponent as be, computed as j, createElementBlock as r, openBlock as i, normalizeClass as E, createElementVNode as l, renderSlot as ce, Fragment as ue, renderList as pe, createCommentVNode as R, toDisplayString as le, ref as K, normalizeStyle as we, watch as ae, nextTick as he, onMounted as Se, onUnmounted as Te, resolveComponent as Ve, createVNode as de, Transition as De, withCtx as ve, createTextVNode as Ce, createBlock as Be, withKeys as xe, withModifiers as Q, withDirectives as Ee, vModelText as tt, Teleport as Ae, vShow as He, provide as nt, reactive as lt, TransitionGroup as ot, resolveDynamicComponent as at, onBeforeUnmount as st, render as Ze } from "vue";
|
|
2
2
|
const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "content" }, ut = {
|
|
3
3
|
key: 1,
|
|
4
4
|
class: "y-btn-group",
|
|
@@ -28,16 +28,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
28
28
|
groupItems: { default: void 0 }
|
|
29
29
|
},
|
|
30
30
|
emits: ["click", "group-click"],
|
|
31
|
-
setup(e, { emit:
|
|
32
|
-
const t = e, n =
|
|
33
|
-
function y(
|
|
31
|
+
setup(e, { emit: x }) {
|
|
32
|
+
const t = e, n = x;
|
|
33
|
+
function y(k) {
|
|
34
34
|
if (t.disabled || t.loading) {
|
|
35
|
-
|
|
35
|
+
k.preventDefault(), k.stopPropagation();
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
n("click",
|
|
38
|
+
n("click", k);
|
|
39
39
|
}
|
|
40
|
-
const d =
|
|
40
|
+
const d = j(() => {
|
|
41
41
|
switch (t.groupPosition) {
|
|
42
42
|
case "start":
|
|
43
43
|
return "group-pos-start";
|
|
@@ -48,24 +48,24 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
48
48
|
default:
|
|
49
49
|
return "group-pos-single";
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
52
|
-
function L(
|
|
53
|
-
if (t.disabled || t.loading ||
|
|
54
|
-
|
|
51
|
+
}), f = j(() => Array.isArray(t.groupItems) && t.groupItems.length > 0);
|
|
52
|
+
function L(k, S) {
|
|
53
|
+
if (t.disabled || t.loading || k.disabled || k.loading) {
|
|
54
|
+
S.preventDefault(), S.stopPropagation();
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
n("group-click",
|
|
57
|
+
n("group-click", k.value, S);
|
|
58
58
|
}
|
|
59
|
-
return (
|
|
60
|
-
(i(!0), r(ue, null, pe(e.groupItems, (g,
|
|
59
|
+
return (k, S) => f.value ? (i(), r("div", ut, [
|
|
60
|
+
(i(!0), r(ue, null, pe(e.groupItems, (g, w) => {
|
|
61
61
|
var c;
|
|
62
62
|
return i(), r("button", {
|
|
63
|
-
key: g.value ??
|
|
63
|
+
key: g.value ?? w,
|
|
64
64
|
class: E(["y-btn", [
|
|
65
65
|
`y-btn--${g.variant ?? e.variant}`,
|
|
66
66
|
`y-btn--${g.size ?? e.size}`,
|
|
67
67
|
"is-grouped",
|
|
68
|
-
|
|
68
|
+
w === 0 ? "group-pos-start" : w === (((c = e.groupItems) == null ? void 0 : c.length) || 0) - 1 ? "group-pos-end" : "group-pos-middle",
|
|
69
69
|
{ "is-loading": g.loading || e.loading }
|
|
70
70
|
]]),
|
|
71
71
|
type: e.htmlType,
|
|
@@ -73,16 +73,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
73
73
|
"aria-busy": g.loading || e.loading ? "true" : "false",
|
|
74
74
|
"aria-disabled": (g.disabled ?? !1) || e.disabled || e.loading || g.loading ? "true" : "false",
|
|
75
75
|
"aria-label": g.ariaLabel || g.label,
|
|
76
|
-
onClick: (
|
|
76
|
+
onClick: (M) => L(g, M)
|
|
77
77
|
}, [
|
|
78
78
|
l("span", dt, [
|
|
79
|
-
g.icon === "chevron-left" ? (i(), r("svg", ft, [...
|
|
79
|
+
g.icon === "chevron-left" ? (i(), r("svg", ft, [...S[0] || (S[0] = [
|
|
80
80
|
l("path", {
|
|
81
81
|
"fill-rule": "evenodd",
|
|
82
82
|
d: "M12.78 15.22a.75.75 0 01-1.06 0l-5-5a.75.75 0 010-1.06l5-5a.75.75 0 111.06 1.06L8.81 10l3.97 3.97a.75.75 0 010 1.06z",
|
|
83
83
|
"clip-rule": "evenodd"
|
|
84
84
|
}, null, -1)
|
|
85
|
-
])])) : g.icon === "chevron-right" ? (i(), r("svg", vt, [...
|
|
85
|
+
])])) : g.icon === "chevron-right" ? (i(), r("svg", vt, [...S[1] || (S[1] = [
|
|
86
86
|
l("path", {
|
|
87
87
|
"fill-rule": "evenodd",
|
|
88
88
|
d: "M7.22 4.78a.75.75 0 011.06 0l5 5a.75.75 0 010 1.06l-5 5a.75.75 0 11-1.06-1.06L11.19 10 7.22 6.03a.75.75 0 010-1.06z",
|
|
@@ -109,16 +109,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
109
109
|
onClick: y
|
|
110
110
|
}, [
|
|
111
111
|
l("span", rt, [
|
|
112
|
-
ce(
|
|
112
|
+
ce(k.$slots, "default", {}, void 0, !0)
|
|
113
113
|
])
|
|
114
114
|
], 10, it));
|
|
115
115
|
}
|
|
116
|
-
}), ke = (e,
|
|
116
|
+
}), ke = (e, x) => {
|
|
117
117
|
const t = e.__vccOpts || e;
|
|
118
|
-
for (const [n, y] of
|
|
118
|
+
for (const [n, y] of x)
|
|
119
119
|
t[n] = y;
|
|
120
120
|
return t;
|
|
121
|
-
},
|
|
121
|
+
}, Fe = /* @__PURE__ */ ke(pt, [["__scopeId", "data-v-0c27d1bc"]]), yt = ["id", "name", "type", "placeholder", "autocomplete", "inputmode", "disabled", "required", "value"], gt = /* @__PURE__ */ be({
|
|
122
122
|
__name: "yinput",
|
|
123
123
|
props: {
|
|
124
124
|
modelValue: { default: "" },
|
|
@@ -132,20 +132,29 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
132
132
|
required: { type: Boolean, default: !1 },
|
|
133
133
|
block: { type: Boolean, default: !1 },
|
|
134
134
|
size: { default: "medium" },
|
|
135
|
-
width: { default: "200px" }
|
|
135
|
+
width: { default: "200px" },
|
|
136
|
+
clearOnFocus: { type: Boolean, default: !1 }
|
|
136
137
|
},
|
|
137
138
|
emits: ["update:modelValue"],
|
|
138
|
-
setup(e, { emit:
|
|
139
|
-
const t =
|
|
140
|
-
function
|
|
141
|
-
const
|
|
142
|
-
|
|
139
|
+
setup(e, { emit: x }) {
|
|
140
|
+
const t = e, n = x, y = K(null), d = K(""), f = K(!1);
|
|
141
|
+
function L(g) {
|
|
142
|
+
const w = g.target;
|
|
143
|
+
f.value = !0, n("update:modelValue", w.value);
|
|
144
|
+
}
|
|
145
|
+
function k() {
|
|
146
|
+
t.clearOnFocus && (d.value = t.modelValue || "", f.value = !1, n("update:modelValue", ""));
|
|
147
|
+
}
|
|
148
|
+
function S() {
|
|
149
|
+
t.clearOnFocus && !f.value && (!t.modelValue || t.modelValue === "") && n("update:modelValue", d.value);
|
|
143
150
|
}
|
|
144
|
-
return (
|
|
151
|
+
return (g, w) => (i(), r("div", {
|
|
145
152
|
class: E(["y-input-wrap", { "is-block": e.block }]),
|
|
146
153
|
style: we({ width: e.width })
|
|
147
154
|
}, [
|
|
148
155
|
l("input", {
|
|
156
|
+
ref_key: "inputRef",
|
|
157
|
+
ref: y,
|
|
149
158
|
class: E(["y-input", `y-input--${e.size}`]),
|
|
150
159
|
id: e.id,
|
|
151
160
|
name: e.name,
|
|
@@ -156,11 +165,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
156
165
|
disabled: e.disabled,
|
|
157
166
|
required: e.required,
|
|
158
167
|
value: e.modelValue,
|
|
159
|
-
onInput:
|
|
168
|
+
onInput: L,
|
|
169
|
+
onFocus: k,
|
|
170
|
+
onBlur: S
|
|
160
171
|
}, null, 42, yt)
|
|
161
172
|
], 6));
|
|
162
173
|
}
|
|
163
|
-
}), Qe = /* @__PURE__ */ ke(gt, [["__scopeId", "data-v-
|
|
174
|
+
}), Qe = /* @__PURE__ */ ke(gt, [["__scopeId", "data-v-e9ee2292"]]), mt = {
|
|
164
175
|
key: 0,
|
|
165
176
|
class: "bulk-bar"
|
|
166
177
|
}, wt = { class: "bulk-left" }, bt = { class: "bulk-actions" }, kt = { class: "card" }, xt = { class: "table" }, Dt = {
|
|
@@ -206,14 +217,14 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
206
217
|
stickyHeader: { type: Boolean, default: !1 }
|
|
207
218
|
},
|
|
208
219
|
emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change"],
|
|
209
|
-
setup(e, { emit:
|
|
210
|
-
const t = e, n =
|
|
220
|
+
setup(e, { emit: x }) {
|
|
221
|
+
const t = e, n = x, y = K(t.currentPage || 1), d = K(t.pageSize), f = K([]), L = K("none"), k = K(), S = K(), g = K(), w = K(), c = K([]), M = K(), q = K({
|
|
211
222
|
show: !1,
|
|
212
223
|
thumbHeight: 40,
|
|
213
224
|
thumbTop: 0
|
|
214
225
|
});
|
|
215
|
-
let J = !1,
|
|
216
|
-
const T =
|
|
226
|
+
let J = !1, F = 0, D = 0;
|
|
227
|
+
const T = K(0), I = j(() => {
|
|
217
228
|
if (!t.searchKeyword || !t.searchFields.length)
|
|
218
229
|
return t.data;
|
|
219
230
|
const C = t.searchKeyword.toLowerCase();
|
|
@@ -221,38 +232,38 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
221
232
|
const B = fe($, z);
|
|
222
233
|
return String(B).toLowerCase().includes(C);
|
|
223
234
|
}));
|
|
224
|
-
}),
|
|
235
|
+
}), H = j(() => (t.pagination, I.value)), O = j(() => {
|
|
225
236
|
if (!t.selectable) return !1;
|
|
226
|
-
const C =
|
|
227
|
-
return C.length > 0 && C.every(($) =>
|
|
228
|
-
}), ie =
|
|
237
|
+
const C = H.value.map(($, z) => G($, z));
|
|
238
|
+
return C.length > 0 && C.every(($) => f.value.includes($));
|
|
239
|
+
}), ie = j(() => {
|
|
229
240
|
const C = [];
|
|
230
241
|
let $ = t.selectable ? 40 : 0;
|
|
231
242
|
for (let z = 0; z < t.columns.length; z++) {
|
|
232
243
|
const B = t.columns[z];
|
|
233
244
|
if (B.fixed === "left") {
|
|
234
|
-
let
|
|
245
|
+
let Y = 80;
|
|
235
246
|
if (B.width) {
|
|
236
247
|
const W = parseFloat(B.width);
|
|
237
|
-
|
|
248
|
+
Y = isNaN(W) ? 80 : W;
|
|
238
249
|
} else if (c.value[z]) {
|
|
239
250
|
const W = parseFloat(c.value[z]);
|
|
240
|
-
|
|
251
|
+
Y = isNaN(W) ? 80 : W;
|
|
241
252
|
}
|
|
242
|
-
C.push($), $ +=
|
|
253
|
+
C.push($), $ += Y;
|
|
243
254
|
}
|
|
244
255
|
}
|
|
245
256
|
return C;
|
|
246
|
-
}), X =
|
|
257
|
+
}), X = j(() => {
|
|
247
258
|
const C = [];
|
|
248
259
|
let $ = 0;
|
|
249
260
|
const z = [];
|
|
250
261
|
for (let B = t.columns.length - 1; B >= 0; B--) {
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
262
|
+
const Y = t.columns[B];
|
|
263
|
+
if (Y.fixed === "right") {
|
|
253
264
|
let W = 80;
|
|
254
|
-
if (
|
|
255
|
-
const ne = parseFloat(
|
|
265
|
+
if (Y.width) {
|
|
266
|
+
const ne = parseFloat(Y.width);
|
|
256
267
|
W = isNaN(ne) ? 80 : ne;
|
|
257
268
|
} else if (c.value[B]) {
|
|
258
269
|
const ne = parseFloat(c.value[B]);
|
|
@@ -288,14 +299,14 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
288
299
|
const z = [];
|
|
289
300
|
return C.align && z.push(`text-${C.align}`), C.fixed === "right" && (z.push("col-fixed-right"), $ && z.push("col-fixed-right-header")), C.fixed === "left" && (z.push("col-fixed-left"), $ && z.push("col-fixed-left-header")), z.join(" ");
|
|
290
301
|
}
|
|
291
|
-
function
|
|
302
|
+
function A(C, $, z) {
|
|
292
303
|
const B = {};
|
|
293
304
|
if (C.width ? (B.width = C.width, B.minWidth = C.width, B.maxWidth = C.width) : (B.width = "auto", B.minWidth = "80px", B.maxWidth = "none"), C.fixed === "left") {
|
|
294
|
-
const
|
|
295
|
-
B.left = `${W}px`, B.zIndex = z ? `${10 +
|
|
305
|
+
const Y = ye($, "left"), W = ie.value[Y] || 0;
|
|
306
|
+
B.left = `${W}px`, B.zIndex = z ? `${10 + Y}` : `${5 + Y}`;
|
|
296
307
|
} else if (C.fixed === "right") {
|
|
297
|
-
const
|
|
298
|
-
z ? B.right = `${W - 3}px` : B.right = `${W}px`, B.zIndex = z ? `${10 +
|
|
308
|
+
const Y = ye($, "right"), W = X.value[Y] || 0;
|
|
309
|
+
z ? B.right = `${W - 3}px` : B.right = `${W}px`, B.zIndex = z ? `${10 + Y}` : `${5 + Y}`;
|
|
299
310
|
}
|
|
300
311
|
return B;
|
|
301
312
|
}
|
|
@@ -304,72 +315,72 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
304
315
|
return $.formatter ? $.formatter(z, C) : z || "";
|
|
305
316
|
}
|
|
306
317
|
function U(C) {
|
|
307
|
-
|
|
318
|
+
f.value.includes(C) ? f.value = f.value.filter(($) => $ !== C) : f.value = [...f.value, C], n("select", f.value), n("update:selectedItems", f.value);
|
|
308
319
|
}
|
|
309
320
|
function Z() {
|
|
310
|
-
const C =
|
|
311
|
-
if (C.every(($) =>
|
|
312
|
-
|
|
321
|
+
const C = H.value.map(($, z) => G($, z));
|
|
322
|
+
if (C.every(($) => f.value.includes($)))
|
|
323
|
+
f.value = f.value.filter(($) => !C.includes($));
|
|
313
324
|
else {
|
|
314
|
-
const $ = /* @__PURE__ */ new Set([...
|
|
315
|
-
|
|
325
|
+
const $ = /* @__PURE__ */ new Set([...f.value, ...C]);
|
|
326
|
+
f.value = Array.from($);
|
|
316
327
|
}
|
|
317
|
-
n("select",
|
|
328
|
+
n("select", f.value), n("update:selectedItems", f.value);
|
|
318
329
|
}
|
|
319
330
|
function p() {
|
|
320
|
-
|
|
331
|
+
f.value = [], n("select", f.value), n("update:selectedItems", f.value);
|
|
321
332
|
}
|
|
322
|
-
|
|
333
|
+
ae(() => t.searchKeyword, () => {
|
|
323
334
|
y.value = 1;
|
|
324
|
-
}),
|
|
335
|
+
}), ae(() => t.data, () => {
|
|
325
336
|
t.total || (y.value = 1);
|
|
326
337
|
}, { deep: !0 });
|
|
327
|
-
function
|
|
338
|
+
function v(C) {
|
|
328
339
|
y.value = C, n("page-change", C);
|
|
329
340
|
}
|
|
330
341
|
function o(C) {
|
|
331
342
|
d.value = C, y.value = 1, n("page-size-change", C);
|
|
332
343
|
}
|
|
333
|
-
|
|
344
|
+
ae(() => t.currentPage, (C) => {
|
|
334
345
|
const $ = typeof C == "number" && C > 0 ? C : 1;
|
|
335
346
|
y.value !== $ && (y.value = $);
|
|
336
|
-
}),
|
|
347
|
+
}), ae(() => t.pageSize, (C) => {
|
|
337
348
|
const $ = typeof C == "number" && C > 0 ? C : 10;
|
|
338
349
|
d.value !== $ && (d.value = $);
|
|
339
350
|
});
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
const C =
|
|
351
|
+
function s() {
|
|
352
|
+
k.value && he(() => {
|
|
353
|
+
const C = k.value.getBoundingClientRect(), $ = window.innerHeight, z = C.top, B = k.value.querySelector(".table-header"), Y = B ? B.offsetHeight : 40, W = k.value.querySelector(".ypagination"), ne = W ? W.offsetHeight : 60, a = k.value.querySelector(".bulk-bar"), u = a ? a.offsetHeight : 0, _ = Y + ne + u + 20, P = $ - z - _, oe = Math.max(200, P), re = k.value.querySelector(".table-body-wrap .table");
|
|
343
354
|
re && (re.offsetHeight > P ? L.value = `${oe}px` : L.value = "none");
|
|
344
355
|
});
|
|
345
356
|
}
|
|
346
|
-
let
|
|
347
|
-
function
|
|
348
|
-
!
|
|
349
|
-
|
|
357
|
+
let h = !1;
|
|
358
|
+
function b() {
|
|
359
|
+
!S.value || !g.value || h || S.value.scrollLeft !== g.value.scrollLeft && (h = !0, S.value.scrollLeft = g.value.scrollLeft, requestAnimationFrame(() => {
|
|
360
|
+
h = !1;
|
|
350
361
|
}));
|
|
351
362
|
}
|
|
352
363
|
function m() {
|
|
353
|
-
!
|
|
354
|
-
|
|
364
|
+
!S.value || !g.value || h || g.value.scrollLeft !== S.value.scrollLeft && (h = !0, g.value.scrollLeft = S.value.scrollLeft, requestAnimationFrame(() => {
|
|
365
|
+
h = !1;
|
|
355
366
|
}));
|
|
356
367
|
}
|
|
357
|
-
function
|
|
368
|
+
function V() {
|
|
358
369
|
he(() => {
|
|
359
370
|
if (!g.value) return;
|
|
360
|
-
const C = g.value, $ = C.scrollHeight, z = C.clientHeight, B = C.scrollTop,
|
|
361
|
-
if (q.value.show =
|
|
362
|
-
const W = 24, ne = z / $,
|
|
371
|
+
const C = g.value, $ = C.scrollHeight, z = C.clientHeight, B = C.scrollTop, Y = $ > z + 1;
|
|
372
|
+
if (q.value.show = Y, !Y) return;
|
|
373
|
+
const W = 24, ne = z / $, a = M.value ? M.value.clientHeight : z, u = Math.max(W, Math.floor(a * ne));
|
|
363
374
|
q.value.thumbHeight = u;
|
|
364
|
-
const _ = Math.max(0,
|
|
375
|
+
const _ = Math.max(0, a - u), P = Math.max(1, $ - z);
|
|
365
376
|
q.value.thumbTop = Math.min(_, Math.floor(B / P * _));
|
|
366
377
|
});
|
|
367
378
|
}
|
|
368
379
|
function ee(C) {
|
|
369
|
-
if (!J || !g.value || !
|
|
380
|
+
if (!J || !g.value || !M.value) return;
|
|
370
381
|
C.preventDefault();
|
|
371
|
-
const $ =
|
|
372
|
-
B.scrollTop = Math.min(ne, Math.max(0, D + u)),
|
|
382
|
+
const $ = M.value.clientHeight, z = Math.max(0, $ - q.value.thumbHeight), B = g.value, Y = B.scrollHeight, W = B.clientHeight, ne = Math.max(1, Y - W), u = (C.clientY - F) / Math.max(1, z) * ne;
|
|
383
|
+
B.scrollTop = Math.min(ne, Math.max(0, D + u)), V();
|
|
373
384
|
}
|
|
374
385
|
function te() {
|
|
375
386
|
J = !1, window.removeEventListener("mousemove", ee), window.removeEventListener("mouseup", te);
|
|
@@ -384,18 +395,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
384
395
|
if (B.width && typeof B.width == "string" && B.width.trim())
|
|
385
396
|
C.push(B.width);
|
|
386
397
|
else {
|
|
387
|
-
const
|
|
388
|
-
C.push(
|
|
398
|
+
const Y = c.value[C.length];
|
|
399
|
+
C.push(Y || "");
|
|
389
400
|
}
|
|
390
|
-
const $ = (z =
|
|
401
|
+
const $ = (z = w.value) == null ? void 0 : z.querySelector("tbody tr");
|
|
391
402
|
if ($) {
|
|
392
|
-
const B = t.selectable ? 1 : 0,
|
|
403
|
+
const B = t.selectable ? 1 : 0, Y = Array.from($.children);
|
|
393
404
|
for (let W = 0; W < t.columns.length; W++)
|
|
394
405
|
if (!C[W]) {
|
|
395
|
-
const ne =
|
|
406
|
+
const ne = Y[B + W];
|
|
396
407
|
if (ne) {
|
|
397
|
-
const
|
|
398
|
-
C[W] = (
|
|
408
|
+
const a = ne.clientWidth;
|
|
409
|
+
C[W] = (a > 0 ? a : 80) + "px";
|
|
399
410
|
} else
|
|
400
411
|
C[W] = "80px";
|
|
401
412
|
}
|
|
@@ -406,70 +417,70 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
406
417
|
});
|
|
407
418
|
}
|
|
408
419
|
function Re() {
|
|
409
|
-
|
|
420
|
+
s(), _e();
|
|
410
421
|
}
|
|
411
|
-
|
|
422
|
+
ae(() => t.data, () => {
|
|
412
423
|
he(() => {
|
|
413
|
-
|
|
424
|
+
s(), b(), _e();
|
|
414
425
|
});
|
|
415
|
-
}, { deep: !0 }),
|
|
426
|
+
}, { deep: !0 }), ae([y, d], () => {
|
|
416
427
|
he(() => {
|
|
417
|
-
|
|
428
|
+
s(), b(), _e();
|
|
418
429
|
});
|
|
419
|
-
}),
|
|
430
|
+
}), ae(() => t.columns, () => {
|
|
420
431
|
c.value = [], he(() => {
|
|
421
|
-
Me(),
|
|
432
|
+
Me(), b(), _e();
|
|
422
433
|
});
|
|
423
|
-
}, { deep: !0 }),
|
|
434
|
+
}, { deep: !0 }), ae(() => f.value, () => {
|
|
424
435
|
he(() => {
|
|
425
|
-
|
|
436
|
+
s(), _e();
|
|
426
437
|
});
|
|
427
|
-
}, { deep: !0 }),
|
|
438
|
+
}, { deep: !0 }), ae(() => t.loading, () => {
|
|
428
439
|
he(() => {
|
|
429
440
|
_e();
|
|
430
441
|
});
|
|
431
442
|
}), Se(() => {
|
|
432
443
|
var C, $;
|
|
433
444
|
he(() => {
|
|
434
|
-
|
|
445
|
+
s(), Me(), _e(), V();
|
|
435
446
|
}), window.addEventListener("resize", Re), window.addEventListener("scroll", Re, !0), (C = g.value) == null || C.addEventListener("scroll", () => {
|
|
436
|
-
|
|
437
|
-
}, { passive: !0 }), ($ =
|
|
447
|
+
b(), V(), _e();
|
|
448
|
+
}, { passive: !0 }), ($ = S.value) == null || $.addEventListener("scroll", () => {
|
|
438
449
|
m();
|
|
439
|
-
}, { passive: !0 }), he(() =>
|
|
450
|
+
}, { passive: !0 }), he(() => b()), g.value && typeof ResizeObserver < "u" && (Ke = new ResizeObserver(() => {
|
|
440
451
|
_e();
|
|
441
452
|
}), Ke.observe(g.value));
|
|
442
453
|
}), Te(() => {
|
|
443
454
|
var C, $;
|
|
444
|
-
window.removeEventListener("resize", Re), window.removeEventListener("scroll", Re, !0), (C = g.value) == null || C.removeEventListener("scroll",
|
|
455
|
+
window.removeEventListener("resize", Re), window.removeEventListener("scroll", Re, !0), (C = g.value) == null || C.removeEventListener("scroll", b), ($ = S.value) == null || $.removeEventListener("scroll", m), window.removeEventListener("mousemove", ee), window.removeEventListener("mouseup", te), Ke && (Ke.disconnect(), Ke = null);
|
|
445
456
|
});
|
|
446
457
|
let ze = -1;
|
|
447
458
|
function _e() {
|
|
448
|
-
!
|
|
449
|
-
if (!
|
|
459
|
+
!S.value || !g.value || requestAnimationFrame(() => {
|
|
460
|
+
if (!S.value || !g.value) return;
|
|
450
461
|
const C = g.value, $ = Math.ceil(C.offsetWidth - C.clientWidth);
|
|
451
462
|
if (T.value = $, $ !== ze) {
|
|
452
463
|
ze = $;
|
|
453
|
-
const z =
|
|
454
|
-
z && B && (
|
|
464
|
+
const z = S.value.querySelector(".table"), B = w.value;
|
|
465
|
+
z && B && (S.value.style.paddingRight = "0px", z.style.width = "", z.style.marginRight = "", $ > 0 ? (S.value.style.paddingRight = `${$}px`, z.style.width = "100%", z.style.marginRight = `-${$}px`) : (S.value.style.paddingRight = "0px", z.style.width = "100%", z.style.marginRight = "0px"));
|
|
455
466
|
}
|
|
456
467
|
});
|
|
457
468
|
}
|
|
458
469
|
let Ke = null;
|
|
459
470
|
return (C, $) => {
|
|
460
|
-
const z =
|
|
471
|
+
const z = Ve("YButton"), B = Ve("YPagination");
|
|
461
472
|
return i(), r("div", {
|
|
462
473
|
class: "ytable-container",
|
|
463
474
|
ref_key: "tableContainer",
|
|
464
|
-
ref:
|
|
475
|
+
ref: k
|
|
465
476
|
}, [
|
|
466
477
|
de(De, { name: "bulk-slide" }, {
|
|
467
478
|
default: ve(() => [
|
|
468
|
-
|
|
469
|
-
l("div", wt, "已选择 " + le(
|
|
479
|
+
f.value.length && e.showBulkActions ? (i(), r("div", mt, [
|
|
480
|
+
l("div", wt, "已选择 " + le(f.value.length) + " 项", 1),
|
|
470
481
|
l("div", bt, [
|
|
471
482
|
ce(C.$slots, "bulk-actions", {
|
|
472
|
-
selectedItems:
|
|
483
|
+
selectedItems: f.value,
|
|
473
484
|
clearSelection: p
|
|
474
485
|
}, () => [
|
|
475
486
|
de(z, {
|
|
@@ -492,13 +503,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
492
503
|
l("div", {
|
|
493
504
|
class: "table-header",
|
|
494
505
|
ref_key: "headerRef",
|
|
495
|
-
ref:
|
|
506
|
+
ref: S
|
|
496
507
|
}, [
|
|
497
508
|
l("table", xt, [
|
|
498
509
|
l("colgroup", null, [
|
|
499
510
|
e.selectable ? (i(), r("col", Dt)) : R("", !0),
|
|
500
|
-
(i(!0), r(ue, null, pe(e.columns, (
|
|
501
|
-
key:
|
|
511
|
+
(i(!0), r(ue, null, pe(e.columns, (Y, W) => (i(), r("col", {
|
|
512
|
+
key: Y.key,
|
|
502
513
|
style: we({ width: c.value[W] || void 0, minWidth: c.value[W] || "80px" })
|
|
503
514
|
}, null, 4))), 128))
|
|
504
515
|
]),
|
|
@@ -507,21 +518,21 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
507
518
|
e.selectable ? (i(), r("th", Ct, [
|
|
508
519
|
l("input", {
|
|
509
520
|
type: "checkbox",
|
|
510
|
-
checked:
|
|
521
|
+
checked: O.value,
|
|
511
522
|
onChange: Z
|
|
512
523
|
}, null, 40, $t)
|
|
513
524
|
])) : R("", !0),
|
|
514
|
-
(i(!0), r(ue, null, pe(e.columns, (
|
|
515
|
-
key:
|
|
516
|
-
class: E(ge(
|
|
517
|
-
style: we(
|
|
518
|
-
}, le(
|
|
525
|
+
(i(!0), r(ue, null, pe(e.columns, (Y, W) => (i(), r("th", {
|
|
526
|
+
key: Y.key,
|
|
527
|
+
class: E(ge(Y, !0)),
|
|
528
|
+
style: we(A(Y, W, !0))
|
|
529
|
+
}, le(Y.title), 7))), 128))
|
|
519
530
|
])
|
|
520
531
|
])
|
|
521
532
|
])
|
|
522
533
|
], 512),
|
|
523
534
|
l("div", {
|
|
524
|
-
class: E(["table-body-wrap", { "is-loading": e.loading, "is-empty": !
|
|
535
|
+
class: E(["table-body-wrap", { "is-loading": e.loading, "is-empty": !H.value.length && !e.loading }]),
|
|
525
536
|
ref_key: "bodyWrapRef",
|
|
526
537
|
ref: g,
|
|
527
538
|
style: we({ maxHeight: L.value })
|
|
@@ -530,7 +541,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
530
541
|
l("div", { class: "loading-spinner" }, null, -1),
|
|
531
542
|
l("div", { class: "loading-text" }, "加载中...", -1)
|
|
532
543
|
])])) : R("", !0),
|
|
533
|
-
!
|
|
544
|
+
!H.value.length && !e.loading ? (i(), r("div", St, [
|
|
534
545
|
ce(C.$slots, "empty", {}, () => [
|
|
535
546
|
Ce(le(e.emptyText), 1)
|
|
536
547
|
], !0)
|
|
@@ -538,38 +549,38 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
538
549
|
l("table", {
|
|
539
550
|
class: E(["table", { "loading-table": e.loading }]),
|
|
540
551
|
ref_key: "bodyTableRef",
|
|
541
|
-
ref:
|
|
552
|
+
ref: w
|
|
542
553
|
}, [
|
|
543
554
|
l("colgroup", null, [
|
|
544
555
|
e.selectable ? (i(), r("col", Mt)) : R("", !0),
|
|
545
|
-
(i(!0), r(ue, null, pe(e.columns, (
|
|
546
|
-
key:
|
|
556
|
+
(i(!0), r(ue, null, pe(e.columns, (Y, W) => (i(), r("col", {
|
|
557
|
+
key: Y.key,
|
|
547
558
|
style: we({ width: c.value[W] || void 0, minWidth: c.value[W] || "80px" })
|
|
548
559
|
}, null, 4))), 128))
|
|
549
560
|
]),
|
|
550
561
|
l("tbody", null, [
|
|
551
|
-
(i(!0), r(ue, null, pe(
|
|
552
|
-
key: G(
|
|
562
|
+
(i(!0), r(ue, null, pe(H.value, (Y, W) => (i(), r("tr", {
|
|
563
|
+
key: G(Y, W)
|
|
553
564
|
}, [
|
|
554
565
|
e.selectable ? (i(), r("td", Lt, [
|
|
555
566
|
l("input", {
|
|
556
567
|
type: "checkbox",
|
|
557
|
-
value: G(
|
|
558
|
-
checked:
|
|
559
|
-
onChange: (ne) => U(G(
|
|
568
|
+
value: G(Y, W),
|
|
569
|
+
checked: f.value.includes(G(Y, W)),
|
|
570
|
+
onChange: (ne) => U(G(Y, W))
|
|
560
571
|
}, null, 40, It)
|
|
561
572
|
])) : R("", !0),
|
|
562
|
-
(i(!0), r(ue, null, pe(e.columns, (ne,
|
|
573
|
+
(i(!0), r(ue, null, pe(e.columns, (ne, a) => (i(), r("td", {
|
|
563
574
|
key: ne.key,
|
|
564
575
|
class: E(ge(ne)),
|
|
565
|
-
style: we(
|
|
576
|
+
style: we(A(ne, a, !1))
|
|
566
577
|
}, [
|
|
567
578
|
ce(C.$slots, `cell-${ne.key}`, {
|
|
568
|
-
item:
|
|
569
|
-
value: fe(
|
|
579
|
+
item: Y,
|
|
580
|
+
value: fe(Y, ne.key),
|
|
570
581
|
index: W
|
|
571
582
|
}, () => [
|
|
572
|
-
Ce(le(N(
|
|
583
|
+
Ce(le(N(Y, ne)), 1)
|
|
573
584
|
], !0)
|
|
574
585
|
], 6))), 128))
|
|
575
586
|
]))), 128))
|
|
@@ -580,19 +591,19 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
580
591
|
key: 0,
|
|
581
592
|
class: "align-right",
|
|
582
593
|
"current-page": y.value,
|
|
583
|
-
"onUpdate:currentPage": $[0] || ($[0] = (
|
|
594
|
+
"onUpdate:currentPage": $[0] || ($[0] = (Y) => y.value = Y),
|
|
584
595
|
"page-size": d.value,
|
|
585
|
-
"onUpdate:pageSize": $[1] || ($[1] = (
|
|
596
|
+
"onUpdate:pageSize": $[1] || ($[1] = (Y) => d.value = Y),
|
|
586
597
|
loading: t.loading,
|
|
587
598
|
"page-size-options": e.pageSizeOptions,
|
|
588
|
-
onPageChange:
|
|
599
|
+
onPageChange: v,
|
|
589
600
|
onPageSizeChange: o
|
|
590
601
|
}, null, 8, ["current-page", "page-size", "loading", "page-size-options"])) : R("", !0)
|
|
591
602
|
])
|
|
592
603
|
], 512);
|
|
593
604
|
};
|
|
594
605
|
}
|
|
595
|
-
}), Et = /* @__PURE__ */ ke(Bt, [["__scopeId", "data-v-1b9621b8"]]), Tt = ["onKeydown", "aria-expanded"], zt = ["src"], Kt = ["placeholder", "onKeydown"], Ht = ["onClick", "onMouseenter"], Rt = ["src"],
|
|
606
|
+
}), Et = /* @__PURE__ */ ke(Bt, [["__scopeId", "data-v-1b9621b8"]]), Tt = ["onKeydown", "aria-expanded"], zt = ["src"], Kt = ["placeholder", "onKeydown"], Ht = ["onClick", "onMouseenter"], Rt = ["src"], Vt = /* @__PURE__ */ be({
|
|
596
607
|
__name: "yselect",
|
|
597
608
|
props: {
|
|
598
609
|
modelValue: {},
|
|
@@ -610,26 +621,26 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
610
621
|
width: { default: "200px" }
|
|
611
622
|
},
|
|
612
623
|
emits: ["update:modelValue", "change", "focus", "blur", "clear"],
|
|
613
|
-
setup(e, { emit:
|
|
614
|
-
const t = e, n =
|
|
624
|
+
setup(e, { emit: x }) {
|
|
625
|
+
const t = e, n = x, y = K(!1), d = K(-1), f = K(), L = K(), k = K(), S = K(), g = K(!1), w = K(), c = K(""), M = j(() => t.options.find((o) => T(o) === t.modelValue) || null), q = j(() => M.value ? I(M.value) : ""), J = j(() => {
|
|
615
626
|
if (!t.filterable) return t.options;
|
|
616
627
|
const o = c.value.trim().toLowerCase();
|
|
617
|
-
return o ? t.options.filter((
|
|
618
|
-
const
|
|
619
|
-
return String(
|
|
628
|
+
return o ? t.options.filter((s) => {
|
|
629
|
+
const h = I(s);
|
|
630
|
+
return String(h).toLowerCase().includes(o);
|
|
620
631
|
}) : t.options;
|
|
621
|
-
}),
|
|
632
|
+
}), F = j(() => {
|
|
622
633
|
var m;
|
|
623
|
-
const o = { position: "fixed", zIndex: "4000" },
|
|
624
|
-
if (!
|
|
625
|
-
const
|
|
626
|
-
return o.left = `${
|
|
634
|
+
const o = { position: "fixed", zIndex: "4000" }, s = L.value;
|
|
635
|
+
if (!s) return o;
|
|
636
|
+
const h = s.getBoundingClientRect(), b = ((m = k.value) == null ? void 0 : m.getBoundingClientRect().width) || h.width;
|
|
637
|
+
return o.left = `${h.left}px`, o.width = `${b}px`, g.value ? (o.bottom = `${window.innerHeight - h.top + 4}px`, o.top = "auto") : o.top = `${h.bottom + 4}px`, o;
|
|
627
638
|
});
|
|
628
639
|
function D() {
|
|
629
640
|
!y.value || !L.value || he(() => {
|
|
630
641
|
const o = L.value;
|
|
631
642
|
if (!o) return;
|
|
632
|
-
const
|
|
643
|
+
const s = o.getBoundingClientRect(), h = window.innerHeight, b = 200, m = s.bottom + b + 4, V = s.top - b - 4, ee = m <= h - 20, te = V >= 20;
|
|
633
644
|
g.value = !ee && te;
|
|
634
645
|
});
|
|
635
646
|
}
|
|
@@ -639,10 +650,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
639
650
|
function I(o) {
|
|
640
651
|
return typeof o == "object" && o !== null ? o[t.labelKey] || String(o[t.valueKey]) : String(o);
|
|
641
652
|
}
|
|
642
|
-
function
|
|
643
|
-
return typeof o == "object" && o !== null && o.id !== void 0 ? o.id : T(o) ||
|
|
653
|
+
function H(o, s) {
|
|
654
|
+
return typeof o == "object" && o !== null && o.id !== void 0 ? o.id : T(o) || s;
|
|
644
655
|
}
|
|
645
|
-
function
|
|
656
|
+
function O(o) {
|
|
646
657
|
return T(o) === t.modelValue;
|
|
647
658
|
}
|
|
648
659
|
function ie(o) {
|
|
@@ -653,34 +664,34 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
653
664
|
}
|
|
654
665
|
function ye() {
|
|
655
666
|
t.disabled || (y.value = !0, he(() => {
|
|
656
|
-
D(), U(), t.filterable &&
|
|
667
|
+
D(), U(), t.filterable && w.value && (w.value.focus(), c.value = "");
|
|
657
668
|
}));
|
|
658
669
|
}
|
|
659
670
|
function G() {
|
|
660
671
|
y.value = !1, d.value = -1, g.value = !1, t.filterable && (c.value = "");
|
|
661
672
|
}
|
|
662
|
-
function fe(o,
|
|
673
|
+
function fe(o, s) {
|
|
663
674
|
if (ie(o)) return;
|
|
664
|
-
const
|
|
665
|
-
n("update:modelValue",
|
|
675
|
+
const h = T(o);
|
|
676
|
+
n("update:modelValue", h), n("change", h, o), G();
|
|
666
677
|
}
|
|
667
678
|
function ge() {
|
|
668
679
|
if (!t.clearable || t.disabled) return;
|
|
669
680
|
const o = t.clearTo;
|
|
670
681
|
n("update:modelValue", o), n("change", o, null), n("clear"), G();
|
|
671
682
|
}
|
|
672
|
-
function
|
|
683
|
+
function A(o) {
|
|
673
684
|
if (!J.value || J.value.length === 0) {
|
|
674
685
|
d.value = -1;
|
|
675
686
|
return;
|
|
676
687
|
}
|
|
677
|
-
let
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
let
|
|
681
|
-
for (;
|
|
682
|
-
|
|
683
|
-
d.value =
|
|
688
|
+
let s = d.value;
|
|
689
|
+
const h = J.value.length;
|
|
690
|
+
s === -1 ? s = o > 0 ? 0 : h - 1 : s = (s + o + h) % h;
|
|
691
|
+
let b = 0;
|
|
692
|
+
for (; b < h && ie(J.value[s]); )
|
|
693
|
+
s = (s + o + h) % h, b++;
|
|
694
|
+
d.value = b >= h ? -1 : s, Z();
|
|
684
695
|
}
|
|
685
696
|
function N() {
|
|
686
697
|
if (d.value < 0) return;
|
|
@@ -688,34 +699,34 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
688
699
|
!o || ie(o) || fe(o, d.value);
|
|
689
700
|
}
|
|
690
701
|
function U() {
|
|
691
|
-
if (!
|
|
692
|
-
const o =
|
|
702
|
+
if (!f.value) return;
|
|
703
|
+
const o = f.value.querySelector(".yselect__option--selected");
|
|
693
704
|
o && o.scrollIntoView({ block: "nearest" });
|
|
694
705
|
}
|
|
695
706
|
function Z() {
|
|
696
|
-
if (!
|
|
697
|
-
const
|
|
698
|
-
|
|
707
|
+
if (!f.value || d.value < 0) return;
|
|
708
|
+
const s = f.value.querySelectorAll(".yselect__option")[d.value];
|
|
709
|
+
s && s.scrollIntoView({ block: "nearest" });
|
|
699
710
|
}
|
|
700
711
|
function p(o) {
|
|
701
|
-
const
|
|
702
|
-
(!
|
|
712
|
+
const s = o.target;
|
|
713
|
+
(!k.value || !k.value.contains(s)) && G();
|
|
703
714
|
}
|
|
704
|
-
|
|
715
|
+
ae(() => t.modelValue, () => {
|
|
705
716
|
d.value = -1;
|
|
706
717
|
});
|
|
707
|
-
function
|
|
718
|
+
function v() {
|
|
708
719
|
y.value && D();
|
|
709
720
|
}
|
|
710
721
|
return Se(() => {
|
|
711
|
-
document.addEventListener("click", p), window.addEventListener("resize",
|
|
722
|
+
document.addEventListener("click", p), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0);
|
|
712
723
|
}), Te(() => {
|
|
713
|
-
document.removeEventListener("click", p), window.removeEventListener("resize",
|
|
714
|
-
}), (o,
|
|
724
|
+
document.removeEventListener("click", p), window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
|
|
725
|
+
}), (o, s) => (i(), r("div", {
|
|
715
726
|
class: E(["yselect", { "yselect--disabled": e.disabled, [`yselect--${e.size}`]: !0 }]),
|
|
716
727
|
style: we({ width: e.width }),
|
|
717
728
|
ref_key: "selectContainer",
|
|
718
|
-
ref:
|
|
729
|
+
ref: k
|
|
719
730
|
}, [
|
|
720
731
|
l("div", {
|
|
721
732
|
ref_key: "triggerElement",
|
|
@@ -743,16 +754,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
743
754
|
class: E(["yselect__value", { yselect__placeholder: !q.value }])
|
|
744
755
|
}, [
|
|
745
756
|
ce(o.$slots, "value", {
|
|
746
|
-
value:
|
|
757
|
+
value: M.value,
|
|
747
758
|
label: q.value
|
|
748
759
|
}, () => {
|
|
749
|
-
var
|
|
760
|
+
var h;
|
|
750
761
|
return [
|
|
751
|
-
|
|
752
|
-
(
|
|
762
|
+
M.value ? (i(), r(ue, { key: 0 }, [
|
|
763
|
+
(h = M.value) != null && h.flagImg ? (i(), r("img", {
|
|
753
764
|
key: 0,
|
|
754
765
|
class: "yselect__flag",
|
|
755
|
-
src:
|
|
766
|
+
src: M.value.flagImg,
|
|
756
767
|
alt: "flag"
|
|
757
768
|
}, null, 8, zt)) : R("", !0),
|
|
758
769
|
Ce(" " + le(q.value), 1)
|
|
@@ -764,29 +775,29 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
764
775
|
], 2)) : Ee((i(), r("input", {
|
|
765
776
|
key: 1,
|
|
766
777
|
ref_key: "inputElement",
|
|
767
|
-
ref:
|
|
778
|
+
ref: w,
|
|
768
779
|
class: "yselect__input",
|
|
769
780
|
type: "text",
|
|
770
781
|
placeholder: q.value || e.placeholder,
|
|
771
|
-
"onUpdate:modelValue":
|
|
782
|
+
"onUpdate:modelValue": s[0] || (s[0] = (h) => c.value = h),
|
|
772
783
|
onKeydown: [
|
|
773
|
-
|
|
784
|
+
s[1] || (s[1] = Q(() => {
|
|
774
785
|
}, ["stop"])),
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
786
|
+
s[2] || (s[2] = xe(Q((h) => A(1), ["prevent"]), ["arrow-down"])),
|
|
787
|
+
s[3] || (s[3] = xe(Q((h) => A(-1), ["prevent"]), ["arrow-up"])),
|
|
788
|
+
s[4] || (s[4] = xe(Q((h) => N(), ["prevent"]), ["enter"])),
|
|
778
789
|
xe(Q(G, ["prevent"]), ["esc"]),
|
|
779
790
|
xe(Q(ge, ["prevent"]), ["delete"])
|
|
780
791
|
]
|
|
781
792
|
}, null, 40, Kt)), [
|
|
782
793
|
[tt, c.value]
|
|
783
794
|
]),
|
|
784
|
-
e.clearable && !e.disabled &&
|
|
795
|
+
e.clearable && !e.disabled && M.value ? (i(), r("span", {
|
|
785
796
|
key: 2,
|
|
786
797
|
class: "yselect__clear",
|
|
787
798
|
title: "清空",
|
|
788
799
|
onClick: Q(ge, ["stop"])
|
|
789
|
-
}, [...
|
|
800
|
+
}, [...s[8] || (s[8] = [
|
|
790
801
|
l("svg", {
|
|
791
802
|
width: "12",
|
|
792
803
|
height: "12",
|
|
@@ -803,7 +814,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
803
814
|
])])) : R("", !0),
|
|
804
815
|
l("span", {
|
|
805
816
|
class: E(["yselect__arrow", { "yselect__arrow--open": y.value }])
|
|
806
|
-
}, [...
|
|
817
|
+
}, [...s[9] || (s[9] = [
|
|
807
818
|
l("svg", {
|
|
808
819
|
width: "12",
|
|
809
820
|
height: "12",
|
|
@@ -822,46 +833,46 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
822
833
|
], 42, Tt),
|
|
823
834
|
de(De, { name: "yselect-dropdown" }, {
|
|
824
835
|
default: ve(() => [
|
|
825
|
-
(i(), Be(
|
|
836
|
+
(i(), Be(Ae, { to: "body" }, [
|
|
826
837
|
y.value ? (i(), r("div", {
|
|
827
838
|
key: 0,
|
|
828
839
|
ref_key: "dropdownEl",
|
|
829
|
-
ref:
|
|
840
|
+
ref: S,
|
|
830
841
|
class: E(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": g.value }]),
|
|
831
|
-
style: we(
|
|
832
|
-
onMousedown:
|
|
842
|
+
style: we(F.value),
|
|
843
|
+
onMousedown: s[6] || (s[6] = Q(() => {
|
|
833
844
|
}, ["stop"])),
|
|
834
|
-
onClick:
|
|
845
|
+
onClick: s[7] || (s[7] = Q(() => {
|
|
835
846
|
}, ["stop"]))
|
|
836
847
|
}, [
|
|
837
848
|
l("div", {
|
|
838
849
|
class: "yselect__options",
|
|
839
850
|
ref_key: "optionsContainer",
|
|
840
|
-
ref:
|
|
851
|
+
ref: f
|
|
841
852
|
}, [
|
|
842
|
-
(i(!0), r(ue, null, pe(J.value, (
|
|
843
|
-
key:
|
|
853
|
+
(i(!0), r(ue, null, pe(J.value, (h, b) => (i(), r("div", {
|
|
854
|
+
key: H(h, b),
|
|
844
855
|
class: E(["yselect__option", {
|
|
845
|
-
"yselect__option--selected":
|
|
846
|
-
"yselect__option--disabled": ie(
|
|
847
|
-
"yselect__option--hover": d.value ===
|
|
856
|
+
"yselect__option--selected": O(h),
|
|
857
|
+
"yselect__option--disabled": ie(h),
|
|
858
|
+
"yselect__option--hover": d.value === b
|
|
848
859
|
}]),
|
|
849
|
-
onClick: (m) => fe(
|
|
850
|
-
onMouseenter: (m) => d.value =
|
|
851
|
-
onMouseleave:
|
|
860
|
+
onClick: (m) => fe(h),
|
|
861
|
+
onMouseenter: (m) => d.value = b,
|
|
862
|
+
onMouseleave: s[5] || (s[5] = (m) => d.value = -1)
|
|
852
863
|
}, [
|
|
853
864
|
ce(o.$slots, "option", {
|
|
854
|
-
option:
|
|
855
|
-
index:
|
|
856
|
-
selected:
|
|
865
|
+
option: h,
|
|
866
|
+
index: b,
|
|
867
|
+
selected: O(h)
|
|
857
868
|
}, () => [
|
|
858
|
-
|
|
869
|
+
h != null && h.flagImg ? (i(), r("img", {
|
|
859
870
|
key: 0,
|
|
860
871
|
class: "yselect__flag",
|
|
861
|
-
src:
|
|
872
|
+
src: h.flagImg,
|
|
862
873
|
alt: "flag"
|
|
863
874
|
}, null, 8, Rt)) : R("", !0),
|
|
864
|
-
Ce(" " + le(I(
|
|
875
|
+
Ce(" " + le(I(h)), 1)
|
|
865
876
|
], !0)
|
|
866
877
|
], 42, Ht))), 128))
|
|
867
878
|
], 512)
|
|
@@ -872,7 +883,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
872
883
|
})
|
|
873
884
|
], 6));
|
|
874
885
|
}
|
|
875
|
-
}), Je = /* @__PURE__ */ ke(
|
|
886
|
+
}), Je = /* @__PURE__ */ ke(Vt, [["__scopeId", "data-v-6cd47cb7"]]), At = { class: "ypagination" }, Ft = { class: "page-actions" }, Yt = { class: "page-size-select" }, Pt = /* @__PURE__ */ be({
|
|
876
887
|
__name: "ypagination",
|
|
877
888
|
props: {
|
|
878
889
|
currentPage: {},
|
|
@@ -886,38 +897,38 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
886
897
|
] }
|
|
887
898
|
},
|
|
888
899
|
emits: ["update:currentPage", "update:pageSize", "page-change", "page-size-change"],
|
|
889
|
-
setup(e, { emit:
|
|
890
|
-
const t = e, n =
|
|
900
|
+
setup(e, { emit: x }) {
|
|
901
|
+
const t = e, n = x, y = K(t.pageSize), d = j(() => t.pageSizeOptions), f = j({
|
|
891
902
|
get: () => t.currentPage,
|
|
892
903
|
set: (g) => {
|
|
893
904
|
n("update:currentPage", g), n("page-change", g);
|
|
894
905
|
}
|
|
895
906
|
});
|
|
896
907
|
function L(g) {
|
|
897
|
-
t.loading || g >= 1 && g !== t.currentPage && (
|
|
908
|
+
t.loading || g >= 1 && g !== t.currentPage && (f.value = g);
|
|
898
909
|
}
|
|
899
|
-
function
|
|
900
|
-
t.loading || (y.value = g, n("update:pageSize", g), n("page-size-change", g),
|
|
910
|
+
function k(g) {
|
|
911
|
+
t.loading || (y.value = g, n("update:pageSize", g), n("page-size-change", g), f.value = 1);
|
|
901
912
|
}
|
|
902
|
-
function
|
|
903
|
-
t.loading || (g === "prev" ? L(
|
|
913
|
+
function S(g) {
|
|
914
|
+
t.loading || (g === "prev" ? L(f.value - 1) : g === "next" && L(f.value + 1));
|
|
904
915
|
}
|
|
905
|
-
return y.value = t.pageSize,
|
|
916
|
+
return y.value = t.pageSize, ae(
|
|
906
917
|
() => t.pageSize,
|
|
907
918
|
(g) => {
|
|
908
919
|
typeof g == "number" && y.value !== g && (y.value = g);
|
|
909
920
|
}
|
|
910
|
-
), (g,
|
|
911
|
-
const c =
|
|
912
|
-
return i(), r("div",
|
|
913
|
-
l("div",
|
|
921
|
+
), (g, w) => {
|
|
922
|
+
const c = Ve("YButton"), M = Ve("YSelect");
|
|
923
|
+
return i(), r("div", At, [
|
|
924
|
+
l("div", Ft, [
|
|
914
925
|
de(c, {
|
|
915
926
|
size: "small",
|
|
916
927
|
variant: "secondary",
|
|
917
|
-
disabled:
|
|
918
|
-
onClick:
|
|
928
|
+
disabled: f.value === 1 || e.loading,
|
|
929
|
+
onClick: w[0] || (w[0] = (q) => L(1))
|
|
919
930
|
}, {
|
|
920
|
-
default: ve(() => [...
|
|
931
|
+
default: ve(() => [...w[2] || (w[2] = [
|
|
921
932
|
Ce("首页", -1)
|
|
922
933
|
])]),
|
|
923
934
|
_: 1
|
|
@@ -927,28 +938,28 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
927
938
|
variant: "secondary",
|
|
928
939
|
size: "small",
|
|
929
940
|
groupItems: [
|
|
930
|
-
{ label: "上一页", value: "prev", disabled:
|
|
941
|
+
{ label: "上一页", value: "prev", disabled: f.value === 1 || e.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
|
|
931
942
|
{ label: "下一页", value: "next", disabled: e.loading, icon: "chevron-right", onlyIcon: !0, ariaLabel: "下一页" }
|
|
932
943
|
],
|
|
933
|
-
onGroupClick:
|
|
944
|
+
onGroupClick: S
|
|
934
945
|
}, null, 8, ["groupItems"]),
|
|
935
|
-
l("div",
|
|
936
|
-
de(
|
|
946
|
+
l("div", Yt, [
|
|
947
|
+
de(M, {
|
|
937
948
|
modelValue: y.value,
|
|
938
|
-
"onUpdate:modelValue":
|
|
949
|
+
"onUpdate:modelValue": w[1] || (w[1] = (q) => y.value = q),
|
|
939
950
|
options: d.value,
|
|
940
951
|
size: "small",
|
|
941
952
|
width: "105px",
|
|
942
953
|
clearable: !1,
|
|
943
954
|
disabled: e.loading,
|
|
944
|
-
onChange:
|
|
955
|
+
onChange: k
|
|
945
956
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
946
957
|
])
|
|
947
958
|
])
|
|
948
959
|
]);
|
|
949
960
|
};
|
|
950
961
|
}
|
|
951
|
-
}), Nt = /* @__PURE__ */ ke(Pt, [["__scopeId", "data-v-b8406406"]]), Wt = ["aria-label"],
|
|
962
|
+
}), Nt = /* @__PURE__ */ ke(Pt, [["__scopeId", "data-v-b8406406"]]), Wt = ["aria-label"], Ot = { class: "y-badge__inner" }, jt = {
|
|
952
963
|
key: 0,
|
|
953
964
|
class: "y-badge__progress",
|
|
954
965
|
"aria-hidden": "true"
|
|
@@ -1003,15 +1014,15 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1003
1014
|
label: { default: "" }
|
|
1004
1015
|
},
|
|
1005
1016
|
setup(e) {
|
|
1006
|
-
const
|
|
1007
|
-
const y = (
|
|
1008
|
-
if (
|
|
1017
|
+
const x = e, t = j(() => x.tone || "default"), n = j(() => {
|
|
1018
|
+
const y = (x.label || "").trim(), d = x.tone, f = x.progress;
|
|
1019
|
+
if (f) {
|
|
1009
1020
|
const L = {
|
|
1010
1021
|
incomplete: "未完成",
|
|
1011
1022
|
partiallyComplete: "部分完成",
|
|
1012
1023
|
complete: "已完成"
|
|
1013
1024
|
};
|
|
1014
|
-
return y ? `${y},进度:${L[
|
|
1025
|
+
return y ? `${y},进度:${L[f] || f}` : `进度:${L[f] || f}`;
|
|
1015
1026
|
}
|
|
1016
1027
|
if (d && d !== "default") {
|
|
1017
1028
|
const L = {
|
|
@@ -1036,8 +1047,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1036
1047
|
role: "status",
|
|
1037
1048
|
"aria-label": n.value
|
|
1038
1049
|
}, [
|
|
1039
|
-
l("span",
|
|
1040
|
-
e.progress ? (i(), r("span",
|
|
1050
|
+
l("span", Ot, [
|
|
1051
|
+
e.progress ? (i(), r("span", jt, [
|
|
1041
1052
|
e.progress === "incomplete" ? (i(), r("svg", qt, [...d[0] || (d[0] = [
|
|
1042
1053
|
l("circle", {
|
|
1043
1054
|
cx: "10",
|
|
@@ -1096,7 +1107,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1096
1107
|
])
|
|
1097
1108
|
], 10, Wt));
|
|
1098
1109
|
}
|
|
1099
|
-
}), ln = /* @__PURE__ */ ke(nn, [["__scopeId", "data-v-ce819797"]]), on = ["aria-hidden"],
|
|
1110
|
+
}), ln = /* @__PURE__ */ ke(nn, [["__scopeId", "data-v-ce819797"]]), on = ["aria-hidden"], an = ["onKeydown"], sn = {
|
|
1100
1111
|
key: 0,
|
|
1101
1112
|
class: "y-dialog-header"
|
|
1102
1113
|
}, rn = { class: "y-dialog-title" }, un = { class: "y-dialog-body" }, cn = {
|
|
@@ -1116,28 +1127,28 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1116
1127
|
center: { type: Boolean, default: !1 }
|
|
1117
1128
|
},
|
|
1118
1129
|
emits: ["update:modelValue", "open", "close"],
|
|
1119
|
-
setup(e, { emit:
|
|
1120
|
-
const t = e, n =
|
|
1130
|
+
setup(e, { emit: x }) {
|
|
1131
|
+
const t = e, n = x, y = j({
|
|
1121
1132
|
get: () => t.modelValue,
|
|
1122
|
-
set: (
|
|
1123
|
-
}), d =
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1133
|
+
set: (w) => n("update:modelValue", w)
|
|
1134
|
+
}), d = K(null), f = j(() => {
|
|
1135
|
+
const w = {};
|
|
1136
|
+
return w.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), w.margin = "0 auto", w.top = t.top, w;
|
|
1126
1137
|
});
|
|
1127
1138
|
function L() {
|
|
1128
|
-
t.maskClosable &&
|
|
1139
|
+
t.maskClosable && k();
|
|
1129
1140
|
}
|
|
1130
|
-
function
|
|
1141
|
+
function k() {
|
|
1131
1142
|
y.value && (y.value = !1, n("close"));
|
|
1132
1143
|
}
|
|
1133
|
-
function
|
|
1134
|
-
t.closable &&
|
|
1144
|
+
function S() {
|
|
1145
|
+
t.closable && k();
|
|
1135
1146
|
}
|
|
1136
|
-
function g(
|
|
1137
|
-
|
|
1147
|
+
function g(w) {
|
|
1148
|
+
w.key === "Escape" && S();
|
|
1138
1149
|
}
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1150
|
+
return ae(() => t.modelValue, (w) => {
|
|
1151
|
+
w ? (n("open"), requestAnimationFrame(() => {
|
|
1141
1152
|
var c;
|
|
1142
1153
|
return (c = d.value) == null ? void 0 : c.focus();
|
|
1143
1154
|
}), document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "");
|
|
@@ -1145,7 +1156,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1145
1156
|
t.modelValue && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden");
|
|
1146
1157
|
}), Te(() => {
|
|
1147
1158
|
document.removeEventListener("keydown", g), document.body.style.overflow = "";
|
|
1148
|
-
}), (
|
|
1159
|
+
}), (w, c) => (i(), Be(Ae, { to: "body" }, [
|
|
1149
1160
|
Ee(l("div", {
|
|
1150
1161
|
class: "y-dialog-root",
|
|
1151
1162
|
role: "dialog",
|
|
@@ -1163,12 +1174,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1163
1174
|
ref_key: "panelRef",
|
|
1164
1175
|
ref: d,
|
|
1165
1176
|
class: E(["y-dialog-panel", [e.center ? "is-center" : ""]]),
|
|
1166
|
-
style: we(
|
|
1167
|
-
onKeydown: xe(Q(
|
|
1177
|
+
style: we(f.value),
|
|
1178
|
+
onKeydown: xe(Q(S, ["prevent", "stop"]), ["esc"]),
|
|
1168
1179
|
tabindex: "-1"
|
|
1169
1180
|
}, [
|
|
1170
|
-
e.showHeader ? (i(), r("div",
|
|
1171
|
-
ce(
|
|
1181
|
+
e.showHeader ? (i(), r("div", sn, [
|
|
1182
|
+
ce(w.$slots, "header", {}, () => [
|
|
1172
1183
|
l("div", rn, le(e.title), 1)
|
|
1173
1184
|
], !0),
|
|
1174
1185
|
e.closable ? (i(), r("button", {
|
|
@@ -1176,16 +1187,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1176
1187
|
type: "button",
|
|
1177
1188
|
class: "y-dialog-close",
|
|
1178
1189
|
"aria-label": "Close",
|
|
1179
|
-
onClick:
|
|
1190
|
+
onClick: k
|
|
1180
1191
|
}, " ✕ ")) : R("", !0)
|
|
1181
1192
|
])) : R("", !0),
|
|
1182
1193
|
l("div", un, [
|
|
1183
|
-
ce(
|
|
1194
|
+
ce(w.$slots, "default", {}, void 0, !0)
|
|
1184
1195
|
]),
|
|
1185
|
-
|
|
1186
|
-
ce(
|
|
1196
|
+
w.$slots.footer ? (i(), r("div", cn, [
|
|
1197
|
+
ce(w.$slots, "footer", {}, void 0, !0)
|
|
1187
1198
|
])) : R("", !0)
|
|
1188
|
-
], 46,
|
|
1199
|
+
], 46, an), [
|
|
1189
1200
|
[He, y.value]
|
|
1190
1201
|
])
|
|
1191
1202
|
]),
|
|
@@ -1215,171 +1226,171 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1215
1226
|
modelValue: { type: Boolean, default: !1 }
|
|
1216
1227
|
},
|
|
1217
1228
|
emits: ["update:modelValue", "show", "hide", "before-show", "before-hide"],
|
|
1218
|
-
setup(e, { expose:
|
|
1219
|
-
const n = e, y = t, d =
|
|
1220
|
-
let c = null,
|
|
1221
|
-
const q =
|
|
1222
|
-
if (!
|
|
1223
|
-
const
|
|
1224
|
-
n.width !== "auto" && (
|
|
1225
|
-
const { top: N, left: U } =
|
|
1226
|
-
return
|
|
1227
|
-
}), J =
|
|
1229
|
+
setup(e, { expose: x, emit: t }) {
|
|
1230
|
+
const n = e, y = t, d = K(), f = K(), L = K(), k = K(!1), S = K(), g = K(), w = K({});
|
|
1231
|
+
let c = null, M = null;
|
|
1232
|
+
const q = j(() => {
|
|
1233
|
+
if (!k.value || !S.value) return {};
|
|
1234
|
+
const A = {};
|
|
1235
|
+
n.width !== "auto" && (A.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.maxWidth && (A.maxWidth = typeof n.maxWidth == "number" ? `${n.maxWidth}px` : n.maxWidth);
|
|
1236
|
+
const { top: N, left: U } = F();
|
|
1237
|
+
return A.top = `${N}px`, A.left = `${U}px`, A;
|
|
1238
|
+
}), J = j(() => {
|
|
1228
1239
|
if (!n.showArrow) return {};
|
|
1229
|
-
if (Object.keys(
|
|
1230
|
-
return
|
|
1231
|
-
const
|
|
1232
|
-
return n.placement.startsWith("top") || n.placement.startsWith("bottom") ?
|
|
1240
|
+
if (Object.keys(w.value).length > 0)
|
|
1241
|
+
return w.value;
|
|
1242
|
+
const A = {};
|
|
1243
|
+
return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? A.left = "50%" : A.top = "50%", A;
|
|
1233
1244
|
});
|
|
1234
|
-
function
|
|
1235
|
-
var m,
|
|
1236
|
-
if (!
|
|
1237
|
-
const { width:
|
|
1238
|
-
let o = 0,
|
|
1245
|
+
function F() {
|
|
1246
|
+
var m, V;
|
|
1247
|
+
if (!S.value) return { top: 0, left: 0 };
|
|
1248
|
+
const { width: A, height: N, top: U, left: Z } = S.value, p = ((m = L.value) == null ? void 0 : m.offsetWidth) || 200, v = ((V = L.value) == null ? void 0 : V.offsetHeight) || 100;
|
|
1249
|
+
let o = 0, s = 0;
|
|
1239
1250
|
switch (n.placement) {
|
|
1240
1251
|
case "top":
|
|
1241
|
-
o = U -
|
|
1252
|
+
o = U - v - n.offset, s = Z + (A - p) / 2;
|
|
1242
1253
|
break;
|
|
1243
1254
|
case "top-start":
|
|
1244
|
-
o = U -
|
|
1255
|
+
o = U - v - n.offset, s = Z;
|
|
1245
1256
|
break;
|
|
1246
1257
|
case "top-end":
|
|
1247
|
-
o = U -
|
|
1258
|
+
o = U - v - n.offset, s = Z + A - p;
|
|
1248
1259
|
break;
|
|
1249
1260
|
case "bottom":
|
|
1250
|
-
o = U + N + n.offset,
|
|
1261
|
+
o = U + N + n.offset, s = Z + (A - p) / 2;
|
|
1251
1262
|
break;
|
|
1252
1263
|
case "bottom-start":
|
|
1253
|
-
o = U + N + n.offset,
|
|
1264
|
+
o = U + N + n.offset, s = Z;
|
|
1254
1265
|
break;
|
|
1255
1266
|
case "bottom-end":
|
|
1256
|
-
o = U + N + n.offset,
|
|
1267
|
+
o = U + N + n.offset, s = Z + A - p;
|
|
1257
1268
|
break;
|
|
1258
1269
|
case "left":
|
|
1259
|
-
o = U + (N -
|
|
1270
|
+
o = U + (N - v) / 2, s = Z - p - n.offset;
|
|
1260
1271
|
break;
|
|
1261
1272
|
case "left-start":
|
|
1262
|
-
o = U,
|
|
1273
|
+
o = U, s = Z - p - n.offset;
|
|
1263
1274
|
break;
|
|
1264
1275
|
case "left-end":
|
|
1265
|
-
o = U + N -
|
|
1276
|
+
o = U + N - v, s = Z - p - n.offset;
|
|
1266
1277
|
break;
|
|
1267
1278
|
case "right":
|
|
1268
|
-
o = U + (N -
|
|
1279
|
+
o = U + (N - v) / 2, s = Z + A + n.offset;
|
|
1269
1280
|
break;
|
|
1270
1281
|
case "right-start":
|
|
1271
|
-
o = U,
|
|
1282
|
+
o = U, s = Z + A + n.offset;
|
|
1272
1283
|
break;
|
|
1273
1284
|
case "right-end":
|
|
1274
|
-
o = U + N -
|
|
1285
|
+
o = U + N - v, s = Z + A + n.offset;
|
|
1275
1286
|
break;
|
|
1276
1287
|
}
|
|
1277
|
-
const
|
|
1278
|
-
return
|
|
1288
|
+
const h = window.innerWidth, b = window.innerHeight;
|
|
1289
|
+
return s < 8 && (s = 8), s + p > h - 8 && (s = h - p - 8), o < 8 && (o = 8), o + v > b - 8 && (o = b - v - 8), { top: o, left: s };
|
|
1279
1290
|
}
|
|
1280
1291
|
function D() {
|
|
1281
|
-
n.disabled ||
|
|
1292
|
+
n.disabled || k.value || (O(), n.openDelay > 0 ? c = setTimeout(() => {
|
|
1282
1293
|
T();
|
|
1283
1294
|
}, n.openDelay) : T());
|
|
1284
1295
|
}
|
|
1285
1296
|
function T() {
|
|
1286
|
-
y("before-show"),
|
|
1297
|
+
y("before-show"), k.value = !0, y("update:modelValue", !0), y("show"), he(() => {
|
|
1287
1298
|
he(() => {
|
|
1288
1299
|
X();
|
|
1289
1300
|
});
|
|
1290
1301
|
});
|
|
1291
1302
|
}
|
|
1292
1303
|
function I() {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
}, n.closeDelay) :
|
|
1304
|
+
k.value && (O(), n.closeDelay > 0 ? M = setTimeout(() => {
|
|
1305
|
+
H();
|
|
1306
|
+
}, n.closeDelay) : H());
|
|
1296
1307
|
}
|
|
1297
|
-
function
|
|
1298
|
-
y("before-hide"),
|
|
1308
|
+
function H() {
|
|
1309
|
+
y("before-hide"), k.value = !1, y("update:modelValue", !1), y("hide");
|
|
1299
1310
|
}
|
|
1300
|
-
function
|
|
1301
|
-
c && (clearTimeout(c), c = null),
|
|
1311
|
+
function O() {
|
|
1312
|
+
c && (clearTimeout(c), c = null), M && (clearTimeout(M), M = null);
|
|
1302
1313
|
}
|
|
1303
1314
|
function ie() {
|
|
1304
|
-
if (!n.showArrow || !
|
|
1305
|
-
|
|
1315
|
+
if (!n.showArrow || !S.value || !L.value) {
|
|
1316
|
+
w.value = {};
|
|
1306
1317
|
return;
|
|
1307
1318
|
}
|
|
1308
|
-
const
|
|
1319
|
+
const A = S.value, N = L.value.getBoundingClientRect();
|
|
1309
1320
|
if (N.width === 0 || N.height === 0) {
|
|
1310
1321
|
const Z = {};
|
|
1311
|
-
n.placement.startsWith("top") || n.placement.startsWith("bottom") ? Z.left = "50%" : Z.top = "50%",
|
|
1322
|
+
n.placement.startsWith("top") || n.placement.startsWith("bottom") ? Z.left = "50%" : Z.top = "50%", w.value = Z;
|
|
1312
1323
|
return;
|
|
1313
1324
|
}
|
|
1314
1325
|
const U = {};
|
|
1315
1326
|
if (n.placement.startsWith("top")) {
|
|
1316
1327
|
U.bottom = "-6px";
|
|
1317
|
-
const Z =
|
|
1318
|
-
U.left = `${Math.max(12, Math.min(
|
|
1328
|
+
const Z = A.left + A.width / 2, p = N.left, v = Z - p;
|
|
1329
|
+
U.left = `${Math.max(12, Math.min(v, N.width - 12))}px`;
|
|
1319
1330
|
} else if (n.placement.startsWith("bottom")) {
|
|
1320
1331
|
U.top = "-6px";
|
|
1321
|
-
const Z =
|
|
1322
|
-
U.left = `${Math.max(12, Math.min(
|
|
1332
|
+
const Z = A.left + A.width / 2, p = N.left, v = Z - p;
|
|
1333
|
+
U.left = `${Math.max(12, Math.min(v, N.width - 12))}px`;
|
|
1323
1334
|
} else if (n.placement.startsWith("left")) {
|
|
1324
1335
|
U.right = "-6px";
|
|
1325
|
-
const Z =
|
|
1326
|
-
U.top = `${Math.max(12, Math.min(
|
|
1336
|
+
const Z = A.top + A.height / 2, p = N.top, v = Z - p;
|
|
1337
|
+
U.top = `${Math.max(12, Math.min(v, N.height - 12))}px`;
|
|
1327
1338
|
} else if (n.placement.startsWith("right")) {
|
|
1328
1339
|
U.left = "-6px";
|
|
1329
|
-
const Z =
|
|
1330
|
-
U.top = `${Math.max(12, Math.min(
|
|
1340
|
+
const Z = A.top + A.height / 2, p = N.top, v = Z - p;
|
|
1341
|
+
U.top = `${Math.max(12, Math.min(v, N.height - 12))}px`;
|
|
1331
1342
|
}
|
|
1332
|
-
|
|
1343
|
+
w.value = U;
|
|
1333
1344
|
}
|
|
1334
1345
|
function X() {
|
|
1335
|
-
|
|
1346
|
+
f.value && (S.value = f.value.getBoundingClientRect(), L.value && (g.value = L.value.getBoundingClientRect(), ie(), k.value && requestAnimationFrame(() => {
|
|
1336
1347
|
L.value && (g.value = L.value.getBoundingClientRect(), ie());
|
|
1337
1348
|
})));
|
|
1338
1349
|
}
|
|
1339
1350
|
function ye() {
|
|
1340
|
-
n.disabled || n.trigger === "click" && (
|
|
1351
|
+
n.disabled || n.trigger === "click" && (k.value ? I() : D());
|
|
1341
1352
|
}
|
|
1342
1353
|
function G() {
|
|
1343
|
-
n.disabled || n.trigger !== "hover" || (
|
|
1354
|
+
n.disabled || n.trigger !== "hover" || (O(), D());
|
|
1344
1355
|
}
|
|
1345
1356
|
function fe() {
|
|
1346
1357
|
n.disabled || n.trigger !== "hover" || I();
|
|
1347
1358
|
}
|
|
1348
|
-
function ge(
|
|
1349
|
-
if (!n.closeOnClickOutside || !
|
|
1350
|
-
const N =
|
|
1359
|
+
function ge(A) {
|
|
1360
|
+
if (!n.closeOnClickOutside || !k.value) return;
|
|
1361
|
+
const N = A.target;
|
|
1351
1362
|
d.value && !d.value.contains(N) && L.value && !L.value.contains(N) && I();
|
|
1352
1363
|
}
|
|
1353
|
-
return
|
|
1354
|
-
|
|
1355
|
-
}),
|
|
1356
|
-
|
|
1364
|
+
return ae(() => n.modelValue, (A) => {
|
|
1365
|
+
A !== k.value && (A ? D() : I());
|
|
1366
|
+
}), ae(k, (A) => {
|
|
1367
|
+
A ? (document.addEventListener("click", ge), window.addEventListener("resize", X), window.addEventListener("scroll", X, !0)) : (document.removeEventListener("click", ge), window.removeEventListener("resize", X), window.removeEventListener("scroll", X, !0));
|
|
1357
1368
|
}), Se(() => {
|
|
1358
1369
|
n.modelValue && D();
|
|
1359
1370
|
}), Te(() => {
|
|
1360
|
-
|
|
1361
|
-
}),
|
|
1371
|
+
O(), document.removeEventListener("click", ge), window.removeEventListener("resize", X), window.removeEventListener("scroll", X, !0);
|
|
1372
|
+
}), x({
|
|
1362
1373
|
show: D,
|
|
1363
1374
|
hide: I,
|
|
1364
1375
|
updatePosition: X
|
|
1365
|
-
}), (
|
|
1376
|
+
}), (A, N) => (i(), r("div", {
|
|
1366
1377
|
class: "ypopover",
|
|
1367
1378
|
ref_key: "popoverRef",
|
|
1368
1379
|
ref: d
|
|
1369
1380
|
}, [
|
|
1370
1381
|
l("div", {
|
|
1371
1382
|
ref_key: "triggerRef",
|
|
1372
|
-
ref:
|
|
1383
|
+
ref: f,
|
|
1373
1384
|
onClick: ye,
|
|
1374
1385
|
onMouseenter: G,
|
|
1375
1386
|
onMouseleave: fe
|
|
1376
1387
|
}, [
|
|
1377
|
-
ce(
|
|
1388
|
+
ce(A.$slots, "reference", {}, void 0, !0)
|
|
1378
1389
|
], 544),
|
|
1379
|
-
(i(), Be(
|
|
1390
|
+
(i(), Be(Ae, { to: "body" }, [
|
|
1380
1391
|
de(De, { name: "ypopover-fade" }, {
|
|
1381
1392
|
default: ve(() => [
|
|
1382
|
-
|
|
1393
|
+
k.value ? (i(), r("div", {
|
|
1383
1394
|
key: 0,
|
|
1384
1395
|
ref_key: "contentRef",
|
|
1385
1396
|
ref: L,
|
|
@@ -1400,7 +1411,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1400
1411
|
style: we(J.value)
|
|
1401
1412
|
}, null, 6)) : R("", !0),
|
|
1402
1413
|
l("div", vn, [
|
|
1403
|
-
ce(
|
|
1414
|
+
ce(A.$slots, "default", {}, void 0, !0)
|
|
1404
1415
|
])
|
|
1405
1416
|
], 6)) : R("", !0)
|
|
1406
1417
|
]),
|
|
@@ -1418,7 +1429,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1418
1429
|
}, Sn = {
|
|
1419
1430
|
key: 2,
|
|
1420
1431
|
class: "status-text status-complete"
|
|
1421
|
-
}, Mn = { class: "nh-time-pickers" }, Ln = { class: "nh-time-picker" }, In = { class: "nh-date-picker" }, Bn = { class: "nh-date-picker-header" }, En = { class: "nh-date-picker-header-label" }, Tn = { class: "nh-date-picker-content" }, zn = { class: "nh-date-table" }, Kn = ["onClick"], Hn = { class: "nh-date-table-cell" }, Rn = { key: 0 },
|
|
1432
|
+
}, Mn = { class: "nh-time-pickers" }, Ln = { class: "nh-time-picker" }, In = { class: "nh-date-picker" }, Bn = { class: "nh-date-picker-header" }, En = { class: "nh-date-picker-header-label" }, Tn = { class: "nh-date-picker-content" }, zn = { class: "nh-date-table" }, Kn = ["onClick"], Hn = { class: "nh-date-table-cell" }, Rn = { key: 0 }, Vn = { class: "nh-time-picker" }, An = { class: "nh-date-picker" }, Fn = { class: "nh-date-picker-header" }, Yn = { class: "nh-date-picker-header-label" }, Pn = { class: "nh-date-picker-content" }, Nn = { class: "nh-date-table" }, Wn = ["onClick"], On = { class: "nh-date-table-cell" }, jn = { key: 0 }, qn = { class: "nh-time-actions" }, Un = /* @__PURE__ */ be({
|
|
1422
1433
|
__name: "ytime",
|
|
1423
1434
|
props: {
|
|
1424
1435
|
modelValue: { default: () => ({ startDate: null, endDate: null }) },
|
|
@@ -1427,8 +1438,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1427
1438
|
{
|
|
1428
1439
|
label: "今天",
|
|
1429
1440
|
getValue: () => {
|
|
1430
|
-
const e = /* @__PURE__ */ new Date(),
|
|
1431
|
-
return { startDate:
|
|
1441
|
+
const e = /* @__PURE__ */ new Date(), x = new Date(e.getFullYear(), e.getMonth(), e.getDate()), t = new Date(e.getFullYear(), e.getMonth(), e.getDate(), 23, 59, 59);
|
|
1442
|
+
return { startDate: x, endDate: t };
|
|
1432
1443
|
}
|
|
1433
1444
|
},
|
|
1434
1445
|
{
|
|
@@ -1436,29 +1447,29 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1436
1447
|
getValue: () => {
|
|
1437
1448
|
const e = /* @__PURE__ */ new Date();
|
|
1438
1449
|
e.setDate(e.getDate() - 1);
|
|
1439
|
-
const
|
|
1440
|
-
return { startDate:
|
|
1450
|
+
const x = new Date(e.getFullYear(), e.getMonth(), e.getDate()), t = new Date(e.getFullYear(), e.getMonth(), e.getDate(), 23, 59, 59);
|
|
1451
|
+
return { startDate: x, endDate: t };
|
|
1441
1452
|
}
|
|
1442
1453
|
},
|
|
1443
1454
|
{
|
|
1444
1455
|
label: "近7天",
|
|
1445
1456
|
getValue: () => {
|
|
1446
|
-
const e = /* @__PURE__ */ new Date(),
|
|
1447
|
-
return
|
|
1457
|
+
const e = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
|
|
1458
|
+
return x.setDate(x.getDate() - 6), x.setHours(0, 0, 0, 0), e.setHours(23, 59, 59, 999), { startDate: x, endDate: e };
|
|
1448
1459
|
}
|
|
1449
1460
|
},
|
|
1450
1461
|
{
|
|
1451
1462
|
label: "近30天",
|
|
1452
1463
|
getValue: () => {
|
|
1453
|
-
const e = /* @__PURE__ */ new Date(),
|
|
1454
|
-
return
|
|
1464
|
+
const e = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
|
|
1465
|
+
return x.setDate(x.getDate() - 29), x.setHours(0, 0, 0, 0), e.setHours(23, 59, 59, 999), { startDate: x, endDate: e };
|
|
1455
1466
|
}
|
|
1456
1467
|
},
|
|
1457
1468
|
{
|
|
1458
1469
|
label: "近3个月",
|
|
1459
1470
|
getValue: () => {
|
|
1460
|
-
const e = /* @__PURE__ */ new Date(),
|
|
1461
|
-
return
|
|
1471
|
+
const e = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
|
|
1472
|
+
return x.setMonth(x.getMonth() - 3), x.setHours(0, 0, 0, 0), e.setHours(23, 59, 59, 999), { startDate: x, endDate: e };
|
|
1462
1473
|
}
|
|
1463
1474
|
}
|
|
1464
1475
|
] },
|
|
@@ -1468,63 +1479,63 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1468
1479
|
size: { default: "small" }
|
|
1469
1480
|
},
|
|
1470
1481
|
emits: ["update:modelValue", "change"],
|
|
1471
|
-
setup(e, { emit:
|
|
1472
|
-
const t = e, n =
|
|
1482
|
+
setup(e, { emit: x }) {
|
|
1483
|
+
const t = e, n = x, y = K(!1), d = K(-1), f = K(-1), L = K(null), k = K(), S = K(), g = K({
|
|
1473
1484
|
top: !0,
|
|
1474
1485
|
left: !0
|
|
1475
|
-
}),
|
|
1486
|
+
}), w = K({
|
|
1476
1487
|
year: (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1477
1488
|
month: (/* @__PURE__ */ new Date()).getMonth()
|
|
1478
|
-
}), c =
|
|
1489
|
+
}), c = K({
|
|
1479
1490
|
year: (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1480
1491
|
month: (/* @__PURE__ */ new Date()).getMonth() + 1
|
|
1481
|
-
}),
|
|
1482
|
-
const
|
|
1483
|
-
if (
|
|
1484
|
-
const _ = new Date(
|
|
1492
|
+
}), M = () => {
|
|
1493
|
+
const a = new Date(w.value.year, w.value.month).getTime(), u = new Date(c.value.year, c.value.month).getTime();
|
|
1494
|
+
if (a >= u) {
|
|
1495
|
+
const _ = new Date(w.value.year, w.value.month + 1);
|
|
1485
1496
|
c.value.year = _.getFullYear(), c.value.month = _.getMonth();
|
|
1486
1497
|
}
|
|
1487
1498
|
}, q = () => {
|
|
1488
|
-
const
|
|
1489
|
-
if (new Date(c.value.year, c.value.month).getTime() <=
|
|
1499
|
+
const a = new Date(w.value.year, w.value.month).getTime();
|
|
1500
|
+
if (new Date(c.value.year, c.value.month).getTime() <= a) {
|
|
1490
1501
|
const _ = new Date(c.value.year, c.value.month - 1);
|
|
1491
|
-
|
|
1502
|
+
w.value.year = _.getFullYear(), w.value.month = _.getMonth();
|
|
1492
1503
|
}
|
|
1493
|
-
}, J = ["一", "二", "三", "四", "五", "六", "日"],
|
|
1494
|
-
if (!
|
|
1495
|
-
if (
|
|
1496
|
-
if (typeof
|
|
1497
|
-
return new Date(
|
|
1498
|
-
if (typeof
|
|
1499
|
-
const u = new Date(
|
|
1504
|
+
}, J = ["一", "二", "三", "四", "五", "六", "日"], F = K(null), D = K(null), T = (a) => {
|
|
1505
|
+
if (!a) return null;
|
|
1506
|
+
if (a instanceof Date) return a;
|
|
1507
|
+
if (typeof a == "number")
|
|
1508
|
+
return new Date(a);
|
|
1509
|
+
if (typeof a == "string") {
|
|
1510
|
+
const u = new Date(a);
|
|
1500
1511
|
return isNaN(u.getTime()) ? null : u;
|
|
1501
1512
|
}
|
|
1502
1513
|
return null;
|
|
1503
|
-
}, I = (
|
|
1504
|
-
if (!
|
|
1505
|
-
const u =
|
|
1514
|
+
}, I = (a) => {
|
|
1515
|
+
if (!a) return null;
|
|
1516
|
+
const u = a.getFullYear(), _ = String(a.getMonth() + 1).padStart(2, "0"), P = String(a.getDate()).padStart(2, "0");
|
|
1506
1517
|
if (t.includeTime) {
|
|
1507
|
-
const
|
|
1508
|
-
return `${u}-${_}-${P} ${
|
|
1518
|
+
const se = String(a.getHours()).padStart(2, "0"), oe = String(a.getMinutes()).padStart(2, "0"), re = String(a.getSeconds()).padStart(2, "0");
|
|
1519
|
+
return `${u}-${_}-${P} ${se}:${oe}:${re}`;
|
|
1509
1520
|
} else
|
|
1510
1521
|
return `${u}-${_}-${P}`;
|
|
1511
|
-
},
|
|
1512
|
-
startDate: T(
|
|
1513
|
-
endDate: T(
|
|
1514
|
-
} : { startDate: null, endDate: null }, ie = (
|
|
1515
|
-
startDate: I(
|
|
1516
|
-
endDate: I(
|
|
1522
|
+
}, H = (a) => a ? a.getTime() : null, O = (a) => a ? {
|
|
1523
|
+
startDate: T(a.startDate),
|
|
1524
|
+
endDate: T(a.endDate)
|
|
1525
|
+
} : { startDate: null, endDate: null }, ie = (a) => t.format === "string" ? {
|
|
1526
|
+
startDate: I(a.startDate),
|
|
1527
|
+
endDate: I(a.endDate)
|
|
1517
1528
|
} : t.format === "timestamp" ? {
|
|
1518
|
-
startDate:
|
|
1519
|
-
endDate:
|
|
1520
|
-
} :
|
|
1521
|
-
const u =
|
|
1529
|
+
startDate: H(a.startDate),
|
|
1530
|
+
endDate: H(a.endDate)
|
|
1531
|
+
} : a, X = (a, u) => `${String(u + 1).padStart(2, "0")}/${a}`, ye = (a, u) => a.getFullYear() === u.getFullYear() && a.getMonth() === u.getMonth() && a.getDate() === u.getDate(), G = (a, u, _) => !u || !_ ? !1 : a >= u && a <= _, fe = (a) => {
|
|
1532
|
+
const u = O(a);
|
|
1522
1533
|
if (!(u != null && u.startDate) || !(u != null && u.endDate))
|
|
1523
1534
|
return -1;
|
|
1524
1535
|
for (let _ = 0; _ < t.shortcuts.length; _++) {
|
|
1525
1536
|
const P = t.shortcuts[_].getValue();
|
|
1526
1537
|
if (P.startDate && P.endDate && u.startDate && u.endDate) {
|
|
1527
|
-
const
|
|
1538
|
+
const se = new Date(
|
|
1528
1539
|
u.startDate.getFullYear(),
|
|
1529
1540
|
u.startDate.getMonth(),
|
|
1530
1541
|
u.startDate.getDate()
|
|
@@ -1541,15 +1552,15 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1541
1552
|
P.endDate.getMonth(),
|
|
1542
1553
|
P.endDate.getDate()
|
|
1543
1554
|
);
|
|
1544
|
-
if (
|
|
1555
|
+
if (se.getTime() === re.getTime() && oe.getTime() === $e.getTime())
|
|
1545
1556
|
return _;
|
|
1546
1557
|
}
|
|
1547
1558
|
}
|
|
1548
1559
|
return -1;
|
|
1549
|
-
}, ge = (
|
|
1550
|
-
const _ = new Date(
|
|
1560
|
+
}, ge = (a, u) => {
|
|
1561
|
+
const _ = new Date(a, u, 1), P = new Date(a, u + 1, 0), se = _.getDay(), oe = P.getDate(), re = [], $e = /* @__PURE__ */ new Date(), Ne = se === 0 ? 6 : se - 1, Ge = new Date(a, u, 0);
|
|
1551
1562
|
for (let me = Ne - 1; me >= 0; me--) {
|
|
1552
|
-
const Le = new Date(
|
|
1563
|
+
const Le = new Date(a, u - 1, Ge.getDate() - me);
|
|
1553
1564
|
re.push({
|
|
1554
1565
|
date: Le,
|
|
1555
1566
|
day: Le.getDate(),
|
|
@@ -1562,7 +1573,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1562
1573
|
});
|
|
1563
1574
|
}
|
|
1564
1575
|
for (let me = 1; me <= oe; me++) {
|
|
1565
|
-
const Le = new Date(
|
|
1576
|
+
const Le = new Date(a, u, me);
|
|
1566
1577
|
re.push({
|
|
1567
1578
|
date: Le,
|
|
1568
1579
|
day: me,
|
|
@@ -1575,7 +1586,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1575
1586
|
}
|
|
1576
1587
|
const et = 42 - re.length;
|
|
1577
1588
|
for (let me = 1; me <= et; me++) {
|
|
1578
|
-
const Le = new Date(
|
|
1589
|
+
const Le = new Date(a, u + 1, me);
|
|
1579
1590
|
re.push({
|
|
1580
1591
|
date: Le,
|
|
1581
1592
|
day: me,
|
|
@@ -1587,166 +1598,166 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1587
1598
|
// 禁用非当前月的日期
|
|
1588
1599
|
});
|
|
1589
1600
|
}
|
|
1590
|
-
const
|
|
1601
|
+
const je = [];
|
|
1591
1602
|
for (let me = 0; me < re.length; me += 7)
|
|
1592
|
-
|
|
1593
|
-
return
|
|
1594
|
-
},
|
|
1595
|
-
const u = ie(
|
|
1603
|
+
je.push(re.slice(me, me + 7));
|
|
1604
|
+
return je;
|
|
1605
|
+
}, A = (a) => {
|
|
1606
|
+
const u = ie(a);
|
|
1596
1607
|
n("update:modelValue", u), n("change", u);
|
|
1597
1608
|
}, N = () => {
|
|
1598
|
-
if (!
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1601
|
-
const $e = _ -
|
|
1609
|
+
if (!k.value || !S.value) return;
|
|
1610
|
+
const a = k.value.getBoundingClientRect(), u = S.value.getBoundingClientRect(), _ = window.innerWidth, se = window.innerHeight - a.bottom, oe = a.top, re = u.height || 400;
|
|
1611
|
+
se < re && oe > re ? g.value.top = !1 : g.value.top = !0;
|
|
1612
|
+
const $e = _ - a.left, Ne = u.width || 640;
|
|
1602
1613
|
$e < Ne ? g.value.left = !1 : g.value.left = !0;
|
|
1603
1614
|
}, U = () => {
|
|
1604
1615
|
if (y.value = !y.value, y.value) {
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
c.value.year =
|
|
1616
|
+
const a = O(t.modelValue);
|
|
1617
|
+
if (F.value = (a == null ? void 0 : a.startDate) || null, D.value = (a == null ? void 0 : a.endDate) || null, f.value = fe(t.modelValue), d.value = -1, a != null && a.startDate && (w.value.year = a.startDate.getFullYear(), w.value.month = a.startDate.getMonth()), a != null && a.endDate)
|
|
1618
|
+
c.value.year = a.endDate.getFullYear(), c.value.month = a.endDate.getMonth();
|
|
1608
1619
|
else {
|
|
1609
|
-
const u = new Date(
|
|
1620
|
+
const u = new Date(w.value.year, w.value.month + 1);
|
|
1610
1621
|
c.value.year = u.getFullYear(), c.value.month = u.getMonth();
|
|
1611
1622
|
}
|
|
1612
|
-
|
|
1623
|
+
M(), he(() => {
|
|
1613
1624
|
N();
|
|
1614
1625
|
});
|
|
1615
1626
|
}
|
|
1616
|
-
}, Z = (
|
|
1617
|
-
const u =
|
|
1627
|
+
}, Z = (a) => {
|
|
1628
|
+
const u = a.target, _ = k.value, P = S.value;
|
|
1618
1629
|
_ && P && !_.contains(u) && !P.contains(u) && (y.value = !1, d.value = -1);
|
|
1619
|
-
}, p = (
|
|
1620
|
-
|
|
1621
|
-
N(),
|
|
1630
|
+
}, p = (a) => {
|
|
1631
|
+
a.key === "Enter" || a.key === " " ? (a.preventDefault(), U()) : a.key === "ArrowDown" && (a.preventDefault(), y.value = !0, he(() => {
|
|
1632
|
+
N(), b();
|
|
1622
1633
|
}));
|
|
1623
|
-
},
|
|
1634
|
+
}, v = (a) => {
|
|
1624
1635
|
var u;
|
|
1625
|
-
|
|
1626
|
-
}, o = (
|
|
1627
|
-
|
|
1628
|
-
},
|
|
1629
|
-
d.value =
|
|
1630
|
-
},
|
|
1636
|
+
a.key === "Escape" && (y.value = !1, d.value = -1, (u = k.value) == null || u.focus());
|
|
1637
|
+
}, o = (a, u) => {
|
|
1638
|
+
a.key === "ArrowDown" ? (a.preventDefault(), d.value = Math.min(u + 1, t.shortcuts.length - 1), m(d.value)) : a.key === "ArrowUp" ? (a.preventDefault(), d.value = Math.max(u - 1, 0), m(d.value)) : (a.key === "Enter" || a.key === " ") && (a.preventDefault(), V(t.shortcuts[u]));
|
|
1639
|
+
}, s = (a) => {
|
|
1640
|
+
d.value = a;
|
|
1641
|
+
}, h = () => {
|
|
1631
1642
|
d.value = -1;
|
|
1632
|
-
},
|
|
1643
|
+
}, b = () => {
|
|
1633
1644
|
d.value = 0, m(0);
|
|
1634
|
-
}, m = (
|
|
1635
|
-
if (
|
|
1636
|
-
const _ =
|
|
1645
|
+
}, m = (a) => {
|
|
1646
|
+
if (S.value) {
|
|
1647
|
+
const _ = S.value.querySelectorAll(".nh-time-shortcut")[a];
|
|
1637
1648
|
_ && _.focus();
|
|
1638
1649
|
}
|
|
1639
|
-
},
|
|
1640
|
-
const u =
|
|
1641
|
-
t.includeTime && u.startDate && u.endDate && (u.startDate.setHours(0, 0, 0, 0), u.endDate.setHours(23, 59, 59, 999)),
|
|
1642
|
-
}, ee = (
|
|
1643
|
-
if (!
|
|
1650
|
+
}, V = (a) => {
|
|
1651
|
+
const u = a.getValue();
|
|
1652
|
+
t.includeTime && u.startDate && u.endDate && (u.startDate.setHours(0, 0, 0, 0), u.endDate.setHours(23, 59, 59, 999)), A(u), f.value = t.shortcuts.findIndex((_) => _.label === a.label), d.value = -1, y.value = !1;
|
|
1653
|
+
}, ee = (a, u) => {
|
|
1654
|
+
if (!a || a.isDisabled) return;
|
|
1644
1655
|
let _;
|
|
1645
|
-
if (t.includeTime ? (_ = new Date(
|
|
1646
|
-
|
|
1647
|
-
else if (
|
|
1648
|
-
if (_ >=
|
|
1656
|
+
if (t.includeTime ? (_ = new Date(a.date), u === "start" || !F.value ? _.setHours(0, 0, 0, 0) : _.setHours(23, 59, 59, 999)) : _ = new Date(a.date.getFullYear(), a.date.getMonth(), a.date.getDate()), !F.value && !D.value)
|
|
1657
|
+
F.value = _, D.value = null;
|
|
1658
|
+
else if (F.value && !D.value)
|
|
1659
|
+
if (_ >= F.value)
|
|
1649
1660
|
t.includeTime && _.setHours(23, 59, 59, 999), D.value = _;
|
|
1650
1661
|
else {
|
|
1651
|
-
const P =
|
|
1652
|
-
t.includeTime && P.setHours(23, 59, 59, 999), D.value = P,
|
|
1662
|
+
const P = F.value;
|
|
1663
|
+
t.includeTime && P.setHours(23, 59, 59, 999), D.value = P, F.value = _;
|
|
1653
1664
|
}
|
|
1654
1665
|
else
|
|
1655
|
-
|
|
1656
|
-
if (
|
|
1666
|
+
F.value = _, D.value = null;
|
|
1667
|
+
if (f.value = -1, F.value && D.value) {
|
|
1657
1668
|
const P = new Date(D.value);
|
|
1658
1669
|
t.includeTime && P.setHours(23, 59, 59, 999), L.value = {
|
|
1659
|
-
startDate:
|
|
1670
|
+
startDate: F.value,
|
|
1660
1671
|
endDate: P
|
|
1661
1672
|
};
|
|
1662
1673
|
} else
|
|
1663
1674
|
L.value = null;
|
|
1664
|
-
}, te = (
|
|
1665
|
-
if (!
|
|
1675
|
+
}, te = (a, u) => {
|
|
1676
|
+
if (!a) return ["nh-date-table-td"];
|
|
1666
1677
|
const _ = ["nh-date-table-td"];
|
|
1667
|
-
return
|
|
1678
|
+
return a.isCurrentMonth || _.push("is-prev-month"), a.isToday && _.push("is-today"), a.isDisabled && _.push("is-disabled"), F.value && ye(a.date, F.value) && _.push("is-selected", "is-start"), D.value && ye(a.date, D.value) && _.push("is-selected", "is-end"), F.value && D.value && G(a.date, F.value, D.value) && _.push("is-in-range"), _;
|
|
1668
1679
|
}, Me = () => {
|
|
1669
|
-
L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999),
|
|
1680
|
+
L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999), A(L.value), f.value = fe(L.value), y.value = !1);
|
|
1670
1681
|
}, Re = () => {
|
|
1671
|
-
|
|
1682
|
+
A({ startDate: null, endDate: null }), Y(), d.value = -1, y.value = !1;
|
|
1672
1683
|
}, ze = () => {
|
|
1673
1684
|
y.value && he(() => {
|
|
1674
1685
|
N();
|
|
1675
1686
|
});
|
|
1676
|
-
}, _e =
|
|
1677
|
-
const
|
|
1678
|
-
if (!
|
|
1687
|
+
}, _e = j(() => ge(w.value.year, w.value.month)), Ke = j(() => ge(c.value.year, c.value.month)), C = j(() => {
|
|
1688
|
+
const a = O(t.modelValue);
|
|
1689
|
+
if (!a || !a.startDate || !a.endDate)
|
|
1679
1690
|
return "";
|
|
1680
|
-
const u = (
|
|
1681
|
-
const oe = String(
|
|
1691
|
+
const u = (se) => {
|
|
1692
|
+
const oe = String(se.getFullYear()), re = String(se.getMonth() + 1).padStart(2, "0"), $e = String(se.getDate()).padStart(2, "0");
|
|
1682
1693
|
return `${oe}/${re}/${$e}`;
|
|
1683
|
-
}, _ = u(
|
|
1694
|
+
}, _ = u(a.startDate), P = u(a.endDate);
|
|
1684
1695
|
return !t.includeTime && _ === P ? _ : `${_} - ${P}`;
|
|
1685
|
-
}), $ =
|
|
1696
|
+
}), $ = j(() => [
|
|
1686
1697
|
"nh-time-dropdown",
|
|
1687
1698
|
{
|
|
1688
1699
|
"nh-time-dropdown-top": !g.value.top,
|
|
1689
1700
|
"nh-time-dropdown-right": !g.value.left
|
|
1690
1701
|
}
|
|
1691
|
-
]), z =
|
|
1692
|
-
const
|
|
1693
|
-
return !!(
|
|
1694
|
-
}), B =
|
|
1695
|
-
|
|
1702
|
+
]), z = j(() => {
|
|
1703
|
+
const a = O(t.modelValue);
|
|
1704
|
+
return !!(a != null && a.startDate && (a != null && a.endDate));
|
|
1705
|
+
}), B = j(() => !!(F.value && D.value)), Y = () => {
|
|
1706
|
+
F.value = null, D.value = null, L.value = null, f.value = -1;
|
|
1696
1707
|
};
|
|
1697
|
-
|
|
1698
|
-
const u =
|
|
1708
|
+
ae(() => t.modelValue, (a) => {
|
|
1709
|
+
const u = O(a);
|
|
1699
1710
|
if (u != null && u.startDate) {
|
|
1700
1711
|
const _ = u.startDate;
|
|
1701
|
-
|
|
1712
|
+
w.value.year = _.getFullYear(), w.value.month = _.getMonth();
|
|
1702
1713
|
}
|
|
1703
1714
|
if (u != null && u.endDate) {
|
|
1704
1715
|
const _ = u.endDate;
|
|
1705
1716
|
c.value.year = _.getFullYear(), c.value.month = _.getMonth();
|
|
1706
1717
|
} else if (u != null && u.startDate) {
|
|
1707
|
-
const _ = new Date(
|
|
1718
|
+
const _ = new Date(w.value.year, w.value.month + 1);
|
|
1708
1719
|
c.value.year = _.getFullYear(), c.value.month = _.getMonth();
|
|
1709
1720
|
}
|
|
1710
|
-
(u != null && u.startDate || u != null && u.endDate) &&
|
|
1711
|
-
}, { immediate: !0, deep: !0 }),
|
|
1712
|
-
const
|
|
1713
|
-
if (
|
|
1714
|
-
const _ = new Date(
|
|
1721
|
+
(u != null && u.startDate || u != null && u.endDate) && M(), y.value || (f.value = fe(a));
|
|
1722
|
+
}, { immediate: !0, deep: !0 }), ae([w, c], () => {
|
|
1723
|
+
const a = new Date(w.value.year, w.value.month).getTime(), u = new Date(c.value.year, c.value.month).getTime();
|
|
1724
|
+
if (a === u) {
|
|
1725
|
+
const _ = new Date(w.value.year, w.value.month + 1);
|
|
1715
1726
|
c.value.year = _.getFullYear(), c.value.month = _.getMonth();
|
|
1716
1727
|
}
|
|
1717
1728
|
}, { deep: !0 }), Se(() => {
|
|
1718
|
-
document.addEventListener("click", Z), window.addEventListener("resize", ze), window.addEventListener("scroll", ze),
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1721
|
-
c.value.year =
|
|
1729
|
+
document.addEventListener("click", Z), window.addEventListener("resize", ze), window.addEventListener("scroll", ze), f.value = fe(t.modelValue);
|
|
1730
|
+
const a = O(t.modelValue);
|
|
1731
|
+
if (a != null && a.startDate && (w.value.year = a.startDate.getFullYear(), w.value.month = a.startDate.getMonth()), a != null && a.endDate)
|
|
1732
|
+
c.value.year = a.endDate.getFullYear(), c.value.month = a.endDate.getMonth();
|
|
1722
1733
|
else {
|
|
1723
|
-
const u = new Date(
|
|
1734
|
+
const u = new Date(w.value.year, w.value.month + 1);
|
|
1724
1735
|
c.value.year = u.getFullYear(), c.value.month = u.getMonth();
|
|
1725
1736
|
}
|
|
1726
|
-
|
|
1737
|
+
M();
|
|
1727
1738
|
}), Te(() => {
|
|
1728
1739
|
document.removeEventListener("click", Z), window.removeEventListener("resize", ze), window.removeEventListener("scroll", ze);
|
|
1729
1740
|
});
|
|
1730
1741
|
const W = () => {
|
|
1731
|
-
t.clearable && (
|
|
1732
|
-
}, ne = (
|
|
1733
|
-
if (
|
|
1734
|
-
const _ = new Date(
|
|
1735
|
-
|
|
1742
|
+
t.clearable && (A({ startDate: null, endDate: null }), Y(), d.value = -1);
|
|
1743
|
+
}, ne = (a, u) => {
|
|
1744
|
+
if (a === "start") {
|
|
1745
|
+
const _ = new Date(w.value.year, w.value.month + u, 1);
|
|
1746
|
+
w.value.year = _.getFullYear(), w.value.month = _.getMonth(), M();
|
|
1736
1747
|
} else {
|
|
1737
1748
|
const _ = new Date(c.value.year, c.value.month + u, 1);
|
|
1738
1749
|
c.value.year = _.getFullYear(), c.value.month = _.getMonth(), q();
|
|
1739
1750
|
}
|
|
1740
1751
|
};
|
|
1741
|
-
return (
|
|
1742
|
-
const _ =
|
|
1752
|
+
return (a, u) => {
|
|
1753
|
+
const _ = Ve("YButton");
|
|
1743
1754
|
return i(), r("div", {
|
|
1744
1755
|
class: E(["nh-time-search", [`nh-time--${e.size}`]])
|
|
1745
1756
|
}, [
|
|
1746
1757
|
l("div", yn, [
|
|
1747
1758
|
l("div", {
|
|
1748
1759
|
ref_key: "trigger",
|
|
1749
|
-
ref:
|
|
1760
|
+
ref: k,
|
|
1750
1761
|
onClick: U,
|
|
1751
1762
|
onKeydown: p,
|
|
1752
1763
|
class: E(["nh-time-trigger", { "is-focus": y.value, "has-value": z.value }]),
|
|
@@ -1808,24 +1819,24 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1808
1819
|
y.value ? (i(), r("div", {
|
|
1809
1820
|
key: 0,
|
|
1810
1821
|
ref_key: "dropdown",
|
|
1811
|
-
ref:
|
|
1822
|
+
ref: S,
|
|
1812
1823
|
class: E($.value),
|
|
1813
|
-
onKeydown:
|
|
1824
|
+
onKeydown: v
|
|
1814
1825
|
}, [
|
|
1815
1826
|
l("div", wn, [
|
|
1816
1827
|
u[7] || (u[7] = l("div", { class: "nh-time-shortcuts-title" }, "快捷选项", -1)),
|
|
1817
1828
|
l("ul", bn, [
|
|
1818
|
-
(i(!0), r(ue, null, pe(e.shortcuts, (P,
|
|
1829
|
+
(i(!0), r(ue, null, pe(e.shortcuts, (P, se) => (i(), r("li", {
|
|
1819
1830
|
key: P.label,
|
|
1820
|
-
onClick: (oe) =>
|
|
1821
|
-
onKeydown: (oe) => o(oe,
|
|
1822
|
-
onMouseenter: (oe) =>
|
|
1823
|
-
onMouseleave:
|
|
1831
|
+
onClick: (oe) => V(P),
|
|
1832
|
+
onKeydown: (oe) => o(oe, se),
|
|
1833
|
+
onMouseenter: (oe) => s(se),
|
|
1834
|
+
onMouseleave: h,
|
|
1824
1835
|
class: E([
|
|
1825
1836
|
"nh-time-shortcut",
|
|
1826
1837
|
{
|
|
1827
|
-
"is-active": d.value ===
|
|
1828
|
-
"is-selected":
|
|
1838
|
+
"is-active": d.value === se,
|
|
1839
|
+
"is-selected": f.value === se
|
|
1829
1840
|
}
|
|
1830
1841
|
]),
|
|
1831
1842
|
tabindex: "0"
|
|
@@ -1836,7 +1847,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1836
1847
|
l("div", Dn, [
|
|
1837
1848
|
u[8] || (u[8] = l("span", null, "自定义时间", -1)),
|
|
1838
1849
|
l("div", Cn, [
|
|
1839
|
-
!
|
|
1850
|
+
!F.value && !D.value ? (i(), r("span", $n, " 请选择开始日期 ")) : F.value && !D.value ? (i(), r("span", _n, " 请选择结束日期 ")) : F.value && D.value ? (i(), r("span", Sn, " 已选择完整范围 ")) : R("", !0)
|
|
1840
1851
|
])
|
|
1841
1852
|
]),
|
|
1842
1853
|
l("div", Mn, [
|
|
@@ -1859,7 +1870,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1859
1870
|
})
|
|
1860
1871
|
], -1)
|
|
1861
1872
|
])]),
|
|
1862
|
-
l("span", En, le(X(
|
|
1873
|
+
l("span", En, le(X(w.value.year, w.value.month)), 1),
|
|
1863
1874
|
l("button", {
|
|
1864
1875
|
onClick: u[1] || (u[1] = (P) => ne("start", 1)),
|
|
1865
1876
|
class: "nh-date-picker-btn nh-date-picker-next-btn",
|
|
@@ -1888,11 +1899,11 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1888
1899
|
])
|
|
1889
1900
|
]),
|
|
1890
1901
|
l("tbody", null, [
|
|
1891
|
-
(i(!0), r(ue, null, pe(_e.value, (P,
|
|
1892
|
-
key: `start-week-${
|
|
1902
|
+
(i(!0), r(ue, null, pe(_e.value, (P, se) => (i(), r("tr", {
|
|
1903
|
+
key: `start-week-${se}`
|
|
1893
1904
|
}, [
|
|
1894
1905
|
(i(!0), r(ue, null, pe(P, (oe, re) => (i(), r("td", {
|
|
1895
|
-
key: `start-day-${
|
|
1906
|
+
key: `start-day-${se}-${re}`,
|
|
1896
1907
|
class: E(te(oe)),
|
|
1897
1908
|
onClick: ($e) => ee(oe, "start")
|
|
1898
1909
|
}, [
|
|
@@ -1906,9 +1917,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1906
1917
|
])
|
|
1907
1918
|
])
|
|
1908
1919
|
]),
|
|
1909
|
-
l("div",
|
|
1910
|
-
l("div",
|
|
1911
|
-
l("div",
|
|
1920
|
+
l("div", Vn, [
|
|
1921
|
+
l("div", An, [
|
|
1922
|
+
l("div", Fn, [
|
|
1912
1923
|
l("button", {
|
|
1913
1924
|
onClick: u[2] || (u[2] = (P) => ne("end", -1)),
|
|
1914
1925
|
class: "nh-date-picker-btn nh-date-picker-prev-btn",
|
|
@@ -1925,7 +1936,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1925
1936
|
})
|
|
1926
1937
|
], -1)
|
|
1927
1938
|
])]),
|
|
1928
|
-
l("span",
|
|
1939
|
+
l("span", Yn, le(X(c.value.year, c.value.month)), 1),
|
|
1929
1940
|
l("button", {
|
|
1930
1941
|
onClick: u[3] || (u[3] = (P) => ne("end", 1)),
|
|
1931
1942
|
class: "nh-date-picker-btn nh-date-picker-next-btn",
|
|
@@ -1954,16 +1965,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1954
1965
|
])
|
|
1955
1966
|
]),
|
|
1956
1967
|
l("tbody", null, [
|
|
1957
|
-
(i(!0), r(ue, null, pe(Ke.value, (P,
|
|
1958
|
-
key: `end-week-${
|
|
1968
|
+
(i(!0), r(ue, null, pe(Ke.value, (P, se) => (i(), r("tr", {
|
|
1969
|
+
key: `end-week-${se}`
|
|
1959
1970
|
}, [
|
|
1960
1971
|
(i(!0), r(ue, null, pe(P, (oe, re) => (i(), r("td", {
|
|
1961
|
-
key: `end-day-${
|
|
1972
|
+
key: `end-day-${se}-${re}`,
|
|
1962
1973
|
class: E(te(oe)),
|
|
1963
1974
|
onClick: ($e) => ee(oe, "end")
|
|
1964
1975
|
}, [
|
|
1965
|
-
l("div",
|
|
1966
|
-
oe ? (i(), r("span",
|
|
1976
|
+
l("div", On, [
|
|
1977
|
+
oe ? (i(), r("span", jn, le(oe.day), 1)) : R("", !0)
|
|
1967
1978
|
])
|
|
1968
1979
|
], 10, Wn))), 128))
|
|
1969
1980
|
]))), 128))
|
|
@@ -1992,7 +2003,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1992
2003
|
size: e.size
|
|
1993
2004
|
}, {
|
|
1994
2005
|
default: ve(() => [
|
|
1995
|
-
Ce(le(
|
|
2006
|
+
Ce(le(F.value && !D.value ? "继续选择结束日期" : "确认"), 1)
|
|
1996
2007
|
]),
|
|
1997
2008
|
_: 1
|
|
1998
2009
|
}, 8, ["disabled", "size"])
|
|
@@ -2026,27 +2037,27 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2026
2037
|
showText: { type: Boolean, default: !1 }
|
|
2027
2038
|
},
|
|
2028
2039
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2029
|
-
setup(e, { emit:
|
|
2030
|
-
const t = e, n =
|
|
2031
|
-
const
|
|
2032
|
-
return
|
|
2040
|
+
setup(e, { emit: x }) {
|
|
2041
|
+
const t = e, n = x, y = K(), d = j(() => t.modelValue === t.trueValue), f = j(() => {
|
|
2042
|
+
const k = {};
|
|
2043
|
+
return k.background = d.value ? t.activeColor : t.inactiveColor, k;
|
|
2033
2044
|
});
|
|
2034
2045
|
function L() {
|
|
2035
2046
|
if (t.disabled || t.loading) return;
|
|
2036
|
-
const
|
|
2037
|
-
n("update:modelValue",
|
|
2047
|
+
const k = d.value ? t.falseValue : t.trueValue;
|
|
2048
|
+
n("update:modelValue", k), n("change", k);
|
|
2038
2049
|
}
|
|
2039
2050
|
return Se(() => {
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2042
|
-
}), (
|
|
2051
|
+
const k = y.value;
|
|
2052
|
+
k && (k.addEventListener("focus", (S) => n("focus", S)), k.addEventListener("blur", (S) => n("blur", S)));
|
|
2053
|
+
}), (k, S) => (i(), r("button", {
|
|
2043
2054
|
ref_key: "rootEl",
|
|
2044
2055
|
ref: y,
|
|
2045
2056
|
class: E(["yswitch", [
|
|
2046
2057
|
`yswitch--${e.size}`,
|
|
2047
2058
|
{ "yswitch--checked": d.value, "yswitch--disabled": e.disabled, "yswitch--loading": e.loading }
|
|
2048
2059
|
]]),
|
|
2049
|
-
style: we(
|
|
2060
|
+
style: we(f.value),
|
|
2050
2061
|
role: "switch",
|
|
2051
2062
|
"aria-checked": d.value,
|
|
2052
2063
|
"aria-disabled": e.disabled,
|
|
@@ -2057,7 +2068,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2057
2068
|
xe(Q(L, ["prevent"]), ["space"])
|
|
2058
2069
|
]
|
|
2059
2070
|
}, [
|
|
2060
|
-
|
|
2071
|
+
S[0] || (S[0] = l("span", { class: "yswitch__track" }, null, -1)),
|
|
2061
2072
|
l("span", Qn, [
|
|
2062
2073
|
e.loading ? (i(), r("span", Jn)) : R("", !0)
|
|
2063
2074
|
]),
|
|
@@ -2082,25 +2093,25 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2082
2093
|
previewSrcList: {}
|
|
2083
2094
|
},
|
|
2084
2095
|
emits: ["load", "error", "preview"],
|
|
2085
|
-
setup(e, { expose:
|
|
2086
|
-
const n = e, y = t, d =
|
|
2096
|
+
setup(e, { expose: x, emit: t }) {
|
|
2097
|
+
const n = e, y = t, d = K(), f = K(), L = K(), k = K(!1), S = K(!1), g = K(!1), w = K(!1), c = K(!1), M = K("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), q = K(""), J = K(1), F = K(!1), D = K({
|
|
2087
2098
|
overflow: "",
|
|
2088
2099
|
paddingRight: ""
|
|
2089
|
-
}), T =
|
|
2100
|
+
}), T = j(() => [
|
|
2090
2101
|
n.className,
|
|
2091
2102
|
"overflow-hidden"
|
|
2092
|
-
].filter(Boolean).join(" ")), I =
|
|
2103
|
+
].filter(Boolean).join(" ")), I = j(() => [
|
|
2093
2104
|
X(),
|
|
2094
2105
|
G()
|
|
2095
|
-
].filter(Boolean).join(" ")),
|
|
2106
|
+
].filter(Boolean).join(" ")), H = j(() => [
|
|
2096
2107
|
"w-full h-full bg-white",
|
|
2097
2108
|
ye(),
|
|
2098
2109
|
G(),
|
|
2099
2110
|
n.preview ? "cursor-pointer hover:opacity-90 transition-opacity duration-200" : ""
|
|
2100
|
-
].filter(Boolean).join(" ")),
|
|
2111
|
+
].filter(Boolean).join(" ")), O = j(() => [
|
|
2101
2112
|
X(),
|
|
2102
2113
|
G()
|
|
2103
|
-
].filter(Boolean).join(" ")), ie =
|
|
2114
|
+
].filter(Boolean).join(" ")), ie = j(() => {
|
|
2104
2115
|
const m = {};
|
|
2105
2116
|
return n.width && (m.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.height && (m.height = typeof n.height == "number" ? `${n.height}px` : n.height), m;
|
|
2106
2117
|
}), X = () => n.width && n.height ? "" : "w-full h-full", ye = () => ({
|
|
@@ -2112,26 +2123,26 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2112
2123
|
})[n.fit] || "object-cover", G = () => typeof n.radius == "number" ? `rounded-${n.radius}` : typeof n.radius == "string" ? n.radius.includes("px") ? "" : `rounded-${n.radius}` : "", fe = () => {
|
|
2113
2124
|
const m = document.createElement("div");
|
|
2114
2125
|
m.style.cssText = "width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(m);
|
|
2115
|
-
const
|
|
2116
|
-
return document.body.removeChild(m),
|
|
2126
|
+
const V = m.offsetWidth - m.clientWidth;
|
|
2127
|
+
return document.body.removeChild(m), V;
|
|
2117
2128
|
}, ge = () => {
|
|
2118
2129
|
if (D.value = {
|
|
2119
2130
|
overflow: document.body.style.overflow || "",
|
|
2120
2131
|
paddingRight: document.body.style.paddingRight || ""
|
|
2121
2132
|
}, document.body.scrollHeight > window.innerHeight) {
|
|
2122
|
-
const
|
|
2123
|
-
document.body.style.paddingRight = `${
|
|
2133
|
+
const V = fe();
|
|
2134
|
+
document.body.style.paddingRight = `${V}px`;
|
|
2124
2135
|
}
|
|
2125
2136
|
document.body.style.overflow = "hidden";
|
|
2126
|
-
},
|
|
2137
|
+
}, A = () => {
|
|
2127
2138
|
document.body.style.overflow = D.value.overflow, document.body.style.paddingRight = D.value.paddingRight;
|
|
2128
2139
|
};
|
|
2129
2140
|
let N = null;
|
|
2130
2141
|
const U = () => {
|
|
2131
2142
|
!n.lazy || !d.value || (N = new IntersectionObserver(
|
|
2132
2143
|
(m) => {
|
|
2133
|
-
m.forEach((
|
|
2134
|
-
|
|
2144
|
+
m.forEach((V) => {
|
|
2145
|
+
V.isIntersecting && (w.value = !0, M.value = n.src, N == null || N.unobserve(V.target));
|
|
2135
2146
|
});
|
|
2136
2147
|
},
|
|
2137
2148
|
{
|
|
@@ -2139,12 +2150,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2139
2150
|
}
|
|
2140
2151
|
), N.observe(d.value));
|
|
2141
2152
|
}, Z = (m) => {
|
|
2142
|
-
|
|
2153
|
+
k.value = !0, S.value = !1, g.value = !1, y("load", m);
|
|
2143
2154
|
}, p = (m) => {
|
|
2144
|
-
g.value = !0,
|
|
2145
|
-
},
|
|
2146
|
-
g.value = !1,
|
|
2147
|
-
|
|
2155
|
+
g.value = !0, S.value = !1, k.value = !1, y("error", m);
|
|
2156
|
+
}, v = () => {
|
|
2157
|
+
g.value = !1, S.value = !0, k.value = !1, he(() => {
|
|
2158
|
+
f.value && (f.value.src = n.src);
|
|
2148
2159
|
});
|
|
2149
2160
|
}, o = () => {
|
|
2150
2161
|
if (!n.preview || g.value) return;
|
|
@@ -2157,35 +2168,35 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2157
2168
|
}, m.onerror = () => {
|
|
2158
2169
|
q.value = n.src, c.value = !0, ge(), y("preview", n.src);
|
|
2159
2170
|
}, m.src = n.src;
|
|
2160
|
-
},
|
|
2171
|
+
}, s = () => {
|
|
2161
2172
|
c.value = !1, setTimeout(() => {
|
|
2162
|
-
|
|
2173
|
+
A();
|
|
2163
2174
|
}, 300);
|
|
2164
|
-
},
|
|
2165
|
-
const
|
|
2166
|
-
let te = J.value +
|
|
2175
|
+
}, h = (m) => {
|
|
2176
|
+
const V = m.deltaY < 0 ? 1 : -1;
|
|
2177
|
+
let te = J.value + V * 0.1;
|
|
2167
2178
|
te = Math.max(0.5, Math.min(2, te)), J.value = te;
|
|
2168
2179
|
};
|
|
2169
2180
|
return Se(() => {
|
|
2170
|
-
n.lazy ? U() :
|
|
2181
|
+
n.lazy ? U() : w.value = !0, w.value && (S.value = !0), F.value = !0;
|
|
2171
2182
|
}), Te(() => {
|
|
2172
|
-
N && N.disconnect(), c.value &&
|
|
2173
|
-
}),
|
|
2174
|
-
n.src &&
|
|
2175
|
-
}),
|
|
2176
|
-
|
|
2177
|
-
}),
|
|
2178
|
-
retryLoad:
|
|
2179
|
-
closePreview:
|
|
2180
|
-
}), (m,
|
|
2183
|
+
N && N.disconnect(), c.value && A();
|
|
2184
|
+
}), ae(() => M.value, () => {
|
|
2185
|
+
n.src && w.value && (S.value = !0, g.value = !1, k.value = !1);
|
|
2186
|
+
}), ae(() => n.src, (m) => {
|
|
2187
|
+
M.value = m || "";
|
|
2188
|
+
}), x({
|
|
2189
|
+
retryLoad: v,
|
|
2190
|
+
closePreview: s
|
|
2191
|
+
}), (m, V) => (i(), r("div", {
|
|
2181
2192
|
ref_key: "containerRef",
|
|
2182
2193
|
ref: d,
|
|
2183
2194
|
class: E(["relative inline-block", T.value])
|
|
2184
2195
|
}, [
|
|
2185
|
-
!
|
|
2196
|
+
!k.value && !g.value && !w.value ? (i(), r("div", {
|
|
2186
2197
|
key: 0,
|
|
2187
2198
|
class: E(["bg-gray-200 animate-pulse rounded", I.value])
|
|
2188
|
-
}, [...
|
|
2199
|
+
}, [...V[1] || (V[1] = [
|
|
2189
2200
|
l("div", { class: "flex items-center justify-center h-full" }, [
|
|
2190
2201
|
l("svg", {
|
|
2191
2202
|
class: "w-6 h-6 text-gray-400",
|
|
@@ -2202,18 +2213,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2202
2213
|
])
|
|
2203
2214
|
], -1)
|
|
2204
2215
|
])], 2)) : R("", !0),
|
|
2205
|
-
|
|
2216
|
+
S.value && !g.value ? (i(), r("div", {
|
|
2206
2217
|
key: 1,
|
|
2207
|
-
class: E(["absolute inset-0 flex items-center justify-center bg-gray-100 rounded",
|
|
2208
|
-
}, [...
|
|
2218
|
+
class: E(["absolute inset-0 flex items-center justify-center bg-gray-100 rounded", H.value])
|
|
2219
|
+
}, [...V[2] || (V[2] = [
|
|
2209
2220
|
l("div", { class: "flex flex-col items-center space-y-2" }, [
|
|
2210
2221
|
l("div", { class: "w-8 h-8 border-4 border-primary/20 border-t-primary rounded-full animate-spin" })
|
|
2211
2222
|
], -1)
|
|
2212
2223
|
])], 2)) : R("", !0),
|
|
2213
2224
|
g.value ? (i(), r("div", {
|
|
2214
2225
|
key: 2,
|
|
2215
|
-
class: E(["bg-gray-100 rounded flex items-center justify-center",
|
|
2216
|
-
onClick:
|
|
2226
|
+
class: E(["bg-gray-100 rounded flex items-center justify-center", O.value]),
|
|
2227
|
+
onClick: v
|
|
2217
2228
|
}, [
|
|
2218
2229
|
l("img", {
|
|
2219
2230
|
src: "https://img.nihaojewelry.com/media/2025/6/27/1938511770352222208.png",
|
|
@@ -2223,18 +2234,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2223
2234
|
], 2)) : R("", !0),
|
|
2224
2235
|
Ee(l("img", {
|
|
2225
2236
|
ref_key: "imageRef",
|
|
2226
|
-
ref:
|
|
2227
|
-
src:
|
|
2237
|
+
ref: f,
|
|
2238
|
+
src: M.value,
|
|
2228
2239
|
alt: e.alt,
|
|
2229
|
-
class: E(
|
|
2240
|
+
class: E(H.value),
|
|
2230
2241
|
onLoad: Z,
|
|
2231
2242
|
onError: p,
|
|
2232
2243
|
onClick: o,
|
|
2233
2244
|
style: we(ie.value)
|
|
2234
2245
|
}, null, 46, el), [
|
|
2235
|
-
[He,
|
|
2246
|
+
[He, k.value && !g.value]
|
|
2236
2247
|
]),
|
|
2237
|
-
|
|
2248
|
+
F.value ? (i(), Be(Ae, {
|
|
2238
2249
|
key: 3,
|
|
2239
2250
|
to: "body"
|
|
2240
2251
|
}, [
|
|
@@ -2244,8 +2255,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2244
2255
|
key: 0,
|
|
2245
2256
|
class: "fixed inset-0 bg-black/75 flex items-center justify-center",
|
|
2246
2257
|
style: { "z-index": "99999" },
|
|
2247
|
-
onClick: Q(
|
|
2248
|
-
onWheel: Q(
|
|
2258
|
+
onClick: Q(s, ["self"]),
|
|
2259
|
+
onWheel: Q(h, ["prevent"])
|
|
2249
2260
|
}, [
|
|
2250
2261
|
l("div", {
|
|
2251
2262
|
class: E(["relative max-w-4xl max-h-full p-4 transform transition-transform duration-300", { "scale-100": c.value, "scale-95": !c.value }])
|
|
@@ -2257,7 +2268,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2257
2268
|
alt: e.alt,
|
|
2258
2269
|
class: "max-w-full max-h-full object-contain rounded shadow-2xl transition-transform duration-200",
|
|
2259
2270
|
style: we({ transform: `scale(${J.value})` }),
|
|
2260
|
-
onClick:
|
|
2271
|
+
onClick: V[0] || (V[0] = Q(() => {
|
|
2261
2272
|
}, ["stop"]))
|
|
2262
2273
|
}, null, 12, tl)
|
|
2263
2274
|
], 2)
|
|
@@ -2276,67 +2287,67 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2276
2287
|
disabled: { type: Boolean, default: !1 }
|
|
2277
2288
|
},
|
|
2278
2289
|
setup(e) {
|
|
2279
|
-
const
|
|
2290
|
+
const x = e, t = K(!1), n = K();
|
|
2280
2291
|
let y = null;
|
|
2281
|
-
const d =
|
|
2282
|
-
console.log("显示下拉菜单", t.value), !
|
|
2283
|
-
|
|
2292
|
+
const d = j(() => `y-dropdown__menu--${x.placement}`), f = () => {
|
|
2293
|
+
console.log("显示下拉菜单", t.value), !x.disabled && (y && (clearTimeout(y), y = null), t.value = !0, console.log("设置 visible 为 true", t.value), he(() => {
|
|
2294
|
+
k();
|
|
2284
2295
|
}));
|
|
2285
2296
|
}, L = () => {
|
|
2286
2297
|
console.log("隐藏下拉菜单"), y = setTimeout(() => {
|
|
2287
2298
|
t.value = !1, console.log("设置 visible 为 false", t.value);
|
|
2288
2299
|
}, 150);
|
|
2289
|
-
},
|
|
2300
|
+
}, k = () => {
|
|
2290
2301
|
if (!n.value) return;
|
|
2291
|
-
const
|
|
2292
|
-
if (!
|
|
2293
|
-
const
|
|
2302
|
+
const w = n.value.querySelector(".y-dropdown__trigger"), c = n.value.querySelector(".y-dropdown__menu");
|
|
2303
|
+
if (!w || !c) return;
|
|
2304
|
+
const M = w.getBoundingClientRect(), q = c.getBoundingClientRect(), J = window.innerWidth, F = window.innerHeight;
|
|
2294
2305
|
c.style.top = "", c.style.left = "", c.style.right = "", c.style.bottom = "", c.style.transform = "";
|
|
2295
2306
|
let D = 0, T = 0;
|
|
2296
|
-
switch (
|
|
2307
|
+
switch (x.placement) {
|
|
2297
2308
|
case "bottom":
|
|
2298
|
-
D =
|
|
2309
|
+
D = M.height + 4, T = 0;
|
|
2299
2310
|
break;
|
|
2300
2311
|
case "top":
|
|
2301
2312
|
D = -(q.height + 4), T = 0;
|
|
2302
2313
|
break;
|
|
2303
2314
|
case "right":
|
|
2304
|
-
D = 0, T =
|
|
2315
|
+
D = 0, T = M.width + 4;
|
|
2305
2316
|
break;
|
|
2306
2317
|
case "left":
|
|
2307
2318
|
D = 0, T = -(q.width + 4);
|
|
2308
2319
|
break;
|
|
2309
2320
|
}
|
|
2310
|
-
let I =
|
|
2311
|
-
if (
|
|
2312
|
-
const
|
|
2313
|
-
|
|
2321
|
+
let I = M.top + D, H = M.left + T;
|
|
2322
|
+
if (x.placement === "bottom" || x.placement === "top") {
|
|
2323
|
+
const O = q.width || 260;
|
|
2324
|
+
H + O > J - 10 && (H = J - O - 10), H < 10 && (H = 10);
|
|
2314
2325
|
}
|
|
2315
|
-
if (
|
|
2316
|
-
const
|
|
2317
|
-
I +
|
|
2326
|
+
if (x.placement === "left" || x.placement === "right") {
|
|
2327
|
+
const O = q.height || 200;
|
|
2328
|
+
I + O > F - 10 && (I = F - O - 10), I < 10 && (I = 10);
|
|
2318
2329
|
}
|
|
2319
|
-
c.style.top = `${I}px`, c.style.left = `${
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2330
|
+
c.style.top = `${I}px`, c.style.left = `${H}px`;
|
|
2331
|
+
}, S = (w) => {
|
|
2332
|
+
x.trigger === "click" && n.value && !n.value.contains(w.target) && (t.value = !1);
|
|
2322
2333
|
}, g = () => {
|
|
2323
|
-
t.value &&
|
|
2334
|
+
t.value && k();
|
|
2324
2335
|
};
|
|
2325
2336
|
return Se(() => {
|
|
2326
|
-
|
|
2337
|
+
x.trigger === "click" && document.addEventListener("click", S), window.addEventListener("resize", g), window.addEventListener("scroll", g);
|
|
2327
2338
|
}), Te(() => {
|
|
2328
|
-
|
|
2329
|
-
}), (
|
|
2339
|
+
x.trigger === "click" && document.removeEventListener("click", S), y && clearTimeout(y), window.removeEventListener("resize", g), window.removeEventListener("scroll", g);
|
|
2340
|
+
}), (w, c) => (i(), r("div", {
|
|
2330
2341
|
class: "y-dropdown",
|
|
2331
2342
|
ref_key: "dropdownRef",
|
|
2332
2343
|
ref: n
|
|
2333
2344
|
}, [
|
|
2334
2345
|
l("div", {
|
|
2335
2346
|
class: "y-dropdown__trigger",
|
|
2336
|
-
onMouseenter:
|
|
2347
|
+
onMouseenter: f,
|
|
2337
2348
|
onMouseleave: L
|
|
2338
2349
|
}, [
|
|
2339
|
-
ce(
|
|
2350
|
+
ce(w.$slots, "trigger", {}, () => [
|
|
2340
2351
|
c[0] || (c[0] = l("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
|
|
2341
2352
|
], !0)
|
|
2342
2353
|
], 32),
|
|
@@ -2347,10 +2358,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2347
2358
|
default: ve(() => [
|
|
2348
2359
|
Ee(l("div", {
|
|
2349
2360
|
class: E(["y-dropdown__menu", d.value]),
|
|
2350
|
-
onMouseenter:
|
|
2361
|
+
onMouseenter: f,
|
|
2351
2362
|
onMouseleave: L
|
|
2352
2363
|
}, [
|
|
2353
|
-
ce(
|
|
2364
|
+
ce(w.$slots, "default", {}, () => [
|
|
2354
2365
|
c[1] || (c[1] = l("div", { class: "y-dropdown__item" }, "选项 1", -1)),
|
|
2355
2366
|
c[2] || (c[2] = l("div", { class: "y-dropdown__item" }, "选项 2", -1)),
|
|
2356
2367
|
c[3] || (c[3] = l("div", { class: "y-dropdown__item" }, "选项 3", -1))
|
|
@@ -2363,7 +2374,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2363
2374
|
})
|
|
2364
2375
|
], 512));
|
|
2365
2376
|
}
|
|
2366
|
-
}),
|
|
2377
|
+
}), al = /* @__PURE__ */ ke(ol, [["__scopeId", "data-v-ed80047f"]]), sl = ["aria-hidden"], il = ["onKeydown"], rl = {
|
|
2367
2378
|
key: 0,
|
|
2368
2379
|
class: "y-drawer-header"
|
|
2369
2380
|
}, ul = { class: "y-drawer-title" }, cl = { class: "y-drawer-body" }, dl = {
|
|
@@ -2383,28 +2394,28 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2383
2394
|
showHeader: { type: Boolean, default: !0 }
|
|
2384
2395
|
},
|
|
2385
2396
|
emits: ["update:modelValue", "open", "close"],
|
|
2386
|
-
setup(e, { emit:
|
|
2387
|
-
const t = e, n =
|
|
2397
|
+
setup(e, { emit: x }) {
|
|
2398
|
+
const t = e, n = x, y = j({
|
|
2388
2399
|
get: () => t.modelValue,
|
|
2389
|
-
set: (
|
|
2390
|
-
}), d =
|
|
2391
|
-
const
|
|
2392
|
-
return t.placement === "right" ? (
|
|
2400
|
+
set: (M) => n("update:modelValue", M)
|
|
2401
|
+
}), d = K(null), f = j(() => t.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), L = j(() => t.placement === "right" ? "rounded-left" : "rounded-top"), k = j(() => {
|
|
2402
|
+
const M = {};
|
|
2403
|
+
return t.placement === "right" ? (M.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), M.height = "100%", M.right = "0", M.top = "0") : (M.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), M.width = "100%", M.bottom = "0", M.left = "0"), M;
|
|
2393
2404
|
});
|
|
2394
|
-
function
|
|
2405
|
+
function S() {
|
|
2395
2406
|
t.maskClosable && g();
|
|
2396
2407
|
}
|
|
2397
2408
|
function g() {
|
|
2398
2409
|
y.value && (y.value = !1, n("close"));
|
|
2399
2410
|
}
|
|
2400
|
-
function
|
|
2411
|
+
function w() {
|
|
2401
2412
|
t.closable && g();
|
|
2402
2413
|
}
|
|
2403
|
-
function c(
|
|
2404
|
-
|
|
2414
|
+
function c(M) {
|
|
2415
|
+
M.key === "Escape" && w();
|
|
2405
2416
|
}
|
|
2406
|
-
return
|
|
2407
|
-
|
|
2417
|
+
return ae(() => t.modelValue, (M) => {
|
|
2418
|
+
M ? (n("open"), requestAnimationFrame(() => {
|
|
2408
2419
|
var q;
|
|
2409
2420
|
return (q = d.value) == null ? void 0 : q.focus();
|
|
2410
2421
|
}), document.addEventListener("keydown", c), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", c), document.body.style.overflow = "");
|
|
@@ -2412,7 +2423,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2412
2423
|
t.modelValue && (document.addEventListener("keydown", c), document.body.style.overflow = "hidden");
|
|
2413
2424
|
}), Te(() => {
|
|
2414
2425
|
document.removeEventListener("keydown", c), document.body.style.overflow = "";
|
|
2415
|
-
}), (
|
|
2426
|
+
}), (M, q) => (i(), Be(Ae, { to: "body" }, [
|
|
2416
2427
|
Ee(l("div", {
|
|
2417
2428
|
class: "y-drawer-root",
|
|
2418
2429
|
role: "dialog",
|
|
@@ -2422,9 +2433,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2422
2433
|
}, [
|
|
2423
2434
|
l("div", {
|
|
2424
2435
|
class: "y-drawer-mask",
|
|
2425
|
-
onClick:
|
|
2436
|
+
onClick: S
|
|
2426
2437
|
}),
|
|
2427
|
-
de(De, { name:
|
|
2438
|
+
de(De, { name: f.value }, {
|
|
2428
2439
|
default: ve(() => [
|
|
2429
2440
|
Ee(l("div", {
|
|
2430
2441
|
ref_key: "panelRef",
|
|
@@ -2433,8 +2444,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2433
2444
|
`is-${e.placement}`,
|
|
2434
2445
|
L.value
|
|
2435
2446
|
]]),
|
|
2436
|
-
style: we(
|
|
2437
|
-
onKeydown: xe(Q(
|
|
2447
|
+
style: we(k.value),
|
|
2448
|
+
onKeydown: xe(Q(w, ["prevent", "stop"]), ["esc"]),
|
|
2438
2449
|
tabindex: "-1"
|
|
2439
2450
|
}, [
|
|
2440
2451
|
e.showHeader ? (i(), r("div", rl, [
|
|
@@ -2448,10 +2459,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2448
2459
|
}, " ✕ ")) : R("", !0)
|
|
2449
2460
|
])) : R("", !0),
|
|
2450
2461
|
l("div", cl, [
|
|
2451
|
-
ce(
|
|
2462
|
+
ce(M.$slots, "default", {}, void 0, !0)
|
|
2452
2463
|
]),
|
|
2453
|
-
|
|
2454
|
-
ce(
|
|
2464
|
+
M.$slots.footer ? (i(), r("div", dl, [
|
|
2465
|
+
ce(M.$slots, "footer", {}, void 0, !0)
|
|
2455
2466
|
])) : R("", !0)
|
|
2456
2467
|
], 46, il), [
|
|
2457
2468
|
[He, y.value]
|
|
@@ -2459,7 +2470,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2459
2470
|
]),
|
|
2460
2471
|
_: 3
|
|
2461
2472
|
}, 8, ["name"])
|
|
2462
|
-
], 12,
|
|
2473
|
+
], 12, sl), [
|
|
2463
2474
|
[He, y.value]
|
|
2464
2475
|
])
|
|
2465
2476
|
]));
|
|
@@ -2509,19 +2520,19 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2509
2520
|
height: "12",
|
|
2510
2521
|
viewBox: "0 0 12 12",
|
|
2511
2522
|
fill: "none"
|
|
2512
|
-
},
|
|
2523
|
+
}, Vl = {
|
|
2513
2524
|
key: 1,
|
|
2514
2525
|
width: "12",
|
|
2515
2526
|
height: "12",
|
|
2516
2527
|
viewBox: "0 0 12 12",
|
|
2517
2528
|
fill: "none"
|
|
2518
|
-
},
|
|
2529
|
+
}, Al = ["src", "alt"], Fl = { class: "ytree-node__custom-content" }, Yl = {
|
|
2519
2530
|
key: 0,
|
|
2520
2531
|
class: "ytree-node__children"
|
|
2521
2532
|
}, Pl = ["data-level", "onClick", "onContextmenu"], Nl = ["onClick"], Wl = {
|
|
2522
2533
|
key: 1,
|
|
2523
2534
|
class: "w-[16px]"
|
|
2524
|
-
},
|
|
2535
|
+
}, Ol = ["onClick"], jl = {
|
|
2525
2536
|
key: 0,
|
|
2526
2537
|
width: "12",
|
|
2527
2538
|
height: "12",
|
|
@@ -2551,7 +2562,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2551
2562
|
height: "12",
|
|
2552
2563
|
viewBox: "0 0 12 12",
|
|
2553
2564
|
fill: "none"
|
|
2554
|
-
}, lo = ["src", "alt"], oo = { class: "ytree-node__custom-content" },
|
|
2565
|
+
}, lo = ["src", "alt"], oo = { class: "ytree-node__custom-content" }, ao = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979094146203385856/32.png", so = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979095296159907840/32.png", io = /* @__PURE__ */ be({
|
|
2555
2566
|
__name: "ytree",
|
|
2556
2567
|
props: {
|
|
2557
2568
|
data: { default: () => [] },
|
|
@@ -2599,8 +2610,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2599
2610
|
enableChildStyleCustomClick: { type: Boolean, default: !1 }
|
|
2600
2611
|
},
|
|
2601
2612
|
emits: ["node-click", "node-contextmenu", "check-change", "check", "current-change", "node-expand", "node-collapse", "node-drag-start", "node-drag-enter", "node-drag-leave", "node-drag-over", "node-drag-end", "node-drop", "checked-keys-change", "child-node-click"],
|
|
2602
|
-
setup(e, { expose:
|
|
2603
|
-
const n = e, y = t, d =
|
|
2613
|
+
setup(e, { expose: x, emit: t }) {
|
|
2614
|
+
const n = e, y = t, d = j(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), f = K({
|
|
2604
2615
|
currentNode: null,
|
|
2605
2616
|
currentKey: null,
|
|
2606
2617
|
checkedKeys: /* @__PURE__ */ new Set(),
|
|
@@ -2608,96 +2619,96 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2608
2619
|
selectedKeys: /* @__PURE__ */ new Set(),
|
|
2609
2620
|
highlightedKeys: /* @__PURE__ */ new Set()
|
|
2610
2621
|
});
|
|
2611
|
-
nt("treeStore",
|
|
2612
|
-
const L =
|
|
2613
|
-
function
|
|
2622
|
+
nt("treeStore", f);
|
|
2623
|
+
const L = j(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
|
|
2624
|
+
function k(p) {
|
|
2614
2625
|
return p[n.nodeKey] || p.id || Math.random();
|
|
2615
2626
|
}
|
|
2616
|
-
function
|
|
2617
|
-
var
|
|
2618
|
-
return ((
|
|
2627
|
+
function S(p) {
|
|
2628
|
+
var v;
|
|
2629
|
+
return ((v = n.props) != null && v.label ? p[n.props.label] : void 0) || p.label || "";
|
|
2619
2630
|
}
|
|
2620
2631
|
function g(p) {
|
|
2621
|
-
var
|
|
2622
|
-
return !!((
|
|
2632
|
+
var v;
|
|
2633
|
+
return !!((v = p == null ? void 0 : p.data) != null && v.isEmployee);
|
|
2623
2634
|
}
|
|
2624
|
-
function
|
|
2635
|
+
function w(p, v) {
|
|
2625
2636
|
var m;
|
|
2626
|
-
const o = n.deptIconUrl ||
|
|
2627
|
-
return
|
|
2637
|
+
const o = n.deptIconUrl || ao, s = n.personIconUrl || so, h = n.buttonIconUrl || "", b = n.childStyleIconUrl || "";
|
|
2638
|
+
return v && b && J(p, v) ? b : (m = p == null ? void 0 : p.data) != null && m.isButton && h ? h : g(p) ? s : o;
|
|
2628
2639
|
}
|
|
2629
2640
|
function c(p) {
|
|
2630
2641
|
var o;
|
|
2631
|
-
const
|
|
2632
|
-
return
|
|
2642
|
+
const v = ((o = n.props) != null && o.children ? p[n.props.children] : void 0) || p.children;
|
|
2643
|
+
return v && v.length > 0;
|
|
2633
2644
|
}
|
|
2634
|
-
function
|
|
2635
|
-
var
|
|
2636
|
-
return ((
|
|
2645
|
+
function M(p) {
|
|
2646
|
+
var v;
|
|
2647
|
+
return ((v = n.props) != null && v.children ? p[n.props.children] : void 0) || p.children || [];
|
|
2637
2648
|
}
|
|
2638
|
-
function q(p,
|
|
2639
|
-
if (p ===
|
|
2649
|
+
function q(p, v, o = 1) {
|
|
2650
|
+
if (p === v)
|
|
2640
2651
|
return o;
|
|
2641
|
-
const
|
|
2642
|
-
for (const
|
|
2643
|
-
const
|
|
2644
|
-
if (
|
|
2645
|
-
return
|
|
2652
|
+
const s = M(p);
|
|
2653
|
+
for (const h of s) {
|
|
2654
|
+
const b = q(h, v, o + 1);
|
|
2655
|
+
if (b > 0)
|
|
2656
|
+
return b;
|
|
2646
2657
|
}
|
|
2647
2658
|
return 0;
|
|
2648
2659
|
}
|
|
2649
|
-
function J(p,
|
|
2650
|
-
return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : q(
|
|
2660
|
+
function J(p, v) {
|
|
2661
|
+
return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : q(v, p) === n.childStyleLevel;
|
|
2651
2662
|
}
|
|
2652
|
-
function
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2663
|
+
function F(p) {
|
|
2664
|
+
const v = k(p);
|
|
2665
|
+
return f.value.expandedKeys.has(v);
|
|
2655
2666
|
}
|
|
2656
2667
|
function D(p) {
|
|
2657
|
-
const
|
|
2658
|
-
if (
|
|
2668
|
+
const v = k(p);
|
|
2669
|
+
if (f.value.checkedKeys.has(v)) {
|
|
2659
2670
|
if (c(p)) {
|
|
2660
|
-
const
|
|
2671
|
+
const s = M(p), h = s.filter((m) => D(m)), b = s.filter(
|
|
2661
2672
|
(m) => T(m)
|
|
2662
2673
|
);
|
|
2663
|
-
return
|
|
2674
|
+
return h.length === s.length && b.length === 0;
|
|
2664
2675
|
}
|
|
2665
2676
|
return !0;
|
|
2666
2677
|
}
|
|
2667
2678
|
if (c(p)) {
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2670
|
-
(
|
|
2671
|
-
) ? !1 :
|
|
2679
|
+
const s = M(p);
|
|
2680
|
+
return s.some(
|
|
2681
|
+
(b) => T(b)
|
|
2682
|
+
) ? !1 : s.length > 0 && s.every((b) => D(b));
|
|
2672
2683
|
}
|
|
2673
2684
|
return !1;
|
|
2674
2685
|
}
|
|
2675
2686
|
function T(p) {
|
|
2676
2687
|
if (!c(p)) return !1;
|
|
2677
|
-
const
|
|
2678
|
-
(
|
|
2688
|
+
const v = M(p), o = v.filter((h) => D(h)), s = v.filter(
|
|
2689
|
+
(h) => T(h)
|
|
2679
2690
|
);
|
|
2680
|
-
return o.length ===
|
|
2691
|
+
return o.length === v.length ? !1 : o.length > 0 || s.length > 0;
|
|
2681
2692
|
}
|
|
2682
2693
|
function I(p) {
|
|
2683
|
-
const
|
|
2684
|
-
return
|
|
2694
|
+
const v = k(p);
|
|
2695
|
+
return f.value.currentKey === v;
|
|
2685
2696
|
}
|
|
2686
|
-
function
|
|
2687
|
-
const
|
|
2688
|
-
return
|
|
2697
|
+
function H(p) {
|
|
2698
|
+
const v = k(p);
|
|
2699
|
+
return f.value.highlightedKeys.has(v);
|
|
2689
2700
|
}
|
|
2690
|
-
function
|
|
2701
|
+
function O(p) {
|
|
2691
2702
|
if (n.disabled) return;
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2694
|
-
function
|
|
2703
|
+
const v = k(p), s = !f.value.checkedKeys.has(v), h = new Set(f.value.expandedKeys);
|
|
2704
|
+
s ? f.value.checkedKeys.add(v) : f.value.checkedKeys.delete(v);
|
|
2705
|
+
function b(m, V) {
|
|
2695
2706
|
m.forEach((ee) => {
|
|
2696
|
-
const te =
|
|
2697
|
-
|
|
2707
|
+
const te = k(ee);
|
|
2708
|
+
V ? f.value.checkedKeys.add(te) : f.value.checkedKeys.delete(te), c(ee) && b(M(ee), V);
|
|
2698
2709
|
});
|
|
2699
2710
|
}
|
|
2700
|
-
|
|
2711
|
+
b(M(p), s), s && ie(), ye(), f.value.expandedKeys = h, y("check-change", p, s, !1), y("check", p, s, !1), y("checked-keys-change", Array.from(f.value.checkedKeys));
|
|
2701
2712
|
}
|
|
2702
2713
|
function ie(p) {
|
|
2703
2714
|
L.value && console.log(
|
|
@@ -2705,129 +2716,129 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2705
2716
|
);
|
|
2706
2717
|
}
|
|
2707
2718
|
function X(p) {
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2719
|
+
const v = k(p);
|
|
2720
|
+
f.value.expandedKeys.has(v) ? (f.value.expandedKeys.delete(v), y("node-collapse", p, p, null)) : (f.value.expandedKeys.add(v), y("node-expand", p, p, null));
|
|
2710
2721
|
}
|
|
2711
2722
|
function ye() {
|
|
2712
2723
|
const p = [];
|
|
2713
|
-
function
|
|
2714
|
-
|
|
2715
|
-
p.push(
|
|
2724
|
+
function v(s) {
|
|
2725
|
+
s.forEach((h) => {
|
|
2726
|
+
p.push(h), c(h) && v(M(h));
|
|
2716
2727
|
});
|
|
2717
2728
|
}
|
|
2718
|
-
|
|
2719
|
-
function o(
|
|
2720
|
-
if (c(
|
|
2721
|
-
const
|
|
2729
|
+
v(d.value);
|
|
2730
|
+
function o(s) {
|
|
2731
|
+
if (c(s)) {
|
|
2732
|
+
const h = M(s), b = k(s), m = h.filter((ee) => D(ee)), V = h.filter(
|
|
2722
2733
|
(ee) => T(ee)
|
|
2723
2734
|
);
|
|
2724
|
-
m.length ===
|
|
2735
|
+
m.length === h.length && V.length === 0 || m.length > 0 || V.length > 0 ? f.value.checkedKeys.add(b) : f.value.checkedKeys.delete(b);
|
|
2725
2736
|
}
|
|
2726
2737
|
}
|
|
2727
|
-
for (let
|
|
2728
|
-
o(p[
|
|
2738
|
+
for (let s = p.length - 1; s >= 0; s--)
|
|
2739
|
+
o(p[s]);
|
|
2729
2740
|
}
|
|
2730
|
-
function G(p,
|
|
2741
|
+
function G(p, v, o, s) {
|
|
2731
2742
|
if (n.disabled) return;
|
|
2732
|
-
const
|
|
2733
|
-
if (n.enableChildStyleCustomClick &&
|
|
2734
|
-
y("child-node-click", p,
|
|
2743
|
+
const h = s ? J(p, s) : !1;
|
|
2744
|
+
if (n.enableChildStyleCustomClick && h) {
|
|
2745
|
+
y("child-node-click", p, v, o);
|
|
2735
2746
|
return;
|
|
2736
2747
|
}
|
|
2737
2748
|
if (n.expandOnClickNode && c(p)) {
|
|
2738
2749
|
X(p);
|
|
2739
2750
|
return;
|
|
2740
2751
|
}
|
|
2741
|
-
|
|
2752
|
+
f.value.currentNode = p, f.value.currentKey = k(p), n.showCheckbox && O(p), y("node-click", p, v, o);
|
|
2742
2753
|
}
|
|
2743
|
-
function fe(p,
|
|
2744
|
-
n.disabled || y("node-contextmenu", p,
|
|
2754
|
+
function fe(p, v, o, s) {
|
|
2755
|
+
n.disabled || y("node-contextmenu", p, v, o, s);
|
|
2745
2756
|
}
|
|
2746
|
-
|
|
2757
|
+
ae(
|
|
2747
2758
|
() => n.defaultExpandedKeys,
|
|
2748
2759
|
(p) => {
|
|
2749
2760
|
if (p) {
|
|
2750
|
-
const
|
|
2751
|
-
if (
|
|
2752
|
-
let o = function(m,
|
|
2753
|
-
for (const te of
|
|
2754
|
-
if (
|
|
2761
|
+
const v = L.value;
|
|
2762
|
+
if (v) {
|
|
2763
|
+
let o = function(m, V, ee = 1) {
|
|
2764
|
+
for (const te of V) {
|
|
2765
|
+
if (k(te) === m) return ee;
|
|
2755
2766
|
if (c(te)) {
|
|
2756
|
-
const Me = o(m,
|
|
2767
|
+
const Me = o(m, M(te), ee + 1);
|
|
2757
2768
|
if (Me > 0) return Me;
|
|
2758
2769
|
}
|
|
2759
2770
|
}
|
|
2760
2771
|
return 0;
|
|
2761
|
-
},
|
|
2772
|
+
}, s = function(m, V, ee) {
|
|
2762
2773
|
m.forEach((te) => {
|
|
2763
|
-
|
|
2774
|
+
V < ee && c(te) ? (b.add(k(te)), s(M(te), V + 1, ee)) : V < ee && c(te);
|
|
2764
2775
|
});
|
|
2765
2776
|
};
|
|
2766
|
-
const
|
|
2767
|
-
const
|
|
2768
|
-
return
|
|
2769
|
-
}),
|
|
2770
|
-
|
|
2771
|
-
o(m, d.value, 1) >=
|
|
2772
|
-
}),
|
|
2777
|
+
const h = (p || []).filter((m) => {
|
|
2778
|
+
const V = o(m, d.value, 1);
|
|
2779
|
+
return V > 0 && V < v;
|
|
2780
|
+
}), b = new Set(h);
|
|
2781
|
+
s(d.value, 1, v), f.value.expandedKeys.forEach((m) => {
|
|
2782
|
+
o(m, d.value, 1) >= v && b.add(m);
|
|
2783
|
+
}), f.value.expandedKeys = b;
|
|
2773
2784
|
} else
|
|
2774
|
-
|
|
2785
|
+
f.value.expandedKeys = new Set(p);
|
|
2775
2786
|
}
|
|
2776
2787
|
},
|
|
2777
2788
|
{ immediate: !0 }
|
|
2778
2789
|
);
|
|
2779
2790
|
function ge() {
|
|
2780
2791
|
if (n.defaultExpandAll) {
|
|
2781
|
-
let p = function(
|
|
2782
|
-
|
|
2783
|
-
if (!c(
|
|
2784
|
-
const m =
|
|
2792
|
+
let p = function(s, h = 1) {
|
|
2793
|
+
s.forEach((b) => {
|
|
2794
|
+
if (!c(b)) return;
|
|
2795
|
+
const m = M(b);
|
|
2785
2796
|
if (o) {
|
|
2786
|
-
if (
|
|
2787
|
-
|
|
2797
|
+
if (h >= o) return;
|
|
2798
|
+
h + 1 === o || v.add(k(b)), p(m, h + 1);
|
|
2788
2799
|
} else
|
|
2789
|
-
|
|
2800
|
+
v.add(k(b)), p(m, h + 1);
|
|
2790
2801
|
});
|
|
2791
2802
|
};
|
|
2792
|
-
const
|
|
2793
|
-
p(d.value, 1),
|
|
2803
|
+
const v = /* @__PURE__ */ new Set(), o = L.value;
|
|
2804
|
+
p(d.value, 1), f.value.expandedKeys = v;
|
|
2794
2805
|
}
|
|
2795
2806
|
}
|
|
2796
|
-
function
|
|
2807
|
+
function A() {
|
|
2797
2808
|
if (n.defaultCheckedKeys && n.defaultCheckedKeys.length > 0) {
|
|
2798
|
-
let p = function(
|
|
2799
|
-
|
|
2800
|
-
const
|
|
2801
|
-
|
|
2809
|
+
let p = function(h, b = []) {
|
|
2810
|
+
h.forEach((m) => {
|
|
2811
|
+
const V = k(m), ee = [...b, V];
|
|
2812
|
+
v.has(V) && b.forEach((te) => o.add(te)), c(m) && p(M(m), ee);
|
|
2802
2813
|
});
|
|
2803
2814
|
};
|
|
2804
|
-
const
|
|
2815
|
+
const v = new Set(n.defaultCheckedKeys), o = /* @__PURE__ */ new Set();
|
|
2805
2816
|
p(d.value);
|
|
2806
|
-
const
|
|
2807
|
-
if (
|
|
2817
|
+
const s = L.value;
|
|
2818
|
+
if (s) {
|
|
2808
2819
|
console.log(
|
|
2809
|
-
`已启用从第${
|
|
2820
|
+
`已启用从第${s}级开始不默认展开:保持当前展开状态不变`
|
|
2810
2821
|
);
|
|
2811
2822
|
return;
|
|
2812
2823
|
}
|
|
2813
|
-
|
|
2824
|
+
f.value.expandedKeys = o;
|
|
2814
2825
|
}
|
|
2815
2826
|
}
|
|
2816
|
-
|
|
2827
|
+
ae(() => n.defaultExpandAll, ge, { immediate: !0 }), ae(() => d.value, ge, { deep: !0 }), ae(
|
|
2817
2828
|
() => n.defaultCheckedKeys,
|
|
2818
2829
|
(p) => {
|
|
2819
|
-
p ? (
|
|
2830
|
+
p ? (f.value.checkedKeys = new Set(p), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : A()) : f.value.checkedKeys.clear();
|
|
2820
2831
|
},
|
|
2821
2832
|
{ immediate: !0 }
|
|
2822
2833
|
);
|
|
2823
2834
|
function N(p) {
|
|
2824
2835
|
try {
|
|
2825
|
-
let
|
|
2826
|
-
for (const
|
|
2827
|
-
const ee =
|
|
2828
|
-
if (ee ===
|
|
2829
|
-
if (c(
|
|
2830
|
-
const Me =
|
|
2836
|
+
let v = function(h, b, m = []) {
|
|
2837
|
+
for (const V of h) {
|
|
2838
|
+
const ee = k(V), te = [...m, ee];
|
|
2839
|
+
if (ee === b) return te;
|
|
2840
|
+
if (c(V)) {
|
|
2841
|
+
const Me = v(M(V), b, te);
|
|
2831
2842
|
if (Me) return Me;
|
|
2832
2843
|
}
|
|
2833
2844
|
}
|
|
@@ -2835,48 +2846,48 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2835
2846
|
};
|
|
2836
2847
|
const o = Array.isArray(p) ? p : [];
|
|
2837
2848
|
if (o.length === 0) return;
|
|
2838
|
-
|
|
2839
|
-
const
|
|
2840
|
-
o.forEach((
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2843
|
-
}),
|
|
2844
|
-
} catch (
|
|
2845
|
-
console.warn("highlightAndExpandByIds 执行失败",
|
|
2849
|
+
f.value.highlightedKeys.clear();
|
|
2850
|
+
const s = new Set(f.value.expandedKeys);
|
|
2851
|
+
o.forEach((h) => {
|
|
2852
|
+
const b = v(d.value, h);
|
|
2853
|
+
b && b.length > 0 && (b.slice(0, -1).forEach((m) => s.add(m)), f.value.highlightedKeys.add(b[b.length - 1]));
|
|
2854
|
+
}), f.value.expandedKeys = s;
|
|
2855
|
+
} catch (v) {
|
|
2856
|
+
console.warn("highlightAndExpandByIds 执行失败", v);
|
|
2846
2857
|
}
|
|
2847
2858
|
}
|
|
2848
2859
|
function U() {
|
|
2849
|
-
|
|
2860
|
+
f.value.highlightedKeys.clear();
|
|
2850
2861
|
}
|
|
2851
2862
|
function Z() {
|
|
2852
|
-
|
|
2863
|
+
f.value.currentNode = null, f.value.currentKey = null;
|
|
2853
2864
|
}
|
|
2854
|
-
return
|
|
2865
|
+
return x({ highlightAndExpandByIds: N, clearHighlights: U, clearCurrentNode: Z }), ae(
|
|
2855
2866
|
() => n.defaultSelectedKeys,
|
|
2856
2867
|
(p) => {
|
|
2857
|
-
p && (
|
|
2868
|
+
p && (f.value.selectedKeys = new Set(p));
|
|
2858
2869
|
},
|
|
2859
2870
|
{ immediate: !0 }
|
|
2860
|
-
), (p,
|
|
2871
|
+
), (p, v) => (i(), r("div", {
|
|
2861
2872
|
class: E(["ytree", [`ytree--${e.size}`, { "ytree--disabled": e.disabled }]])
|
|
2862
2873
|
}, [
|
|
2863
2874
|
l("div", hl, [
|
|
2864
2875
|
(i(!0), r(ue, null, pe(d.value, (o) => (i(), r("div", {
|
|
2865
|
-
key:
|
|
2866
|
-
class: E(["ytree-node", { "ytree-node--current": I(o), "ytree-node--highlight":
|
|
2876
|
+
key: k(o),
|
|
2877
|
+
class: E(["ytree-node", { "ytree-node--current": I(o), "ytree-node--highlight": H(o) }])
|
|
2867
2878
|
}, [
|
|
2868
2879
|
l("div", {
|
|
2869
2880
|
class: E(["ytree-node__content", { "is-child-style": J(o, o) }]),
|
|
2870
2881
|
style: { paddingLeft: "8px" },
|
|
2871
2882
|
"data-level": q(o, o),
|
|
2872
|
-
onClick: (
|
|
2873
|
-
onContextmenu: (
|
|
2883
|
+
onClick: (s) => G(o, o, null, o),
|
|
2884
|
+
onContextmenu: (s) => fe(s, o, o, null)
|
|
2874
2885
|
}, [
|
|
2875
2886
|
c(o) ? (i(), r("span", {
|
|
2876
2887
|
key: 0,
|
|
2877
|
-
class: E(["ytree-node__expand-icon", { "is-expanded":
|
|
2878
|
-
onClick: Q((
|
|
2879
|
-
}, [...
|
|
2888
|
+
class: E(["ytree-node__expand-icon", { "is-expanded": F(o) }]),
|
|
2889
|
+
onClick: Q((s) => X(o), ["stop"])
|
|
2890
|
+
}, [...v[0] || (v[0] = [
|
|
2880
2891
|
l("svg", {
|
|
2881
2892
|
width: "12",
|
|
2882
2893
|
height: "12",
|
|
@@ -2898,9 +2909,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2898
2909
|
"is-checked": D(o),
|
|
2899
2910
|
"is-indeterminate": T(o)
|
|
2900
2911
|
}]),
|
|
2901
|
-
onClick: Q((
|
|
2912
|
+
onClick: Q((s) => O(o), ["stop"])
|
|
2902
2913
|
}, [
|
|
2903
|
-
D(o) ? (i(), r("svg", wl, [...
|
|
2914
|
+
D(o) ? (i(), r("svg", wl, [...v[1] || (v[1] = [
|
|
2904
2915
|
l("path", {
|
|
2905
2916
|
d: "M2 6L4.5 8.5L10 3",
|
|
2906
2917
|
stroke: "currentColor",
|
|
@@ -2908,7 +2919,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2908
2919
|
"stroke-linecap": "round",
|
|
2909
2920
|
"stroke-linejoin": "round"
|
|
2910
2921
|
}, null, -1)
|
|
2911
|
-
])])) : T(o) ? (i(), r("svg", bl, [...
|
|
2922
|
+
])])) : T(o) ? (i(), r("svg", bl, [...v[2] || (v[2] = [
|
|
2912
2923
|
l("path", {
|
|
2913
2924
|
d: "M2 6L10 6",
|
|
2914
2925
|
stroke: "currentColor",
|
|
@@ -2923,40 +2934,40 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2923
2934
|
}, null, 2)) : R("", !0),
|
|
2924
2935
|
l("img", {
|
|
2925
2936
|
class: "ytree-node__avatar",
|
|
2926
|
-
src:
|
|
2937
|
+
src: w(o, o),
|
|
2927
2938
|
alt: g(o) ? "person" : "dept"
|
|
2928
2939
|
}, null, 8, kl),
|
|
2929
2940
|
l("span", {
|
|
2930
2941
|
class: E(["ytree-node__label", { "is-employee": g(o) }])
|
|
2931
|
-
}, le(
|
|
2942
|
+
}, le(S(o)), 3),
|
|
2932
2943
|
l("div", xl, [
|
|
2933
2944
|
ce(p.$slots, "node-content", {
|
|
2934
2945
|
node: o,
|
|
2935
2946
|
isCurrent: I(o),
|
|
2936
|
-
isExpanded:
|
|
2947
|
+
isExpanded: F(o),
|
|
2937
2948
|
hasChildren: c(o)
|
|
2938
2949
|
}, void 0, !0)
|
|
2939
2950
|
])
|
|
2940
2951
|
], 42, pl),
|
|
2941
2952
|
de(De, { name: "ytree-node" }, {
|
|
2942
2953
|
default: ve(() => [
|
|
2943
|
-
c(o) &&
|
|
2944
|
-
(i(!0), r(ue, null, pe(
|
|
2945
|
-
key:
|
|
2946
|
-
class: E(["ytree-node", { "ytree-node--current": I(
|
|
2954
|
+
c(o) && F(o) ? (i(), r("div", Dl, [
|
|
2955
|
+
(i(!0), r(ue, null, pe(M(o), (s) => (i(), r("div", {
|
|
2956
|
+
key: k(s),
|
|
2957
|
+
class: E(["ytree-node", { "ytree-node--current": I(s), "ytree-node--highlight": H(s) }])
|
|
2947
2958
|
}, [
|
|
2948
2959
|
l("div", {
|
|
2949
|
-
class: E(["ytree-node__content", { "is-child-style": J(
|
|
2960
|
+
class: E(["ytree-node__content", { "is-child-style": J(s, o) }]),
|
|
2950
2961
|
style: { paddingLeft: "22px" },
|
|
2951
|
-
"data-level": q(o,
|
|
2952
|
-
onClick: (
|
|
2953
|
-
onContextmenu: (
|
|
2962
|
+
"data-level": q(o, s),
|
|
2963
|
+
onClick: (h) => G(s, s, null, o),
|
|
2964
|
+
onContextmenu: (h) => fe(h, s, s, null)
|
|
2954
2965
|
}, [
|
|
2955
|
-
c(
|
|
2966
|
+
c(s) ? (i(), r("span", {
|
|
2956
2967
|
key: 0,
|
|
2957
|
-
class: E(["ytree-node__expand-icon", { "is-expanded":
|
|
2958
|
-
onClick: Q((
|
|
2959
|
-
}, [...
|
|
2968
|
+
class: E(["ytree-node__expand-icon", { "is-expanded": F(s) }]),
|
|
2969
|
+
onClick: Q((h) => X(s), ["stop"])
|
|
2970
|
+
}, [...v[3] || (v[3] = [
|
|
2960
2971
|
l("svg", {
|
|
2961
2972
|
width: "12",
|
|
2962
2973
|
height: "12",
|
|
@@ -2975,12 +2986,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2975
2986
|
e.showCheckbox ? (i(), r("span", {
|
|
2976
2987
|
key: 2,
|
|
2977
2988
|
class: E(["ytree-node__checkbox", {
|
|
2978
|
-
"is-checked": D(
|
|
2979
|
-
"is-indeterminate": T(
|
|
2989
|
+
"is-checked": D(s),
|
|
2990
|
+
"is-indeterminate": T(s)
|
|
2980
2991
|
}]),
|
|
2981
|
-
onClick: Q((
|
|
2992
|
+
onClick: Q((h) => O(s), ["stop"])
|
|
2982
2993
|
}, [
|
|
2983
|
-
D(
|
|
2994
|
+
D(s) ? (i(), r("svg", Ml, [...v[4] || (v[4] = [
|
|
2984
2995
|
l("path", {
|
|
2985
2996
|
d: "M2 6L4.5 8.5L10 3",
|
|
2986
2997
|
stroke: "currentColor",
|
|
@@ -2988,7 +2999,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2988
2999
|
"stroke-linecap": "round",
|
|
2989
3000
|
"stroke-linejoin": "round"
|
|
2990
3001
|
}, null, -1)
|
|
2991
|
-
])])) : T(
|
|
3002
|
+
])])) : T(s) ? (i(), r("svg", Ll, [...v[5] || (v[5] = [
|
|
2992
3003
|
l("path", {
|
|
2993
3004
|
d: "M2 6L10 6",
|
|
2994
3005
|
stroke: "currentColor",
|
|
@@ -3003,48 +3014,48 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3003
3014
|
}, null, 2)) : R("", !0),
|
|
3004
3015
|
l("img", {
|
|
3005
3016
|
class: "ytree-node__avatar",
|
|
3006
|
-
src:
|
|
3007
|
-
alt: g(
|
|
3017
|
+
src: w(s, o),
|
|
3018
|
+
alt: g(s) ? "person" : "dept"
|
|
3008
3019
|
}, null, 8, Il),
|
|
3009
3020
|
l("span", {
|
|
3010
|
-
class: E(["ytree-node__label", { "is-employee": g(
|
|
3011
|
-
}, le(
|
|
3021
|
+
class: E(["ytree-node__label", { "is-employee": g(s) }])
|
|
3022
|
+
}, le(S(s)), 3),
|
|
3012
3023
|
l("div", Bl, [
|
|
3013
3024
|
ce(p.$slots, "node-content", {
|
|
3014
|
-
node:
|
|
3015
|
-
isCurrent: I(
|
|
3016
|
-
isExpanded:
|
|
3017
|
-
hasChildren: c(
|
|
3025
|
+
node: s,
|
|
3026
|
+
isCurrent: I(s),
|
|
3027
|
+
isExpanded: F(s),
|
|
3028
|
+
hasChildren: c(s)
|
|
3018
3029
|
}, void 0, !0)
|
|
3019
3030
|
])
|
|
3020
3031
|
], 42, Cl),
|
|
3021
3032
|
de(De, { name: "ytree-node" }, {
|
|
3022
3033
|
default: ve(() => [
|
|
3023
|
-
c(
|
|
3024
|
-
(i(!0), r(ue, null, pe(
|
|
3025
|
-
key:
|
|
3034
|
+
c(s) && F(s) ? (i(), r("div", El, [
|
|
3035
|
+
(i(!0), r(ue, null, pe(M(s), (h) => (i(), r("div", {
|
|
3036
|
+
key: k(h),
|
|
3026
3037
|
class: E(["ytree-node", {
|
|
3027
|
-
"ytree-node--current": I(
|
|
3028
|
-
"ytree-node--highlight":
|
|
3038
|
+
"ytree-node--current": I(h),
|
|
3039
|
+
"ytree-node--highlight": H(h)
|
|
3029
3040
|
}])
|
|
3030
3041
|
}, [
|
|
3031
3042
|
l("div", {
|
|
3032
|
-
class: E(["ytree-node__content", { "is-child-style": J(
|
|
3043
|
+
class: E(["ytree-node__content", { "is-child-style": J(h, o) }]),
|
|
3033
3044
|
style: { paddingLeft: "38px" },
|
|
3034
|
-
"data-level": q(o,
|
|
3035
|
-
onClick: (
|
|
3036
|
-
onContextmenu: (
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3045
|
+
"data-level": q(o, h),
|
|
3046
|
+
onClick: (b) => G(h, h, null, o),
|
|
3047
|
+
onContextmenu: (b) => fe(
|
|
3048
|
+
b,
|
|
3049
|
+
h,
|
|
3050
|
+
h,
|
|
3040
3051
|
null
|
|
3041
3052
|
)
|
|
3042
3053
|
}, [
|
|
3043
|
-
c(
|
|
3054
|
+
c(h) ? (i(), r("span", {
|
|
3044
3055
|
key: 0,
|
|
3045
|
-
class: E(["ytree-node__expand-icon", { "is-expanded":
|
|
3046
|
-
onClick: Q((
|
|
3047
|
-
}, [...
|
|
3056
|
+
class: E(["ytree-node__expand-icon", { "is-expanded": F(h) }]),
|
|
3057
|
+
onClick: Q((b) => X(h), ["stop"])
|
|
3058
|
+
}, [...v[6] || (v[6] = [
|
|
3048
3059
|
l("svg", {
|
|
3049
3060
|
width: "12",
|
|
3050
3061
|
height: "12",
|
|
@@ -3063,12 +3074,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3063
3074
|
e.showCheckbox ? (i(), r("span", {
|
|
3064
3075
|
key: 2,
|
|
3065
3076
|
class: E(["ytree-node__checkbox", {
|
|
3066
|
-
"is-checked": D(
|
|
3067
|
-
"is-indeterminate": T(
|
|
3077
|
+
"is-checked": D(h),
|
|
3078
|
+
"is-indeterminate": T(h)
|
|
3068
3079
|
}]),
|
|
3069
|
-
onClick: Q((
|
|
3080
|
+
onClick: Q((b) => O(h), ["stop"])
|
|
3070
3081
|
}, [
|
|
3071
|
-
D(
|
|
3082
|
+
D(h) ? (i(), r("svg", Rl, [...v[7] || (v[7] = [
|
|
3072
3083
|
l("path", {
|
|
3073
3084
|
d: "M2 6L4.5 8.5L10 3",
|
|
3074
3085
|
stroke: "currentColor",
|
|
@@ -3076,7 +3087,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3076
3087
|
"stroke-linecap": "round",
|
|
3077
3088
|
"stroke-linejoin": "round"
|
|
3078
3089
|
}, null, -1)
|
|
3079
|
-
])])) : T(
|
|
3090
|
+
])])) : T(h) ? (i(), r("svg", Vl, [...v[8] || (v[8] = [
|
|
3080
3091
|
l("path", {
|
|
3081
3092
|
d: "M2 6L10 6",
|
|
3082
3093
|
stroke: "currentColor",
|
|
@@ -3091,57 +3102,57 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3091
3102
|
}, null, 2)) : R("", !0),
|
|
3092
3103
|
l("img", {
|
|
3093
3104
|
class: "ytree-node__avatar",
|
|
3094
|
-
src:
|
|
3095
|
-
alt: g(
|
|
3096
|
-
}, null, 8,
|
|
3105
|
+
src: w(h, o),
|
|
3106
|
+
alt: g(h) ? "person" : "dept"
|
|
3107
|
+
}, null, 8, Al),
|
|
3097
3108
|
l("span", {
|
|
3098
|
-
class: E(["ytree-node__label", { "is-employee": g(
|
|
3099
|
-
}, le(
|
|
3100
|
-
l("div",
|
|
3109
|
+
class: E(["ytree-node__label", { "is-employee": g(h) }])
|
|
3110
|
+
}, le(S(h)), 3),
|
|
3111
|
+
l("div", Fl, [
|
|
3101
3112
|
ce(p.$slots, "node-content", {
|
|
3102
|
-
node:
|
|
3103
|
-
isCurrent: I(
|
|
3104
|
-
isExpanded:
|
|
3105
|
-
hasChildren: c(
|
|
3113
|
+
node: h,
|
|
3114
|
+
isCurrent: I(h),
|
|
3115
|
+
isExpanded: F(h),
|
|
3116
|
+
hasChildren: c(h)
|
|
3106
3117
|
}, void 0, !0)
|
|
3107
3118
|
])
|
|
3108
3119
|
], 42, Tl),
|
|
3109
3120
|
de(De, { name: "ytree-node" }, {
|
|
3110
3121
|
default: ve(() => [
|
|
3111
|
-
c(
|
|
3112
|
-
(i(!0), r(ue, null, pe(
|
|
3113
|
-
key:
|
|
3122
|
+
c(h) && F(h) ? (i(), r("div", Yl, [
|
|
3123
|
+
(i(!0), r(ue, null, pe(M(h), (b) => (i(), r("div", {
|
|
3124
|
+
key: k(b),
|
|
3114
3125
|
class: E(["ytree-node", {
|
|
3115
|
-
"ytree-node--current": I(
|
|
3116
|
-
"ytree-node--highlight":
|
|
3126
|
+
"ytree-node--current": I(b),
|
|
3127
|
+
"ytree-node--highlight": H(b)
|
|
3117
3128
|
}])
|
|
3118
3129
|
}, [
|
|
3119
3130
|
l("div", {
|
|
3120
|
-
class: E(["ytree-node__content", { "is-child-style": J(
|
|
3131
|
+
class: E(["ytree-node__content", { "is-child-style": J(b, o) }]),
|
|
3121
3132
|
style: {
|
|
3122
3133
|
paddingLeft: "54px"
|
|
3123
3134
|
},
|
|
3124
|
-
"data-level": q(o,
|
|
3135
|
+
"data-level": q(o, b),
|
|
3125
3136
|
onClick: (m) => G(
|
|
3126
|
-
|
|
3127
|
-
|
|
3137
|
+
b,
|
|
3138
|
+
b,
|
|
3128
3139
|
null,
|
|
3129
3140
|
o
|
|
3130
3141
|
),
|
|
3131
3142
|
onContextmenu: (m) => fe(
|
|
3132
3143
|
m,
|
|
3133
|
-
|
|
3134
|
-
|
|
3144
|
+
b,
|
|
3145
|
+
b,
|
|
3135
3146
|
null
|
|
3136
3147
|
)
|
|
3137
3148
|
}, [
|
|
3138
|
-
c(
|
|
3149
|
+
c(b) ? (i(), r("span", {
|
|
3139
3150
|
key: 0,
|
|
3140
3151
|
class: E(["ytree-node__expand-icon", {
|
|
3141
|
-
"is-expanded":
|
|
3152
|
+
"is-expanded": F(b)
|
|
3142
3153
|
}]),
|
|
3143
|
-
onClick: Q((m) => X(
|
|
3144
|
-
}, [...
|
|
3154
|
+
onClick: Q((m) => X(b), ["stop"])
|
|
3155
|
+
}, [...v[9] || (v[9] = [
|
|
3145
3156
|
l("svg", {
|
|
3146
3157
|
width: "12",
|
|
3147
3158
|
height: "12",
|
|
@@ -3160,12 +3171,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3160
3171
|
e.showCheckbox ? (i(), r("span", {
|
|
3161
3172
|
key: 2,
|
|
3162
3173
|
class: E(["ytree-node__checkbox", {
|
|
3163
|
-
"is-checked": D(
|
|
3164
|
-
"is-indeterminate": T(
|
|
3174
|
+
"is-checked": D(b),
|
|
3175
|
+
"is-indeterminate": T(b)
|
|
3165
3176
|
}]),
|
|
3166
|
-
onClick: Q((m) =>
|
|
3177
|
+
onClick: Q((m) => O(b), ["stop"])
|
|
3167
3178
|
}, [
|
|
3168
|
-
D(
|
|
3179
|
+
D(b) ? (i(), r("svg", jl, [...v[10] || (v[10] = [
|
|
3169
3180
|
l("path", {
|
|
3170
3181
|
d: "M2 6L4.5 8.5L10 3",
|
|
3171
3182
|
stroke: "currentColor",
|
|
@@ -3173,7 +3184,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3173
3184
|
"stroke-linecap": "round",
|
|
3174
3185
|
"stroke-linejoin": "round"
|
|
3175
3186
|
}, null, -1)
|
|
3176
|
-
])])) : T(
|
|
3187
|
+
])])) : T(b) ? (i(), r("svg", ql, [...v[11] || (v[11] = [
|
|
3177
3188
|
l("path", {
|
|
3178
3189
|
d: "M2 6L10 6",
|
|
3179
3190
|
stroke: "currentColor",
|
|
@@ -3181,37 +3192,37 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3181
3192
|
"stroke-linecap": "round"
|
|
3182
3193
|
}, null, -1)
|
|
3183
3194
|
])])) : R("", !0)
|
|
3184
|
-
], 10,
|
|
3195
|
+
], 10, Ol)) : R("", !0),
|
|
3185
3196
|
e.iconClass ? (i(), r("span", {
|
|
3186
3197
|
key: 3,
|
|
3187
3198
|
class: E(["ytree-node__icon", e.iconClass])
|
|
3188
3199
|
}, null, 2)) : R("", !0),
|
|
3189
3200
|
l("img", {
|
|
3190
3201
|
class: "ytree-node__avatar",
|
|
3191
|
-
src: b
|
|
3192
|
-
alt: g(
|
|
3202
|
+
src: w(b, o),
|
|
3203
|
+
alt: g(b) ? "person" : "dept"
|
|
3193
3204
|
}, null, 8, Ul),
|
|
3194
3205
|
l("span", {
|
|
3195
3206
|
class: E(["ytree-node__label", {
|
|
3196
|
-
"is-employee": g(
|
|
3207
|
+
"is-employee": g(b)
|
|
3197
3208
|
}])
|
|
3198
|
-
}, le(
|
|
3209
|
+
}, le(S(b)), 3),
|
|
3199
3210
|
l("div", Zl, [
|
|
3200
3211
|
ce(p.$slots, "node-content", {
|
|
3201
|
-
node:
|
|
3202
|
-
isCurrent: I(
|
|
3203
|
-
isExpanded:
|
|
3204
|
-
hasChildren: c(
|
|
3212
|
+
node: b,
|
|
3213
|
+
isCurrent: I(b),
|
|
3214
|
+
isExpanded: F(b),
|
|
3215
|
+
hasChildren: c(b)
|
|
3205
3216
|
}, void 0, !0)
|
|
3206
3217
|
])
|
|
3207
3218
|
], 42, Pl),
|
|
3208
3219
|
de(De, { name: "ytree-node" }, {
|
|
3209
3220
|
default: ve(() => [
|
|
3210
|
-
c(
|
|
3211
|
-
(i(!0), r(ue, null, pe(
|
|
3212
|
-
|
|
3221
|
+
c(b) && F(b) ? (i(), r("div", Ql, [
|
|
3222
|
+
(i(!0), r(ue, null, pe(M(
|
|
3223
|
+
b
|
|
3213
3224
|
), (m) => (i(), r("div", {
|
|
3214
|
-
key:
|
|
3225
|
+
key: k(m),
|
|
3215
3226
|
class: E(["ytree-node", {
|
|
3216
3227
|
"ytree-node--current": I(m)
|
|
3217
3228
|
}])
|
|
@@ -3222,14 +3233,14 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3222
3233
|
paddingLeft: "70px"
|
|
3223
3234
|
},
|
|
3224
3235
|
"data-level": q(o, m),
|
|
3225
|
-
onClick: (
|
|
3236
|
+
onClick: (V) => G(
|
|
3226
3237
|
m,
|
|
3227
3238
|
m,
|
|
3228
3239
|
null,
|
|
3229
3240
|
o
|
|
3230
3241
|
),
|
|
3231
|
-
onContextmenu: (
|
|
3232
|
-
|
|
3242
|
+
onContextmenu: (V) => fe(
|
|
3243
|
+
V,
|
|
3233
3244
|
m,
|
|
3234
3245
|
m,
|
|
3235
3246
|
null
|
|
@@ -3238,10 +3249,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3238
3249
|
c(m) ? (i(), r("span", {
|
|
3239
3250
|
key: 0,
|
|
3240
3251
|
class: E(["ytree-node__expand-icon", {
|
|
3241
|
-
"is-expanded":
|
|
3252
|
+
"is-expanded": F(m)
|
|
3242
3253
|
}]),
|
|
3243
|
-
onClick: Q((
|
|
3244
|
-
}, [...
|
|
3254
|
+
onClick: Q((V) => X(m), ["stop"])
|
|
3255
|
+
}, [...v[12] || (v[12] = [
|
|
3245
3256
|
l("svg", {
|
|
3246
3257
|
width: "12",
|
|
3247
3258
|
height: "12",
|
|
@@ -3265,9 +3276,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3265
3276
|
m
|
|
3266
3277
|
)
|
|
3267
3278
|
}]),
|
|
3268
|
-
onClick: Q((
|
|
3279
|
+
onClick: Q((V) => O(m), ["stop"])
|
|
3269
3280
|
}, [
|
|
3270
|
-
D(m) ? (i(), r("svg", to, [...
|
|
3281
|
+
D(m) ? (i(), r("svg", to, [...v[13] || (v[13] = [
|
|
3271
3282
|
l("path", {
|
|
3272
3283
|
d: "M2 6L4.5 8.5L10 3",
|
|
3273
3284
|
stroke: "currentColor",
|
|
@@ -3277,7 +3288,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3277
3288
|
}, null, -1)
|
|
3278
3289
|
])])) : T(
|
|
3279
3290
|
m
|
|
3280
|
-
) ? (i(), r("svg", no, [...
|
|
3291
|
+
) ? (i(), r("svg", no, [...v[14] || (v[14] = [
|
|
3281
3292
|
l("path", {
|
|
3282
3293
|
d: "M2 6L10 6",
|
|
3283
3294
|
stroke: "currentColor",
|
|
@@ -3292,19 +3303,19 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3292
3303
|
}, null, 2)) : R("", !0),
|
|
3293
3304
|
l("img", {
|
|
3294
3305
|
class: "ytree-node__avatar",
|
|
3295
|
-
src:
|
|
3306
|
+
src: w(m, o),
|
|
3296
3307
|
alt: g(m) ? "person" : "dept"
|
|
3297
3308
|
}, null, 8, lo),
|
|
3298
3309
|
l("span", {
|
|
3299
3310
|
class: E(["ytree-node__label", {
|
|
3300
3311
|
"is-employee": g(m)
|
|
3301
3312
|
}])
|
|
3302
|
-
}, le(
|
|
3313
|
+
}, le(S(m)), 3),
|
|
3303
3314
|
l("div", oo, [
|
|
3304
3315
|
ce(p.$slots, "node-content", {
|
|
3305
3316
|
node: m,
|
|
3306
3317
|
isCurrent: I(m),
|
|
3307
|
-
isExpanded:
|
|
3318
|
+
isExpanded: F(m),
|
|
3308
3319
|
hasChildren: c(m)
|
|
3309
3320
|
}, void 0, !0)
|
|
3310
3321
|
])
|
|
@@ -3345,9 +3356,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3345
3356
|
modelValue: { default: () => ({}) }
|
|
3346
3357
|
},
|
|
3347
3358
|
emits: ["update:modelValue", "search", "reset", "field-change"],
|
|
3348
|
-
setup(e, { emit:
|
|
3349
|
-
const t = e, n =
|
|
3350
|
-
function
|
|
3359
|
+
setup(e, { emit: x }) {
|
|
3360
|
+
const t = e, n = x, y = K(!1), d = lt({}), f = j(() => t.fields.filter((D) => !D.hidden)), L = j(() => y.value ? f.value : f.value.slice(0, t.maxVisibleFields)), k = j(() => f.value.length > t.maxVisibleFields);
|
|
3361
|
+
function S(D) {
|
|
3351
3362
|
switch (D) {
|
|
3352
3363
|
case "select":
|
|
3353
3364
|
return Je;
|
|
@@ -3362,7 +3373,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3362
3373
|
function g(D) {
|
|
3363
3374
|
n("field-change", D, d[D.key]), n("update:modelValue", { ...d });
|
|
3364
3375
|
}
|
|
3365
|
-
function
|
|
3376
|
+
function w() {
|
|
3366
3377
|
const D = q(d), T = J(D);
|
|
3367
3378
|
n("search", { data: T });
|
|
3368
3379
|
}
|
|
@@ -3372,46 +3383,46 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3372
3383
|
(T == null ? void 0 : T.type) === "daterange" ? d[D] = { startDate: null, endDate: null } : (T == null ? void 0 : T.type) === "date" ? d[D] = null : d[D] = "";
|
|
3373
3384
|
}), n("reset"), n("update:modelValue", { ...d });
|
|
3374
3385
|
}
|
|
3375
|
-
function
|
|
3386
|
+
function M() {
|
|
3376
3387
|
y.value = !y.value;
|
|
3377
3388
|
}
|
|
3378
3389
|
function q(D) {
|
|
3379
3390
|
const T = {};
|
|
3380
3391
|
return Object.keys(D).forEach((I) => {
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3392
|
+
const H = D[I], O = t.fields.find((ie) => ie.key === I);
|
|
3393
|
+
H != null && H !== "" && (typeof H == "object" && H.startDate && H.endDate ? H.startDate && H.endDate && (T[I] = H) : O && (O.type === "date" || O.type === "daterange") ? H !== 0 && (T[I] = H) : T[I] = H);
|
|
3383
3394
|
}), T;
|
|
3384
3395
|
}
|
|
3385
3396
|
function J(D) {
|
|
3386
3397
|
const T = {};
|
|
3387
3398
|
return Object.keys(D).forEach((I) => {
|
|
3388
|
-
const
|
|
3389
|
-
if (
|
|
3390
|
-
if (
|
|
3391
|
-
const ie =
|
|
3392
|
-
|
|
3393
|
-
} else
|
|
3399
|
+
const H = D[I], O = t.fields.find((ie) => ie.key === I);
|
|
3400
|
+
if (O)
|
|
3401
|
+
if (O.type === "daterange" && typeof H == "object") {
|
|
3402
|
+
const ie = O.startKey || `${I}Start`, X = O.endKey || `${I}End`;
|
|
3403
|
+
H.startDate && H.endDate && H.startDate !== 0 && H.endDate !== 0 && (O.format === "timestamp" ? (T[ie] = new Date(H.startDate).getTime(), T[X] = new Date(H.endDate).getTime()) : (T[ie] = H.startDate, T[X] = H.endDate));
|
|
3404
|
+
} else O.type === "date" && H && H !== 0 && O.format === "timestamp" ? T[I] = new Date(H).getTime() : T[I] = H;
|
|
3394
3405
|
else
|
|
3395
|
-
T[I] =
|
|
3406
|
+
T[I] = H;
|
|
3396
3407
|
}), T;
|
|
3397
3408
|
}
|
|
3398
|
-
function
|
|
3409
|
+
function F() {
|
|
3399
3410
|
t.fields.forEach((D) => {
|
|
3400
|
-
var T, I,
|
|
3411
|
+
var T, I, H;
|
|
3401
3412
|
d[D.key] === void 0 && (D.type === "daterange" ? d[D.key] = ((T = t.modelValue) == null ? void 0 : T[D.key]) || {
|
|
3402
3413
|
startDate: null,
|
|
3403
3414
|
endDate: null
|
|
3404
|
-
} : D.type === "date" ? d[D.key] = ((I = t.modelValue) == null ? void 0 : I[D.key]) || null : d[D.key] = ((
|
|
3415
|
+
} : D.type === "date" ? d[D.key] = ((I = t.modelValue) == null ? void 0 : I[D.key]) || null : d[D.key] = ((H = t.modelValue) == null ? void 0 : H[D.key]) || "");
|
|
3405
3416
|
});
|
|
3406
3417
|
}
|
|
3407
|
-
return
|
|
3418
|
+
return ae(
|
|
3408
3419
|
() => t.modelValue,
|
|
3409
3420
|
(D) => {
|
|
3410
3421
|
D && Object.assign(d, D);
|
|
3411
3422
|
},
|
|
3412
3423
|
{ deep: !0, immediate: !0 }
|
|
3413
3424
|
), Se(() => {
|
|
3414
|
-
|
|
3425
|
+
F();
|
|
3415
3426
|
}), (D, T) => (i(), r("div", uo, [
|
|
3416
3427
|
l("div", co, [
|
|
3417
3428
|
l("div", fo, [
|
|
@@ -3428,9 +3439,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3428
3439
|
}, [
|
|
3429
3440
|
l("div", ho, [
|
|
3430
3441
|
l("label", po, le(I.label), 1),
|
|
3431
|
-
(i(), Be(
|
|
3442
|
+
(i(), Be(at(S(I.type)), {
|
|
3432
3443
|
modelValue: d[I.key],
|
|
3433
|
-
"onUpdate:modelValue": (
|
|
3444
|
+
"onUpdate:modelValue": (H) => d[I.key] = H,
|
|
3434
3445
|
placeholder: I.placeholder || `请输入${I.label}`,
|
|
3435
3446
|
options: I.options,
|
|
3436
3447
|
clearable: I.clearable !== !1,
|
|
@@ -3439,19 +3450,19 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3439
3450
|
format: I.format || "timestamp",
|
|
3440
3451
|
"include-time": I.includeTime || !1,
|
|
3441
3452
|
filterable: I.filterable === !0,
|
|
3442
|
-
onInput: (
|
|
3443
|
-
onChange: (
|
|
3453
|
+
onInput: (H) => g(I),
|
|
3454
|
+
onChange: (H) => g(I)
|
|
3444
3455
|
}, null, 40, ["modelValue", "onUpdate:modelValue", "placeholder", "options", "clearable", "size", "width", "format", "include-time", "filterable", "onInput", "onChange"]))
|
|
3445
3456
|
])
|
|
3446
3457
|
]))), 128))
|
|
3447
3458
|
]),
|
|
3448
3459
|
_: 1
|
|
3449
3460
|
}),
|
|
3450
|
-
|
|
3451
|
-
de(
|
|
3461
|
+
k.value ? (i(), r("div", yo, [
|
|
3462
|
+
de(Fe, {
|
|
3452
3463
|
variant: "secondary",
|
|
3453
3464
|
size: "small",
|
|
3454
|
-
onClick:
|
|
3465
|
+
onClick: M
|
|
3455
3466
|
}, {
|
|
3456
3467
|
default: ve(() => [
|
|
3457
3468
|
Ce(le(y.value ? "收起" : "展开") + " ", 1),
|
|
@@ -3464,10 +3475,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3464
3475
|
])) : R("", !0),
|
|
3465
3476
|
l("div", go, [
|
|
3466
3477
|
l("div", mo, [
|
|
3467
|
-
de(
|
|
3478
|
+
de(Fe, {
|
|
3468
3479
|
variant: "primary",
|
|
3469
3480
|
size: "small",
|
|
3470
|
-
onClick:
|
|
3481
|
+
onClick: w,
|
|
3471
3482
|
loading: e.loading
|
|
3472
3483
|
}, {
|
|
3473
3484
|
default: ve(() => [...T[0] || (T[0] = [
|
|
@@ -3475,7 +3486,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3475
3486
|
])]),
|
|
3476
3487
|
_: 1
|
|
3477
3488
|
}, 8, ["loading"]),
|
|
3478
|
-
de(
|
|
3489
|
+
de(Fe, {
|
|
3479
3490
|
variant: "secondary",
|
|
3480
3491
|
size: "small",
|
|
3481
3492
|
onClick: c,
|
|
@@ -3528,23 +3539,23 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3528
3539
|
onClose: {}
|
|
3529
3540
|
},
|
|
3530
3541
|
setup(e) {
|
|
3531
|
-
const
|
|
3542
|
+
const x = e, t = K(!1);
|
|
3532
3543
|
let n;
|
|
3533
3544
|
Se(() => {
|
|
3534
3545
|
requestAnimationFrame(() => {
|
|
3535
|
-
t.value = !0,
|
|
3546
|
+
t.value = !0, x.duration && x.duration > 0 && (n = window.setTimeout(() => y(), x.duration));
|
|
3536
3547
|
});
|
|
3537
|
-
}),
|
|
3548
|
+
}), st(() => {
|
|
3538
3549
|
n && window.clearTimeout(n);
|
|
3539
3550
|
});
|
|
3540
3551
|
function y() {
|
|
3541
3552
|
t.value = !1;
|
|
3542
3553
|
}
|
|
3543
3554
|
function d() {
|
|
3544
|
-
var
|
|
3545
|
-
(
|
|
3555
|
+
var f;
|
|
3556
|
+
(f = x.onClose) == null || f.call(x, x.id);
|
|
3546
3557
|
}
|
|
3547
|
-
return (
|
|
3558
|
+
return (f, L) => (i(), Be(De, {
|
|
3548
3559
|
name: "y-msg-fade",
|
|
3549
3560
|
onAfterLeave: d
|
|
3550
3561
|
}, {
|
|
@@ -3601,78 +3612,78 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3601
3612
|
}
|
|
3602
3613
|
}), So = /* @__PURE__ */ ke(_o, [["__scopeId", "data-v-ceac9e81"]]);
|
|
3603
3614
|
let Mo = 1;
|
|
3604
|
-
const
|
|
3615
|
+
const Oe = 12, Ie = [];
|
|
3605
3616
|
function Lo() {
|
|
3606
3617
|
let e = 20;
|
|
3607
|
-
return Ie.forEach((
|
|
3608
|
-
e +=
|
|
3618
|
+
return Ie.forEach((x) => {
|
|
3619
|
+
e += x.height + Oe;
|
|
3609
3620
|
}), e;
|
|
3610
3621
|
}
|
|
3611
3622
|
function qe(e) {
|
|
3612
|
-
const
|
|
3613
|
-
if (
|
|
3614
|
-
const { el: t } = Ie[
|
|
3623
|
+
const x = Ie.findIndex((d) => d.id === e);
|
|
3624
|
+
if (x === -1) return;
|
|
3625
|
+
const { el: t } = Ie[x], n = t.firstElementChild;
|
|
3615
3626
|
if (n) {
|
|
3616
3627
|
const d = window.getComputedStyle(n).top;
|
|
3617
3628
|
n.style.top = d, n.classList.add("is-leaving"), n.style.willChange = "opacity, transform";
|
|
3618
3629
|
}
|
|
3619
|
-
Ie[
|
|
3630
|
+
Ie[x].leaving = !0, Pe(), setTimeout(() => {
|
|
3620
3631
|
Ze(null, t), t.parentNode && t.parentNode.removeChild(t);
|
|
3621
|
-
const d = Ie.findIndex((
|
|
3632
|
+
const d = Ie.findIndex((f) => f.id === e);
|
|
3622
3633
|
d !== -1 && Ie.splice(d, 1), Pe();
|
|
3623
3634
|
}, 260);
|
|
3624
3635
|
}
|
|
3625
3636
|
function We(e) {
|
|
3626
3637
|
var d;
|
|
3627
|
-
const
|
|
3638
|
+
const x = Mo++, t = document.createElement("div");
|
|
3628
3639
|
document.body.appendChild(t);
|
|
3629
3640
|
const n = de(So, {
|
|
3630
|
-
id:
|
|
3641
|
+
id: x,
|
|
3631
3642
|
type: e.type || "success",
|
|
3632
3643
|
message: e.message,
|
|
3633
3644
|
duration: e.duration ?? 2500,
|
|
3634
3645
|
offset: Lo(),
|
|
3635
|
-
zIndex: 3e3 +
|
|
3646
|
+
zIndex: 3e3 + x,
|
|
3636
3647
|
closable: e.closable ?? !1,
|
|
3637
|
-
onClose: (
|
|
3648
|
+
onClose: (f) => qe(f)
|
|
3638
3649
|
});
|
|
3639
3650
|
Ze(n, t);
|
|
3640
3651
|
const y = ((d = t.firstElementChild) == null ? void 0 : d.offsetHeight) || 0;
|
|
3641
|
-
return Ie.push({ id:
|
|
3642
|
-
const
|
|
3643
|
-
if (!
|
|
3644
|
-
const L =
|
|
3645
|
-
|
|
3646
|
-
}), { close: () => qe(
|
|
3652
|
+
return Ie.push({ id: x, el: t, vm: n, height: y, leaving: !1 }), Pe(), requestAnimationFrame(() => {
|
|
3653
|
+
const f = t.firstElementChild;
|
|
3654
|
+
if (!f) return;
|
|
3655
|
+
const L = f.offsetHeight || y || 0, k = Ie.find((S) => S.id === x);
|
|
3656
|
+
k && (k.height = L, Pe());
|
|
3657
|
+
}), { close: () => qe(x) };
|
|
3647
3658
|
}
|
|
3648
|
-
const
|
|
3649
|
-
success(e,
|
|
3650
|
-
return We({ ...
|
|
3659
|
+
const Ye = {
|
|
3660
|
+
success(e, x = {}) {
|
|
3661
|
+
return We({ ...x, type: "success", message: e });
|
|
3651
3662
|
},
|
|
3652
|
-
warning(e,
|
|
3653
|
-
return We({ ...
|
|
3663
|
+
warning(e, x = {}) {
|
|
3664
|
+
return We({ ...x, type: "warning", message: e });
|
|
3654
3665
|
},
|
|
3655
|
-
error(e,
|
|
3656
|
-
return We({ ...
|
|
3666
|
+
error(e, x = {}) {
|
|
3667
|
+
return We({ ...x, type: "error", message: e });
|
|
3657
3668
|
}
|
|
3658
3669
|
};
|
|
3659
|
-
typeof window < "u" && (window.YMessage =
|
|
3670
|
+
typeof window < "u" && (window.YMessage = Ye, typeof globalThis.YMessage > "u" && (globalThis.YMessage = Ye));
|
|
3660
3671
|
function Pe() {
|
|
3661
3672
|
let e = 20;
|
|
3662
|
-
Ie.forEach((
|
|
3663
|
-
const t =
|
|
3673
|
+
Ie.forEach((x) => {
|
|
3674
|
+
const t = x.el.firstElementChild;
|
|
3664
3675
|
if (!t) return;
|
|
3665
3676
|
const n = e;
|
|
3666
|
-
if (t.style.transform = `translate(-50%, ${n}px)`, t.style.top || (t.style.top = "0px"), !
|
|
3667
|
-
e += (t.offsetHeight ||
|
|
3677
|
+
if (t.style.transform = `translate(-50%, ${n}px)`, t.style.top || (t.style.top = "0px"), !x.leaving)
|
|
3678
|
+
e += (t.offsetHeight || x.height) + Oe;
|
|
3668
3679
|
else {
|
|
3669
|
-
const y = t.offsetHeight ||
|
|
3670
|
-
e += y +
|
|
3680
|
+
const y = t.offsetHeight || x.height;
|
|
3681
|
+
e += y + Oe;
|
|
3671
3682
|
}
|
|
3672
3683
|
});
|
|
3673
3684
|
}
|
|
3674
3685
|
const Ue = {
|
|
3675
|
-
YButton:
|
|
3686
|
+
YButton: Fe,
|
|
3676
3687
|
YInput: Qe,
|
|
3677
3688
|
YTable: Et,
|
|
3678
3689
|
YSelect: Je,
|
|
@@ -3683,27 +3694,27 @@ const Ue = {
|
|
|
3683
3694
|
YTime: Xe,
|
|
3684
3695
|
YSwitch: Gn,
|
|
3685
3696
|
YImage: ll,
|
|
3686
|
-
YDropdown:
|
|
3697
|
+
YDropdown: al,
|
|
3687
3698
|
YDrawer: vl,
|
|
3688
3699
|
YTree: ro,
|
|
3689
3700
|
QueryEncapsulation: bo
|
|
3690
3701
|
}, Bo = {
|
|
3691
3702
|
install(e) {
|
|
3692
|
-
Object.keys(Ue).forEach((
|
|
3693
|
-
e.component(
|
|
3694
|
-
}), e.config.globalProperties.$message =
|
|
3703
|
+
Object.keys(Ue).forEach((x) => {
|
|
3704
|
+
e.component(x, Ue[x]);
|
|
3705
|
+
}), e.config.globalProperties.$message = Ye, typeof window < "u" && (window.YMessage = Ye);
|
|
3695
3706
|
}
|
|
3696
3707
|
};
|
|
3697
3708
|
export {
|
|
3698
3709
|
bo as QueryEncapsulation,
|
|
3699
3710
|
ln as YBadge,
|
|
3700
|
-
|
|
3711
|
+
Fe as YButton,
|
|
3701
3712
|
fn as YDialog,
|
|
3702
3713
|
vl as YDrawer,
|
|
3703
|
-
|
|
3714
|
+
al as YDropdown,
|
|
3704
3715
|
ll as YImage,
|
|
3705
3716
|
Qe as YInput,
|
|
3706
|
-
|
|
3717
|
+
Ye as YMessage,
|
|
3707
3718
|
Nt as YPagination,
|
|
3708
3719
|
pn as YPopover,
|
|
3709
3720
|
Je as YSelect,
|