@xto/navigation 1.1.0 → 1.2.0
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/es/index.mjs +443 -326
- package/es/style.css +1 -1
- package/lib/index.cjs +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -2
package/es/index.mjs
CHANGED
|
@@ -1,95 +1,99 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useNamespace as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as V, useSlots as W, ref as w, watch as T, provide as A, computed as m, openBlock as u, createElementBlock as d, normalizeClass as o, createElementVNode as h, unref as r, Fragment as S, renderList as q, toDisplayString as H, renderSlot as f, inject as B, withDirectives as N, createCommentVNode as C, vShow as O, normalizeStyle as I, createTextVNode as $, createVNode as X, Transition as j, withCtx as G, onMounted as J } from "vue";
|
|
2
|
+
import { useNamespace as g } from "@xto/core";
|
|
3
|
+
const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
4
4
|
name: "XTabs",
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
|
-
modelValue: { default:
|
|
7
|
+
modelValue: { default: void 0 },
|
|
8
|
+
activeKey: { default: void 0 },
|
|
8
9
|
type: { default: "line" },
|
|
9
10
|
tabPosition: { default: "top" },
|
|
10
11
|
addable: { type: Boolean, default: !1 },
|
|
11
12
|
closable: { type: Boolean, default: !1 }
|
|
12
13
|
},
|
|
13
|
-
emits: ["update:modelValue", "tabClick", "edit"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
T(() =>
|
|
17
|
-
|
|
14
|
+
emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
|
|
15
|
+
setup(s, { emit: n }) {
|
|
16
|
+
const e = s, a = n, l = g("tabs"), t = W(), v = w(e.modelValue ?? e.activeKey ?? "");
|
|
17
|
+
T([() => e.modelValue, () => e.activeKey], ([i, p]) => {
|
|
18
|
+
const c = i ?? p;
|
|
19
|
+
c !== void 0 && (v.value = c);
|
|
18
20
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
+
const z = (i, p) => {
|
|
22
|
+
v.value = i, a("update:modelValue", i), a("update:activeKey", i);
|
|
21
23
|
};
|
|
22
|
-
|
|
23
|
-
props:
|
|
24
|
-
activeName:
|
|
25
|
-
handleTabClick:
|
|
24
|
+
A("tabs", {
|
|
25
|
+
props: e,
|
|
26
|
+
activeName: v,
|
|
27
|
+
handleTabClick: z
|
|
26
28
|
});
|
|
27
|
-
const
|
|
29
|
+
const M = m(() => [
|
|
28
30
|
l.b(),
|
|
29
|
-
l.m(
|
|
30
|
-
l.is(`position-${
|
|
31
|
-
]), b =
|
|
32
|
-
var
|
|
33
|
-
return (((
|
|
34
|
-
var
|
|
31
|
+
l.m(e.type),
|
|
32
|
+
l.is(`position-${e.tabPosition}`)
|
|
33
|
+
]), b = m(() => {
|
|
34
|
+
var p;
|
|
35
|
+
return (((p = t.default) == null ? void 0 : p.call(t)) || []).filter((c) => c.type && c.type.name === "XTabPane").map((c) => {
|
|
36
|
+
var k, y, L, D, P, E, K;
|
|
35
37
|
return {
|
|
36
|
-
name: ((
|
|
37
|
-
label: (
|
|
38
|
-
disabled: ((
|
|
38
|
+
name: ((k = c.props) == null ? void 0 : k.name) || ((y = c.props) == null ? void 0 : y.key) || ((L = c.props) == null ? void 0 : L.label) || ((D = c.props) == null ? void 0 : D.tab),
|
|
39
|
+
label: ((P = c.props) == null ? void 0 : P.label) || ((E = c.props) == null ? void 0 : E.tab),
|
|
40
|
+
disabled: ((K = c.props) == null ? void 0 : K.disabled) === !0
|
|
39
41
|
};
|
|
40
42
|
});
|
|
41
43
|
});
|
|
42
|
-
return (
|
|
43
|
-
class:
|
|
44
|
+
return (i, p) => (u(), d("div", {
|
|
45
|
+
class: o(M.value)
|
|
44
46
|
}, [
|
|
45
47
|
h("div", {
|
|
46
|
-
class:
|
|
48
|
+
class: o(r(l).e("header"))
|
|
47
49
|
}, [
|
|
48
50
|
h("div", {
|
|
49
|
-
class:
|
|
51
|
+
class: o(r(l).e("nav"))
|
|
50
52
|
}, [
|
|
51
|
-
(u(!0),
|
|
52
|
-
key:
|
|
53
|
-
class:
|
|
53
|
+
(u(!0), d(S, null, q(b.value, (c) => (u(), d("div", {
|
|
54
|
+
key: c.name,
|
|
55
|
+
class: o([
|
|
54
56
|
r(l).e("item"),
|
|
55
|
-
r(l).em("item",
|
|
56
|
-
r(l).is("disabled",
|
|
57
|
+
r(l).em("item", v.value === c.name ? "active" : ""),
|
|
58
|
+
r(l).is("disabled", c.disabled)
|
|
57
59
|
]),
|
|
58
|
-
onClick: (
|
|
59
|
-
},
|
|
60
|
+
onClick: (k) => c.disabled ? null : z(c.name)
|
|
61
|
+
}, H(c.label), 11, Q))), 128))
|
|
60
62
|
], 2)
|
|
61
63
|
], 2),
|
|
62
64
|
h("div", {
|
|
63
|
-
class:
|
|
65
|
+
class: o(r(l).e("content"))
|
|
64
66
|
}, [
|
|
65
|
-
|
|
67
|
+
f(i.$slots, "default")
|
|
66
68
|
], 2)
|
|
67
69
|
], 2));
|
|
68
70
|
}
|
|
69
|
-
}),
|
|
71
|
+
}), U = {
|
|
70
72
|
class: "x-tab-pane",
|
|
71
73
|
role: "tabpanel"
|
|
72
|
-
},
|
|
74
|
+
}, c0 = /* @__PURE__ */ V({
|
|
73
75
|
name: "XTabPane",
|
|
74
76
|
__name: "TabPane",
|
|
75
77
|
props: {
|
|
76
78
|
label: {},
|
|
79
|
+
tab: {},
|
|
77
80
|
name: {},
|
|
81
|
+
key: {},
|
|
78
82
|
disabled: { type: Boolean, default: !1 },
|
|
79
83
|
closable: { type: Boolean, default: !1 },
|
|
80
84
|
lazy: { type: Boolean, default: !1 }
|
|
81
85
|
},
|
|
82
|
-
setup(
|
|
83
|
-
const n =
|
|
84
|
-
return T(() =>
|
|
85
|
-
|
|
86
|
-
}, { immediate: !0 }),
|
|
87
|
-
|
|
86
|
+
setup(s) {
|
|
87
|
+
const n = s, e = B("tabs"), a = w(!1), l = m(() => n.name || n.key || n.label || n.tab), t = m(() => (e == null ? void 0 : e.activeName.value) === l.value);
|
|
88
|
+
return T(() => e == null ? void 0 : e.activeName.value, () => {
|
|
89
|
+
t.value && n.lazy && !a.value && (a.value = !0);
|
|
90
|
+
}, { immediate: !0 }), t.value && n.lazy && (a.value = !0), (v, z) => N((u(), d("div", U, [
|
|
91
|
+
a.value || !s.lazy ? f(v.$slots, "default", { key: 0 }) : C("", !0)
|
|
88
92
|
], 512)), [
|
|
89
|
-
[
|
|
93
|
+
[O, t.value]
|
|
90
94
|
]);
|
|
91
95
|
}
|
|
92
|
-
}),
|
|
96
|
+
}), i0 = /* @__PURE__ */ V({
|
|
93
97
|
name: "XMenu",
|
|
94
98
|
__name: "index",
|
|
95
99
|
props: {
|
|
@@ -103,41 +107,41 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
|
|
|
103
107
|
router: { type: Boolean }
|
|
104
108
|
},
|
|
105
109
|
emits: ["update:modelValue", "select", "open", "close"],
|
|
106
|
-
setup(
|
|
107
|
-
const
|
|
108
|
-
T(() =>
|
|
109
|
-
|
|
110
|
-
}),
|
|
111
|
-
props:
|
|
112
|
-
activeIndex:
|
|
113
|
-
openedMenus:
|
|
114
|
-
handleSelect: (
|
|
115
|
-
|
|
110
|
+
setup(s, { emit: n }) {
|
|
111
|
+
const e = s, a = n, l = g("menu"), t = w(e.modelValue), v = w([...e.defaultOpeneds]);
|
|
112
|
+
T(() => e.modelValue, (c) => {
|
|
113
|
+
t.value = c;
|
|
114
|
+
}), A("menu", {
|
|
115
|
+
props: e,
|
|
116
|
+
activeIndex: t,
|
|
117
|
+
openedMenus: v,
|
|
118
|
+
handleSelect: (c, k = []) => {
|
|
119
|
+
t.value = c, a("update:modelValue", c), a("select", c, k);
|
|
116
120
|
},
|
|
117
|
-
handleOpen: (
|
|
118
|
-
|
|
121
|
+
handleOpen: (c, k = []) => {
|
|
122
|
+
v.value.includes(c) || v.value.push(c), a("open", c, k);
|
|
119
123
|
},
|
|
120
|
-
handleClose: (
|
|
121
|
-
const
|
|
122
|
-
|
|
124
|
+
handleClose: (c, k = []) => {
|
|
125
|
+
const y = v.value.indexOf(c);
|
|
126
|
+
y > -1 && v.value.splice(y, 1), a("close", c, k);
|
|
123
127
|
}
|
|
124
128
|
});
|
|
125
|
-
const
|
|
129
|
+
const i = m(() => [
|
|
126
130
|
l.b(),
|
|
127
|
-
l.is("collapse",
|
|
128
|
-
l.is(`mode-${
|
|
129
|
-
]),
|
|
130
|
-
backgroundColor:
|
|
131
|
-
color:
|
|
131
|
+
l.is("collapse", e.collapse),
|
|
132
|
+
l.is(`mode-${e.mode}`)
|
|
133
|
+
]), p = m(() => ({
|
|
134
|
+
backgroundColor: e.backgroundColor,
|
|
135
|
+
color: e.textColor
|
|
132
136
|
}));
|
|
133
|
-
return (
|
|
134
|
-
class:
|
|
135
|
-
style:
|
|
137
|
+
return (c, k) => (u(), d("ul", {
|
|
138
|
+
class: o(i.value),
|
|
139
|
+
style: I(p.value)
|
|
136
140
|
}, [
|
|
137
|
-
|
|
141
|
+
f(c.$slots, "default")
|
|
138
142
|
], 6));
|
|
139
143
|
}
|
|
140
|
-
}),
|
|
144
|
+
}), F = {
|
|
141
145
|
// 箭头类
|
|
142
146
|
"arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
|
|
143
147
|
"arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
|
|
@@ -240,6 +244,7 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
|
|
|
240
244
|
list: "M4 6h16M4 10h16M4 14h16M4 18h16",
|
|
241
245
|
grid: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",
|
|
242
246
|
fullscreen: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",
|
|
247
|
+
"fullscreen-exit": "M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5",
|
|
243
248
|
"zoom-in": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7",
|
|
244
249
|
"zoom-out": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",
|
|
245
250
|
print: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",
|
|
@@ -250,12 +255,17 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
|
|
|
250
255
|
database: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",
|
|
251
256
|
server: "M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",
|
|
252
257
|
cloud: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
|
|
253
|
-
gift: "M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"
|
|
258
|
+
gift: "M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",
|
|
259
|
+
// 主题类
|
|
260
|
+
moon: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",
|
|
261
|
+
sun: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
|
|
262
|
+
theme: "M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",
|
|
263
|
+
skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"
|
|
254
264
|
};
|
|
255
|
-
function
|
|
256
|
-
return
|
|
265
|
+
function Y(s) {
|
|
266
|
+
return s in F;
|
|
257
267
|
}
|
|
258
|
-
const
|
|
268
|
+
const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
259
269
|
name: "XIcon",
|
|
260
270
|
__name: "index",
|
|
261
271
|
props: {
|
|
@@ -265,38 +275,38 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
265
275
|
spin: { type: Boolean, default: !1 },
|
|
266
276
|
strokeWidth: { default: 2 }
|
|
267
277
|
},
|
|
268
|
-
setup(
|
|
269
|
-
const n =
|
|
270
|
-
width:
|
|
271
|
-
height:
|
|
278
|
+
setup(s) {
|
|
279
|
+
const n = s, e = g("icon"), a = m(() => typeof n.size == "number" ? `${n.size}px` : n.size), l = m(() => ({
|
|
280
|
+
width: a.value,
|
|
281
|
+
height: a.value,
|
|
272
282
|
color: n.color
|
|
273
|
-
})),
|
|
283
|
+
})), t = m(() => ({
|
|
274
284
|
strokeWidth: n.strokeWidth
|
|
275
|
-
})),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
]),
|
|
279
|
-
return (
|
|
280
|
-
class:
|
|
281
|
-
style:
|
|
285
|
+
})), v = m(() => [
|
|
286
|
+
e.b(),
|
|
287
|
+
e.is("spin", n.spin)
|
|
288
|
+
]), z = m(() => n.name && Y(n.name) ? F[n.name] : "");
|
|
289
|
+
return (M, b) => (u(), d("span", {
|
|
290
|
+
class: o(v.value),
|
|
291
|
+
style: I(l.value)
|
|
282
292
|
}, [
|
|
283
|
-
|
|
293
|
+
z.value ? (u(), d("svg", {
|
|
284
294
|
key: 0,
|
|
285
295
|
viewBox: "0 0 24 24",
|
|
286
296
|
fill: "none",
|
|
287
297
|
stroke: "currentColor",
|
|
288
|
-
"stroke-width":
|
|
298
|
+
"stroke-width": s.strokeWidth,
|
|
289
299
|
"stroke-linecap": "round",
|
|
290
300
|
"stroke-linejoin": "round",
|
|
291
|
-
style:
|
|
301
|
+
style: I(t.value)
|
|
292
302
|
}, [
|
|
293
|
-
h("path", { d:
|
|
294
|
-
], 12,
|
|
295
|
-
|
|
303
|
+
h("path", { d: z.value }, null, 8, e0)
|
|
304
|
+
], 12, Z)) : f(M.$slots, "default", { key: 1 }, () => [
|
|
305
|
+
$(H(s.name), 1)
|
|
296
306
|
])
|
|
297
307
|
], 6));
|
|
298
308
|
}
|
|
299
|
-
}),
|
|
309
|
+
}), x = "x-menu-item", r0 = /* @__PURE__ */ V({
|
|
300
310
|
name: "XMenuItem",
|
|
301
311
|
__name: "MenuItem",
|
|
302
312
|
props: {
|
|
@@ -304,65 +314,65 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
304
314
|
disabled: { type: Boolean, default: !1 },
|
|
305
315
|
icon: {}
|
|
306
316
|
},
|
|
307
|
-
setup(
|
|
308
|
-
const n =
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
|
|
317
|
+
setup(s) {
|
|
318
|
+
const n = s, e = B("menu");
|
|
319
|
+
W();
|
|
320
|
+
const a = m(() => (e == null ? void 0 : e.activeIndex.value) === n.index), l = m(() => e == null ? void 0 : e.props.collapse), t = m(() => (e == null ? void 0 : e.props.mode) === "horizontal"), v = m(() => [
|
|
321
|
+
x,
|
|
312
322
|
{
|
|
313
|
-
"is-active":
|
|
323
|
+
"is-active": a.value,
|
|
314
324
|
"is-disabled": n.disabled,
|
|
315
|
-
"is-horizontal":
|
|
325
|
+
"is-horizontal": t.value,
|
|
316
326
|
"is-collapse": l.value
|
|
317
327
|
}
|
|
318
|
-
]),
|
|
319
|
-
n.disabled || n.index && (
|
|
328
|
+
]), z = m(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), M = () => {
|
|
329
|
+
n.disabled || n.index && (e == null || e.handleSelect(n.index, [n.index]));
|
|
320
330
|
};
|
|
321
|
-
return (b,
|
|
322
|
-
class:
|
|
323
|
-
style:
|
|
324
|
-
onClick:
|
|
331
|
+
return (b, i) => (u(), d("li", {
|
|
332
|
+
class: o(v.value),
|
|
333
|
+
style: I(z.value),
|
|
334
|
+
onClick: M
|
|
325
335
|
}, [
|
|
326
336
|
h("div", {
|
|
327
|
-
class:
|
|
337
|
+
class: o(x + "__content")
|
|
328
338
|
}, [
|
|
329
|
-
|
|
339
|
+
s.icon ? (u(), d("span", {
|
|
330
340
|
key: 0,
|
|
331
|
-
class:
|
|
341
|
+
class: o(x + "__icon")
|
|
332
342
|
}, [
|
|
333
|
-
X(r(
|
|
334
|
-
name:
|
|
343
|
+
X(r(R), {
|
|
344
|
+
name: s.icon,
|
|
335
345
|
size: 18
|
|
336
346
|
}, null, 8, ["name"])
|
|
337
|
-
], 2)) : b.$slots.icon ? (u(),
|
|
347
|
+
], 2)) : b.$slots.icon ? (u(), d("span", {
|
|
338
348
|
key: 1,
|
|
339
|
-
class:
|
|
349
|
+
class: o(x + "__icon")
|
|
340
350
|
}, [
|
|
341
|
-
|
|
342
|
-
], 2)) :
|
|
351
|
+
f(b.$slots, "icon")
|
|
352
|
+
], 2)) : C("", !0),
|
|
343
353
|
h("span", {
|
|
344
|
-
class:
|
|
354
|
+
class: o(x + "__text")
|
|
345
355
|
}, [
|
|
346
|
-
|
|
356
|
+
f(b.$slots, "default")
|
|
347
357
|
], 2)
|
|
348
358
|
], 2)
|
|
349
359
|
], 6));
|
|
350
360
|
}
|
|
351
|
-
}),
|
|
361
|
+
}), a0 = { class: "x-menu-item-group" }, l0 = { class: "x-menu-item-group__title" }, u0 = /* @__PURE__ */ V({
|
|
352
362
|
name: "XMenuItemGroup",
|
|
353
363
|
__name: "MenuItemGroup",
|
|
354
364
|
props: {
|
|
355
365
|
title: {}
|
|
356
366
|
},
|
|
357
|
-
setup(
|
|
358
|
-
return (n,
|
|
359
|
-
h("div",
|
|
367
|
+
setup(s) {
|
|
368
|
+
return (n, e) => (u(), d("li", a0, [
|
|
369
|
+
h("div", l0, H(s.title), 1),
|
|
360
370
|
h("ul", null, [
|
|
361
|
-
|
|
371
|
+
f(n.$slots, "default")
|
|
362
372
|
])
|
|
363
373
|
]));
|
|
364
374
|
}
|
|
365
|
-
}),
|
|
375
|
+
}), _ = "x-sub-menu", d0 = /* @__PURE__ */ V({
|
|
366
376
|
name: "XSubMenu",
|
|
367
377
|
__name: "SubMenu",
|
|
368
378
|
props: {
|
|
@@ -371,65 +381,65 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
371
381
|
disabled: { type: Boolean, default: !1 },
|
|
372
382
|
icon: {}
|
|
373
383
|
},
|
|
374
|
-
setup(
|
|
375
|
-
const n =
|
|
376
|
-
|
|
377
|
-
|
|
384
|
+
setup(s) {
|
|
385
|
+
const n = s, e = B("menu"), a = B("subMenu", null), l = w(!1), t = m(() => !!a), v = m(() => e == null ? void 0 : e.props.collapse), z = m(() => (e == null ? void 0 : e.activeIndex.value) === n.index), M = m(() => [
|
|
386
|
+
_,
|
|
387
|
+
_ + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
|
|
378
388
|
{
|
|
379
|
-
"is-active":
|
|
389
|
+
"is-active": z.value,
|
|
380
390
|
"is-opened": l.value,
|
|
381
391
|
"is-disabled": n.disabled,
|
|
382
|
-
"is-nested":
|
|
383
|
-
"is-collapse":
|
|
392
|
+
"is-nested": t.value,
|
|
393
|
+
"is-collapse": v.value
|
|
384
394
|
}
|
|
385
395
|
]), b = () => {
|
|
386
|
-
n.disabled ||
|
|
387
|
-
},
|
|
388
|
-
n.disabled || ((
|
|
389
|
-
},
|
|
390
|
-
((
|
|
396
|
+
n.disabled || v.value || (l.value = !l.value);
|
|
397
|
+
}, i = () => {
|
|
398
|
+
n.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !0);
|
|
399
|
+
}, p = () => {
|
|
400
|
+
((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !1);
|
|
391
401
|
};
|
|
392
|
-
return
|
|
402
|
+
return A("subMenu", {
|
|
393
403
|
isOpen: l,
|
|
394
|
-
isNested:
|
|
395
|
-
}), (
|
|
396
|
-
var
|
|
397
|
-
return u(),
|
|
398
|
-
class:
|
|
399
|
-
onMouseenter:
|
|
400
|
-
onMouseleave:
|
|
404
|
+
isNested: t
|
|
405
|
+
}), (c, k) => {
|
|
406
|
+
var y;
|
|
407
|
+
return u(), d("li", {
|
|
408
|
+
class: o(M.value),
|
|
409
|
+
onMouseenter: i,
|
|
410
|
+
onMouseleave: p
|
|
401
411
|
}, [
|
|
402
412
|
h("div", {
|
|
403
|
-
class:
|
|
413
|
+
class: o(_ + "__title"),
|
|
404
414
|
onClick: b
|
|
405
415
|
}, [
|
|
406
416
|
h("div", {
|
|
407
|
-
class:
|
|
417
|
+
class: o(_ + "__content")
|
|
408
418
|
}, [
|
|
409
|
-
|
|
419
|
+
s.icon ? (u(), d("span", {
|
|
410
420
|
key: 0,
|
|
411
|
-
class:
|
|
421
|
+
class: o(_ + "__icon")
|
|
412
422
|
}, [
|
|
413
|
-
X(r(
|
|
414
|
-
name:
|
|
423
|
+
X(r(R), {
|
|
424
|
+
name: s.icon,
|
|
415
425
|
size: 18
|
|
416
426
|
}, null, 8, ["name"])
|
|
417
|
-
], 2)) :
|
|
427
|
+
], 2)) : c.$slots.icon ? (u(), d("span", {
|
|
418
428
|
key: 1,
|
|
419
|
-
class:
|
|
429
|
+
class: o(_ + "__icon")
|
|
420
430
|
}, [
|
|
421
|
-
|
|
422
|
-
], 2)) :
|
|
431
|
+
f(c.$slots, "icon")
|
|
432
|
+
], 2)) : C("", !0),
|
|
423
433
|
h("span", {
|
|
424
|
-
class:
|
|
434
|
+
class: o(_ + "__text")
|
|
425
435
|
}, [
|
|
426
|
-
|
|
427
|
-
|
|
436
|
+
f(c.$slots, "title", {}, () => [
|
|
437
|
+
$(H(s.title), 1)
|
|
428
438
|
])
|
|
429
439
|
], 2),
|
|
430
440
|
h("span", {
|
|
431
|
-
class:
|
|
432
|
-
}, [...
|
|
441
|
+
class: o([_ + "__arrow", { "is-open": l.value }])
|
|
442
|
+
}, [...k[0] || (k[0] = [
|
|
433
443
|
h("svg", {
|
|
434
444
|
viewBox: "0 0 1024 1024",
|
|
435
445
|
width: "12",
|
|
@@ -443,18 +453,18 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
443
453
|
])], 2)
|
|
444
454
|
], 2)
|
|
445
455
|
], 2),
|
|
446
|
-
X(
|
|
447
|
-
name: ((
|
|
456
|
+
X(j, {
|
|
457
|
+
name: ((y = r(e)) == null ? void 0 : y.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
|
|
448
458
|
}, {
|
|
449
|
-
default:
|
|
450
|
-
var
|
|
459
|
+
default: G(() => {
|
|
460
|
+
var L;
|
|
451
461
|
return [
|
|
452
|
-
|
|
453
|
-
class:
|
|
462
|
+
N(h("ul", {
|
|
463
|
+
class: o([_ + "__menu", { "is-horizontal": ((L = r(e)) == null ? void 0 : L.props.mode) === "horizontal", "is-collapse": v.value }])
|
|
454
464
|
}, [
|
|
455
|
-
|
|
465
|
+
f(c.$slots, "default")
|
|
456
466
|
], 2), [
|
|
457
|
-
[
|
|
467
|
+
[O, l.value]
|
|
458
468
|
])
|
|
459
469
|
];
|
|
460
470
|
}),
|
|
@@ -463,32 +473,32 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
463
473
|
], 34);
|
|
464
474
|
};
|
|
465
475
|
}
|
|
466
|
-
}),
|
|
476
|
+
}), v0 = /* @__PURE__ */ V({
|
|
467
477
|
name: "XBreadcrumb",
|
|
468
478
|
__name: "index",
|
|
469
479
|
props: {
|
|
470
480
|
separator: { default: "/" },
|
|
471
481
|
separatorIcon: {}
|
|
472
482
|
},
|
|
473
|
-
setup(
|
|
474
|
-
const n =
|
|
475
|
-
|
|
476
|
-
separator:
|
|
477
|
-
separatorIcon:
|
|
483
|
+
setup(s) {
|
|
484
|
+
const n = s, e = g("breadcrumb");
|
|
485
|
+
A("breadcrumb", {
|
|
486
|
+
separator: m(() => n.separator),
|
|
487
|
+
separatorIcon: m(() => n.separatorIcon)
|
|
478
488
|
});
|
|
479
|
-
const
|
|
480
|
-
return (l,
|
|
481
|
-
class:
|
|
489
|
+
const a = m(() => [e.b()]);
|
|
490
|
+
return (l, t) => (u(), d("nav", {
|
|
491
|
+
class: o(a.value),
|
|
482
492
|
"aria-label": "Breadcrumb"
|
|
483
493
|
}, [
|
|
484
494
|
h("ol", {
|
|
485
|
-
class:
|
|
495
|
+
class: o(r(e).e("list"))
|
|
486
496
|
}, [
|
|
487
|
-
|
|
497
|
+
f(l.$slots, "default")
|
|
488
498
|
], 2)
|
|
489
499
|
], 2));
|
|
490
500
|
}
|
|
491
|
-
}),
|
|
501
|
+
}), s0 = ["aria-current"], m0 = /* @__PURE__ */ V({
|
|
492
502
|
name: "XBreadcrumbItem",
|
|
493
503
|
__name: "BreadcrumbItem",
|
|
494
504
|
props: {
|
|
@@ -497,50 +507,50 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
497
507
|
disabled: { type: Boolean }
|
|
498
508
|
},
|
|
499
509
|
emits: ["click"],
|
|
500
|
-
setup(
|
|
501
|
-
const
|
|
510
|
+
setup(s, { emit: n }) {
|
|
511
|
+
const e = s, a = n, l = g("breadcrumb"), t = B("breadcrumb"), v = m(() => [
|
|
502
512
|
l.e("item"),
|
|
503
|
-
l.is("link", !!
|
|
504
|
-
l.is("disabled",
|
|
505
|
-
]),
|
|
506
|
-
var
|
|
507
|
-
return ((
|
|
508
|
-
}),
|
|
509
|
-
var
|
|
510
|
-
return (
|
|
511
|
-
}), b = (
|
|
512
|
-
|
|
513
|
+
l.is("link", !!e.to && !e.disabled),
|
|
514
|
+
l.is("disabled", e.disabled)
|
|
515
|
+
]), z = m(() => {
|
|
516
|
+
var i;
|
|
517
|
+
return ((i = t == null ? void 0 : t.separator) == null ? void 0 : i.value) || "/";
|
|
518
|
+
}), M = m(() => {
|
|
519
|
+
var i;
|
|
520
|
+
return (i = t == null ? void 0 : t.separatorIcon) == null ? void 0 : i.value;
|
|
521
|
+
}), b = (i) => {
|
|
522
|
+
e.disabled || (a("click", i), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
|
|
513
523
|
};
|
|
514
|
-
return (
|
|
515
|
-
class:
|
|
524
|
+
return (i, p) => (u(), d("li", {
|
|
525
|
+
class: o(v.value)
|
|
516
526
|
}, [
|
|
517
|
-
|
|
527
|
+
s.to && !s.disabled ? (u(), d("span", {
|
|
518
528
|
key: 0,
|
|
519
|
-
class:
|
|
529
|
+
class: o(r(l).e("link")),
|
|
520
530
|
onClick: b
|
|
521
531
|
}, [
|
|
522
|
-
|
|
523
|
-
], 2)) : (u(),
|
|
532
|
+
f(i.$slots, "default")
|
|
533
|
+
], 2)) : (u(), d("span", {
|
|
524
534
|
key: 1,
|
|
525
|
-
class:
|
|
526
|
-
"aria-current":
|
|
535
|
+
class: o(r(l).e("text")),
|
|
536
|
+
"aria-current": s.disabled ? "page" : void 0
|
|
527
537
|
}, [
|
|
528
|
-
|
|
529
|
-
], 10,
|
|
538
|
+
f(i.$slots, "default")
|
|
539
|
+
], 10, s0)),
|
|
530
540
|
h("span", {
|
|
531
|
-
class:
|
|
541
|
+
class: o(r(l).e("separator")),
|
|
532
542
|
"aria-hidden": "true"
|
|
533
543
|
}, [
|
|
534
|
-
|
|
544
|
+
M.value ? (u(), d("span", {
|
|
535
545
|
key: 0,
|
|
536
|
-
class:
|
|
537
|
-
},
|
|
538
|
-
|
|
546
|
+
class: o(r(l).e("separator-icon"))
|
|
547
|
+
}, H(M.value), 3)) : (u(), d(S, { key: 1 }, [
|
|
548
|
+
$(H(z.value), 1)
|
|
539
549
|
], 64))
|
|
540
550
|
], 2)
|
|
541
551
|
], 2));
|
|
542
552
|
}
|
|
543
|
-
}),
|
|
553
|
+
}), h0 = /* @__PURE__ */ V({
|
|
544
554
|
name: "XSteps",
|
|
545
555
|
__name: "index",
|
|
546
556
|
props: {
|
|
@@ -553,37 +563,37 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
553
563
|
space: {}
|
|
554
564
|
},
|
|
555
565
|
emits: ["change", "update:active"],
|
|
556
|
-
setup(
|
|
557
|
-
const
|
|
558
|
-
T(() =>
|
|
559
|
-
|
|
560
|
-
}),
|
|
561
|
-
props:
|
|
562
|
-
currentActive:
|
|
563
|
-
stepCount:
|
|
564
|
-
setCurrentActive: (
|
|
565
|
-
|
|
566
|
+
setup(s, { emit: n }) {
|
|
567
|
+
const e = s, a = n, l = g("steps"), t = w(e.active), v = w(0);
|
|
568
|
+
T(() => e.active, (p) => {
|
|
569
|
+
t.value = p;
|
|
570
|
+
}), A("steps", {
|
|
571
|
+
props: e,
|
|
572
|
+
currentActive: t,
|
|
573
|
+
stepCount: v,
|
|
574
|
+
setCurrentActive: (p) => {
|
|
575
|
+
t.value = p, a("change", p), a("update:active", p);
|
|
566
576
|
},
|
|
567
|
-
setStepCount: (
|
|
568
|
-
|
|
577
|
+
setStepCount: (p) => {
|
|
578
|
+
v.value = p;
|
|
569
579
|
}
|
|
570
580
|
});
|
|
571
|
-
const b =
|
|
581
|
+
const b = m(() => [
|
|
572
582
|
l.b(),
|
|
573
|
-
l.m(
|
|
574
|
-
l.is("simple",
|
|
575
|
-
l.is("center",
|
|
576
|
-
]),
|
|
577
|
-
"--steps-space": typeof
|
|
583
|
+
l.m(e.direction),
|
|
584
|
+
l.is("simple", e.simple),
|
|
585
|
+
l.is("center", e.alignCenter)
|
|
586
|
+
]), i = m(() => e.space ? {
|
|
587
|
+
"--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
|
|
578
588
|
} : {});
|
|
579
|
-
return (
|
|
580
|
-
class:
|
|
581
|
-
style:
|
|
589
|
+
return (p, c) => (u(), d("div", {
|
|
590
|
+
class: o(b.value),
|
|
591
|
+
style: I(i.value)
|
|
582
592
|
}, [
|
|
583
|
-
p
|
|
593
|
+
f(p.$slots, "default")
|
|
584
594
|
], 6));
|
|
585
595
|
}
|
|
586
|
-
}),
|
|
596
|
+
}), p0 = /* @__PURE__ */ V({
|
|
587
597
|
name: "XStep",
|
|
588
598
|
__name: "Step",
|
|
589
599
|
props: {
|
|
@@ -592,96 +602,96 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
592
602
|
icon: {},
|
|
593
603
|
status: {}
|
|
594
604
|
},
|
|
595
|
-
setup(
|
|
596
|
-
const n =
|
|
597
|
-
|
|
598
|
-
|
|
605
|
+
setup(s) {
|
|
606
|
+
const n = s, e = g("step"), a = B("steps"), l = w(-1);
|
|
607
|
+
J(() => {
|
|
608
|
+
a && (l.value = a.stepCount.value, a.setStepCount(a.stepCount.value + 1));
|
|
599
609
|
});
|
|
600
|
-
const
|
|
601
|
-
var
|
|
610
|
+
const t = m(() => {
|
|
611
|
+
var p, c, k;
|
|
602
612
|
if (n.status) return n.status;
|
|
603
|
-
const
|
|
604
|
-
return l.value <
|
|
605
|
-
}),
|
|
606
|
-
var
|
|
607
|
-
return l.value === (((
|
|
608
|
-
}),
|
|
609
|
-
|
|
613
|
+
const i = ((p = a == null ? void 0 : a.currentActive) == null ? void 0 : p.value) ?? 0;
|
|
614
|
+
return l.value < i ? ((c = a == null ? void 0 : a.props) == null ? void 0 : c.finishStatus) || "finish" : l.value === i ? ((k = a == null ? void 0 : a.props) == null ? void 0 : k.processStatus) || "process" : "wait";
|
|
615
|
+
}), v = m(() => {
|
|
616
|
+
var i;
|
|
617
|
+
return l.value === (((i = a == null ? void 0 : a.stepCount) == null ? void 0 : i.value) || 0) - 1;
|
|
618
|
+
}), z = m(() => l.value === 0);
|
|
619
|
+
m(() => ({
|
|
610
620
|
wait: "#c0c4cc",
|
|
611
621
|
process: "#409eff",
|
|
612
622
|
finish: "#67c23a",
|
|
613
623
|
error: "#f56c6c",
|
|
614
624
|
success: "#67c23a"
|
|
615
|
-
})[
|
|
616
|
-
const
|
|
617
|
-
var
|
|
625
|
+
})[t.value] || "#c0c4cc");
|
|
626
|
+
const M = m(() => {
|
|
627
|
+
var i;
|
|
618
628
|
return [
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
629
|
+
e.b(),
|
|
630
|
+
e.is(t.value),
|
|
631
|
+
e.is("last", v.value),
|
|
632
|
+
e.m(((i = a == null ? void 0 : a.props) == null ? void 0 : i.direction) || "horizontal")
|
|
623
633
|
];
|
|
624
634
|
}), b = () => {
|
|
625
|
-
var
|
|
626
|
-
l.value > -1 && ((
|
|
635
|
+
var i;
|
|
636
|
+
l.value > -1 && ((i = a == null ? void 0 : a.setCurrentActive) == null || i.call(a, l.value));
|
|
627
637
|
};
|
|
628
|
-
return (
|
|
629
|
-
class:
|
|
638
|
+
return (i, p) => (u(), d("div", {
|
|
639
|
+
class: o(M.value),
|
|
630
640
|
onClick: b
|
|
631
641
|
}, [
|
|
632
642
|
h("div", {
|
|
633
|
-
class:
|
|
643
|
+
class: o(r(e).e("head"))
|
|
634
644
|
}, [
|
|
635
|
-
|
|
645
|
+
z.value ? C("", !0) : (u(), d("div", {
|
|
636
646
|
key: 0,
|
|
637
|
-
class:
|
|
647
|
+
class: o([r(e).e("line"), r(e).em("line", "prev")])
|
|
638
648
|
}, null, 2)),
|
|
639
649
|
h("div", {
|
|
640
|
-
class:
|
|
650
|
+
class: o(r(e).e("icon"))
|
|
641
651
|
}, [
|
|
642
|
-
|
|
652
|
+
s.icon ? (u(), d("span", {
|
|
643
653
|
key: 0,
|
|
644
|
-
class:
|
|
645
|
-
},
|
|
654
|
+
class: o(r(e).e("icon-inner"))
|
|
655
|
+
}, H(s.icon), 3)) : (u(), d("span", {
|
|
646
656
|
key: 1,
|
|
647
|
-
class:
|
|
657
|
+
class: o(r(e).e("icon-inner"))
|
|
648
658
|
}, [
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
], 64)) :
|
|
652
|
-
|
|
653
|
-
], 64)) : (u(),
|
|
654
|
-
|
|
659
|
+
t.value === "finish" || t.value === "success" ? (u(), d(S, { key: 0 }, [
|
|
660
|
+
$("✓")
|
|
661
|
+
], 64)) : t.value === "error" ? (u(), d(S, { key: 1 }, [
|
|
662
|
+
$("✕")
|
|
663
|
+
], 64)) : (u(), d(S, { key: 2 }, [
|
|
664
|
+
$(H(l.value + 1), 1)
|
|
655
665
|
], 64))
|
|
656
666
|
], 2))
|
|
657
667
|
], 2),
|
|
658
|
-
|
|
668
|
+
v.value ? C("", !0) : (u(), d("div", {
|
|
659
669
|
key: 1,
|
|
660
|
-
class:
|
|
670
|
+
class: o(r(e).e("line"))
|
|
661
671
|
}, null, 2))
|
|
662
672
|
], 2),
|
|
663
673
|
h("div", {
|
|
664
|
-
class:
|
|
674
|
+
class: o(r(e).e("content"))
|
|
665
675
|
}, [
|
|
666
676
|
h("div", {
|
|
667
|
-
class:
|
|
677
|
+
class: o(r(e).e("title"))
|
|
668
678
|
}, [
|
|
669
|
-
|
|
670
|
-
|
|
679
|
+
f(i.$slots, "title", {}, () => [
|
|
680
|
+
$(H(s.title), 1)
|
|
671
681
|
])
|
|
672
682
|
], 2),
|
|
673
|
-
|
|
683
|
+
s.description || i.$slots.description ? (u(), d("div", {
|
|
674
684
|
key: 0,
|
|
675
|
-
class:
|
|
685
|
+
class: o(r(e).e("description"))
|
|
676
686
|
}, [
|
|
677
|
-
|
|
678
|
-
|
|
687
|
+
f(i.$slots, "description", {}, () => [
|
|
688
|
+
$(H(s.description), 1)
|
|
679
689
|
])
|
|
680
|
-
], 2)) :
|
|
690
|
+
], 2)) : C("", !0)
|
|
681
691
|
], 2)
|
|
682
692
|
], 2));
|
|
683
693
|
}
|
|
684
|
-
}),
|
|
694
|
+
}), M0 = /* @__PURE__ */ V({
|
|
685
695
|
name: "XPageHeader",
|
|
686
696
|
__name: "index",
|
|
687
697
|
props: {
|
|
@@ -691,79 +701,186 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
|
|
|
691
701
|
showBack: { type: Boolean, default: !1 }
|
|
692
702
|
},
|
|
693
703
|
emits: ["back"],
|
|
694
|
-
setup(
|
|
695
|
-
const
|
|
696
|
-
|
|
704
|
+
setup(s, { emit: n }) {
|
|
705
|
+
const e = n, a = g("page-header"), l = () => {
|
|
706
|
+
e("back");
|
|
697
707
|
};
|
|
698
|
-
return (
|
|
699
|
-
class:
|
|
708
|
+
return (t, v) => (u(), d("div", {
|
|
709
|
+
class: o(r(a).b())
|
|
700
710
|
}, [
|
|
701
711
|
h("div", {
|
|
702
|
-
class:
|
|
712
|
+
class: o(r(a).e("main"))
|
|
703
713
|
}, [
|
|
704
714
|
h("div", {
|
|
705
|
-
class:
|
|
715
|
+
class: o(r(a).e("left"))
|
|
706
716
|
}, [
|
|
707
|
-
|
|
717
|
+
s.showBack ? (u(), d("span", {
|
|
708
718
|
key: 0,
|
|
709
|
-
class:
|
|
719
|
+
class: o(r(a).e("back")),
|
|
710
720
|
onClick: l
|
|
711
721
|
}, [
|
|
712
722
|
h("span", {
|
|
713
|
-
class:
|
|
723
|
+
class: o(r(a).e("back-icon"))
|
|
714
724
|
}, "←", 2),
|
|
715
|
-
|
|
725
|
+
s.backText ? (u(), d("span", {
|
|
716
726
|
key: 0,
|
|
717
|
-
class:
|
|
718
|
-
},
|
|
719
|
-
], 2)) :
|
|
727
|
+
class: o(r(a).e("back-text"))
|
|
728
|
+
}, H(s.backText), 3)) : C("", !0)
|
|
729
|
+
], 2)) : C("", !0),
|
|
720
730
|
h("span", {
|
|
721
|
-
class:
|
|
731
|
+
class: o(r(a).e("title"))
|
|
722
732
|
}, [
|
|
723
|
-
|
|
724
|
-
|
|
733
|
+
f(t.$slots, "title", {}, () => [
|
|
734
|
+
$(H(s.title), 1)
|
|
725
735
|
])
|
|
726
736
|
], 2),
|
|
727
|
-
|
|
737
|
+
s.subtitle || t.$slots.subtitle ? (u(), d("span", {
|
|
728
738
|
key: 1,
|
|
729
|
-
class:
|
|
739
|
+
class: o(r(a).e("subtitle"))
|
|
730
740
|
}, [
|
|
731
|
-
|
|
732
|
-
|
|
741
|
+
f(t.$slots, "subtitle", {}, () => [
|
|
742
|
+
$(H(s.subtitle), 1)
|
|
733
743
|
])
|
|
734
|
-
], 2)) :
|
|
744
|
+
], 2)) : C("", !0)
|
|
735
745
|
], 2),
|
|
736
746
|
h("div", {
|
|
737
|
-
class:
|
|
747
|
+
class: o(r(a).e("extra"))
|
|
738
748
|
}, [
|
|
739
|
-
|
|
749
|
+
f(t.$slots, "extra")
|
|
740
750
|
], 2)
|
|
741
751
|
], 2),
|
|
742
|
-
|
|
752
|
+
t.$slots.default ? (u(), d("div", {
|
|
743
753
|
key: 0,
|
|
744
|
-
class:
|
|
754
|
+
class: o(r(a).e("content"))
|
|
745
755
|
}, [
|
|
746
|
-
|
|
747
|
-
], 2)) :
|
|
748
|
-
|
|
756
|
+
f(t.$slots, "default")
|
|
757
|
+
], 2)) : C("", !0),
|
|
758
|
+
t.$slots.footer ? (u(), d("div", {
|
|
749
759
|
key: 1,
|
|
750
|
-
class:
|
|
760
|
+
class: o(r(a).e("footer"))
|
|
761
|
+
}, [
|
|
762
|
+
f(t.$slots, "footer")
|
|
763
|
+
], 2)) : C("", !0)
|
|
764
|
+
], 2));
|
|
765
|
+
}
|
|
766
|
+
}), f0 = /* @__PURE__ */ V({
|
|
767
|
+
name: "XDropdown",
|
|
768
|
+
__name: "index",
|
|
769
|
+
props: {
|
|
770
|
+
trigger: { default: "hover" },
|
|
771
|
+
placement: { default: "bottom" },
|
|
772
|
+
disabled: { type: Boolean, default: !1 },
|
|
773
|
+
visible: { type: Boolean },
|
|
774
|
+
hideOnClick: { type: Boolean, default: !0 }
|
|
775
|
+
},
|
|
776
|
+
emits: ["visible-change", "click", "command"],
|
|
777
|
+
setup(s, { emit: n }) {
|
|
778
|
+
const e = s, a = n, l = g("dropdown"), t = w(e.visible || !1), v = w(), z = () => {
|
|
779
|
+
e.disabled || (t.value = !0, a("visible-change", !0));
|
|
780
|
+
}, M = () => {
|
|
781
|
+
t.value = !1, a("visible-change", !1);
|
|
782
|
+
}, b = () => {
|
|
783
|
+
t.value ? M() : z();
|
|
784
|
+
};
|
|
785
|
+
A("x-dropdown", {
|
|
786
|
+
visible: t,
|
|
787
|
+
handleClick: (y) => {
|
|
788
|
+
a("click", y), a("command", y), e.hideOnClick && M();
|
|
789
|
+
},
|
|
790
|
+
hide: M
|
|
791
|
+
});
|
|
792
|
+
const p = () => {
|
|
793
|
+
e.trigger === "hover" && z();
|
|
794
|
+
}, c = () => {
|
|
795
|
+
e.trigger === "hover" && M();
|
|
796
|
+
}, k = (y) => {
|
|
797
|
+
v.value && !v.value.contains(y.target) && M();
|
|
798
|
+
};
|
|
799
|
+
return typeof window < "u" && document.addEventListener("click", k), (y, L) => (u(), d("div", {
|
|
800
|
+
ref_key: "dropdownRef",
|
|
801
|
+
ref: v,
|
|
802
|
+
class: o([r(l).b(), r(l).is("disabled", s.disabled)]),
|
|
803
|
+
onMouseenter: p,
|
|
804
|
+
onMouseleave: c
|
|
805
|
+
}, [
|
|
806
|
+
h("div", {
|
|
807
|
+
class: o(r(l).e("trigger")),
|
|
808
|
+
onClick: L[0] || (L[0] = (D) => s.trigger === "click" && b())
|
|
751
809
|
}, [
|
|
752
|
-
|
|
753
|
-
], 2)
|
|
810
|
+
f(y.$slots, "default")
|
|
811
|
+
], 2),
|
|
812
|
+
X(j, { name: "x-dropdown-zoom" }, {
|
|
813
|
+
default: G(() => [
|
|
814
|
+
N(h("div", {
|
|
815
|
+
class: o([r(l).e("menu"), r(l).m(s.placement)])
|
|
816
|
+
}, [
|
|
817
|
+
f(y.$slots, "dropdown")
|
|
818
|
+
], 2), [
|
|
819
|
+
[O, t.value]
|
|
820
|
+
])
|
|
821
|
+
]),
|
|
822
|
+
_: 3
|
|
823
|
+
})
|
|
824
|
+
], 34));
|
|
825
|
+
}
|
|
826
|
+
}), z0 = /* @__PURE__ */ V({
|
|
827
|
+
name: "XDropdownMenu",
|
|
828
|
+
__name: "DropdownMenu",
|
|
829
|
+
setup(s) {
|
|
830
|
+
const n = g("dropdown-menu");
|
|
831
|
+
return (e, a) => (u(), d("ul", {
|
|
832
|
+
class: o(r(n).b())
|
|
833
|
+
}, [
|
|
834
|
+
f(e.$slots, "default")
|
|
835
|
+
], 2));
|
|
836
|
+
}
|
|
837
|
+
}), b0 = /* @__PURE__ */ V({
|
|
838
|
+
name: "XDropdownItem",
|
|
839
|
+
__name: "DropdownItem",
|
|
840
|
+
props: {
|
|
841
|
+
command: {},
|
|
842
|
+
disabled: { type: Boolean },
|
|
843
|
+
divided: { type: Boolean },
|
|
844
|
+
icon: {}
|
|
845
|
+
},
|
|
846
|
+
emits: ["click"],
|
|
847
|
+
setup(s, { emit: n }) {
|
|
848
|
+
const e = s, a = n, l = g("dropdown-item"), t = B("x-dropdown"), v = (M) => {
|
|
849
|
+
e.disabled || (a("click", M), t != null && t.handleClick && t.handleClick(e.command ?? M));
|
|
850
|
+
}, z = m(() => [
|
|
851
|
+
l.b(),
|
|
852
|
+
l.is("disabled", e.disabled),
|
|
853
|
+
l.is("divided", e.divided)
|
|
854
|
+
]);
|
|
855
|
+
return (M, b) => (u(), d("li", {
|
|
856
|
+
class: o(z.value),
|
|
857
|
+
onClick: v
|
|
858
|
+
}, [
|
|
859
|
+
s.icon ? (u(), d("span", {
|
|
860
|
+
key: 0,
|
|
861
|
+
class: o(r(l).e("icon"))
|
|
862
|
+
}, H(s.icon), 3)) : C("", !0),
|
|
863
|
+
h("span", {
|
|
864
|
+
class: o(r(l).e("content"))
|
|
865
|
+
}, [
|
|
866
|
+
f(M.$slots, "default")
|
|
867
|
+
], 2)
|
|
754
868
|
], 2));
|
|
755
869
|
}
|
|
756
870
|
});
|
|
757
871
|
export {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
872
|
+
v0 as Breadcrumb,
|
|
873
|
+
m0 as BreadcrumbItem,
|
|
874
|
+
f0 as Dropdown,
|
|
875
|
+
b0 as DropdownItem,
|
|
876
|
+
z0 as DropdownMenu,
|
|
877
|
+
i0 as Menu,
|
|
878
|
+
r0 as MenuItem,
|
|
879
|
+
u0 as MenuItemGroup,
|
|
880
|
+
M0 as PageHeader,
|
|
881
|
+
p0 as Step,
|
|
882
|
+
h0 as Steps,
|
|
883
|
+
d0 as SubMenu,
|
|
884
|
+
c0 as TabPane,
|
|
885
|
+
n0 as Tabs
|
|
769
886
|
};
|