@xto/navigation 1.3.2 → 1.4.1
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 +806 -422
- package/es/style.css +1 -1
- package/lib/index.cjs +1 -1
- package/lib/style.css +1 -1
- package/package.json +47 -47
package/es/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as V, useSlots as
|
|
2
|
-
import { useNamespace as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as V, useSlots as j, ref as w, watch as S, provide as X, computed as b, openBlock as u, createElementBlock as m, normalizeClass as o, createElementVNode as z, unref as n, Fragment as O, renderList as K, toDisplayString as $, renderSlot as y, inject as T, withDirectives as N, createCommentVNode as C, vShow as q, normalizeStyle as I, createTextVNode as A, createVNode as R, Transition as Y, withCtx as U, onMounted as W, createBlock as D, nextTick as F, onBeforeUnmount as J, withModifiers as Z } from "vue";
|
|
2
|
+
import { useNamespace as x } from "@xto/core";
|
|
3
|
+
const ee = ["onClick"], pe = /* @__PURE__ */ V({
|
|
4
4
|
name: "XTabs",
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
@@ -12,66 +12,66 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
12
12
|
closable: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
15
|
+
setup(t, { emit: v }) {
|
|
16
|
+
const e = t, l = v, a = x("tabs"), s = j(), h = w(e.modelValue ?? e.activeKey ?? "");
|
|
17
|
+
S([() => e.modelValue, () => e.activeKey], ([r, c]) => {
|
|
18
|
+
const d = r ?? c;
|
|
19
|
+
d !== void 0 && (h.value = d);
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const p = (r, c) => {
|
|
22
|
+
h.value = r, e.modelValue !== void 0 && l("update:modelValue", r), e.activeKey !== void 0 && l("update:activeKey", r), e.modelValue === void 0 && e.activeKey === void 0 && l("update:modelValue", r), l("tabClick", r, c);
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
X("tabs", {
|
|
25
25
|
props: e,
|
|
26
|
-
activeName:
|
|
27
|
-
handleTabClick:
|
|
26
|
+
activeName: h,
|
|
27
|
+
handleTabClick: p
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
]),
|
|
34
|
-
var
|
|
35
|
-
return (((
|
|
36
|
-
var
|
|
29
|
+
const M = b(() => [
|
|
30
|
+
a.b(),
|
|
31
|
+
a.m(e.type),
|
|
32
|
+
a.is(`position-${e.tabPosition}`)
|
|
33
|
+
]), k = b(() => {
|
|
34
|
+
var c;
|
|
35
|
+
return (((c = s.default) == null ? void 0 : c.call(s)) || []).filter((d) => d.type && d.type.name === "XTabPane").map((d) => {
|
|
36
|
+
var i, f, g, H, B, P, G;
|
|
37
37
|
return {
|
|
38
|
-
name: ((
|
|
39
|
-
label: ((
|
|
40
|
-
disabled: ((
|
|
38
|
+
name: ((i = d.props) == null ? void 0 : i.name) || ((f = d.props) == null ? void 0 : f.paneKey) || ((g = d.props) == null ? void 0 : g.label) || ((H = d.props) == null ? void 0 : H.tab),
|
|
39
|
+
label: ((B = d.props) == null ? void 0 : B.label) || ((P = d.props) == null ? void 0 : P.tab),
|
|
40
|
+
disabled: ((G = d.props) == null ? void 0 : G.disabled) === !0
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
|
-
return (
|
|
45
|
-
class:
|
|
44
|
+
return (r, c) => (u(), m("div", {
|
|
45
|
+
class: o(M.value)
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
class: n(
|
|
47
|
+
z("div", {
|
|
48
|
+
class: o(n(a).e("header"))
|
|
49
49
|
}, [
|
|
50
|
-
|
|
51
|
-
class: n(
|
|
50
|
+
z("div", {
|
|
51
|
+
class: o(n(a).e("nav"))
|
|
52
52
|
}, [
|
|
53
|
-
(
|
|
54
|
-
key:
|
|
55
|
-
class:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
(u(!0), m(O, null, K(k.value, (d) => (u(), m("div", {
|
|
54
|
+
key: d.name,
|
|
55
|
+
class: o([
|
|
56
|
+
n(a).e("item"),
|
|
57
|
+
n(a).em("item", h.value === d.name ? "active" : ""),
|
|
58
|
+
n(a).is("disabled", d.disabled)
|
|
59
59
|
]),
|
|
60
|
-
onClick: (
|
|
61
|
-
},
|
|
60
|
+
onClick: (i) => d.disabled ? null : p(d.name, i)
|
|
61
|
+
}, $(d.label), 11, ee))), 128))
|
|
62
62
|
], 2)
|
|
63
63
|
], 2),
|
|
64
|
-
|
|
65
|
-
class: n(
|
|
64
|
+
z("div", {
|
|
65
|
+
class: o(n(a).e("content"))
|
|
66
66
|
}, [
|
|
67
|
-
|
|
67
|
+
y(r.$slots, "default")
|
|
68
68
|
], 2)
|
|
69
69
|
], 2));
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), ae = {
|
|
72
72
|
class: "x-tab-pane",
|
|
73
73
|
role: "tabpanel"
|
|
74
|
-
},
|
|
74
|
+
}, Me = /* @__PURE__ */ V({
|
|
75
75
|
name: "XTabPane",
|
|
76
76
|
__name: "TabPane",
|
|
77
77
|
props: {
|
|
@@ -83,17 +83,17 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
83
83
|
closable: { type: Boolean, default: !1 },
|
|
84
84
|
lazy: { type: Boolean, default: !1 }
|
|
85
85
|
},
|
|
86
|
-
setup(
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
}, { immediate: !0 }),
|
|
91
|
-
|
|
86
|
+
setup(t) {
|
|
87
|
+
const v = t, e = T("tabs"), l = w(!1), a = b(() => v.name || v.paneKey || v.label || v.tab), s = b(() => (e == null ? void 0 : e.activeName.value) === a.value);
|
|
88
|
+
return S(() => e == null ? void 0 : e.activeName.value, () => {
|
|
89
|
+
s.value && v.lazy && !l.value && (l.value = !0);
|
|
90
|
+
}, { immediate: !0 }), s.value && v.lazy && (l.value = !0), (h, p) => N((u(), m("div", ae, [
|
|
91
|
+
l.value || !t.lazy ? y(h.$slots, "default", { key: 0 }) : C("", !0)
|
|
92
92
|
], 512)), [
|
|
93
|
-
[
|
|
93
|
+
[q, s.value]
|
|
94
94
|
]);
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), be = /* @__PURE__ */ V({
|
|
97
97
|
name: "XMenu",
|
|
98
98
|
__name: "index",
|
|
99
99
|
props: {
|
|
@@ -108,50 +108,50 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
108
108
|
router: { type: Boolean }
|
|
109
109
|
},
|
|
110
110
|
emits: ["update:modelValue", "update:openeds", "select", "open", "close"],
|
|
111
|
-
setup(
|
|
112
|
-
const e =
|
|
113
|
-
get: () => e.openeds ??
|
|
114
|
-
set: (
|
|
115
|
-
|
|
111
|
+
setup(t, { emit: v }) {
|
|
112
|
+
const e = t, l = v, a = x("menu"), s = w(e.modelValue), h = w([...e.defaultOpeneds]), p = b({
|
|
113
|
+
get: () => e.openeds ?? h.value,
|
|
114
|
+
set: (i) => {
|
|
115
|
+
h.value = i, l("update:openeds", i);
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}),
|
|
118
|
+
S(() => e.modelValue, (i) => {
|
|
119
|
+
s.value = i;
|
|
120
|
+
}), X("menu", {
|
|
121
121
|
props: e,
|
|
122
|
-
activeIndex:
|
|
123
|
-
openedMenus:
|
|
124
|
-
handleSelect: (
|
|
125
|
-
|
|
122
|
+
activeIndex: s,
|
|
123
|
+
openedMenus: p,
|
|
124
|
+
handleSelect: (i, f = []) => {
|
|
125
|
+
s.value = i, l("update:modelValue", i), l("select", i, f);
|
|
126
126
|
},
|
|
127
|
-
handleOpen: (
|
|
128
|
-
|
|
127
|
+
handleOpen: (i, f = []) => {
|
|
128
|
+
p.value.includes(i) || (p.value = [...p.value, i]), l("open", i, f);
|
|
129
129
|
},
|
|
130
|
-
handleClose: (
|
|
131
|
-
const g =
|
|
130
|
+
handleClose: (i, f = []) => {
|
|
131
|
+
const g = p.value.indexOf(i);
|
|
132
132
|
if (g > -1) {
|
|
133
|
-
const
|
|
134
|
-
|
|
133
|
+
const H = [...p.value];
|
|
134
|
+
H.splice(g, 1), p.value = H;
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
l("close", i, f);
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
]),
|
|
139
|
+
const c = b(() => [
|
|
140
|
+
a.b(),
|
|
141
|
+
a.is("collapse", e.collapse),
|
|
142
|
+
a.is(`mode-${e.mode}`)
|
|
143
|
+
]), d = b(() => ({
|
|
144
144
|
backgroundColor: e.backgroundColor,
|
|
145
145
|
color: e.textColor
|
|
146
146
|
}));
|
|
147
|
-
return (
|
|
148
|
-
class:
|
|
149
|
-
style:
|
|
147
|
+
return (i, f) => (u(), m("ul", {
|
|
148
|
+
class: o(c.value),
|
|
149
|
+
style: I(d.value)
|
|
150
150
|
}, [
|
|
151
|
-
|
|
151
|
+
y(i.$slots, "default")
|
|
152
152
|
], 6));
|
|
153
153
|
}
|
|
154
|
-
}),
|
|
154
|
+
}), Q = {
|
|
155
155
|
// 箭头类
|
|
156
156
|
"arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
|
|
157
157
|
"arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
|
|
@@ -274,12 +274,88 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
274
274
|
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",
|
|
275
275
|
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",
|
|
276
276
|
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",
|
|
277
|
-
skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"
|
|
277
|
+
skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",
|
|
278
|
+
// Markdown 编辑器类
|
|
279
|
+
heading: "M4 6h16M4 12h8m-8 6h16",
|
|
280
|
+
// 标题
|
|
281
|
+
bold: "M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",
|
|
282
|
+
// 粗体
|
|
283
|
+
italic: "M10 4h4m-2 0v16m-4 0h8",
|
|
284
|
+
// 斜体
|
|
285
|
+
strikethrough: "M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z",
|
|
286
|
+
// 删除线
|
|
287
|
+
"list-bullet": "M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12",
|
|
288
|
+
// 无序列表
|
|
289
|
+
"list-number": "M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12",
|
|
290
|
+
// 有序列表
|
|
291
|
+
"link-text": "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
|
|
292
|
+
// 链接
|
|
293
|
+
"image-insert": "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
|
|
294
|
+
// 图片
|
|
295
|
+
"code-inline": "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",
|
|
296
|
+
// 代码
|
|
297
|
+
"divider-h": "M4 12h16",
|
|
298
|
+
// 分割线
|
|
299
|
+
quote: "M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",
|
|
300
|
+
// 引用
|
|
301
|
+
"code-block": "M4 4h16v16H4z M8 8h8M8 12h8M8 16h4",
|
|
302
|
+
// 代码块
|
|
303
|
+
// 排序和展开类
|
|
304
|
+
"sort-up": "M12 5v14m-7-7l7-7 7 7",
|
|
305
|
+
// 向上排序
|
|
306
|
+
"sort-down": "M12 19V5m7 7l-7 7-7-7",
|
|
307
|
+
// 向下排序
|
|
308
|
+
"chevron-down": "M6 9l6 6 6-6",
|
|
309
|
+
// 向下展开
|
|
310
|
+
"chevron-right": "M9 18l6-6-6-6",
|
|
311
|
+
// 向右展开
|
|
312
|
+
"chevron-up": "M18 15l-6-6-6 6",
|
|
313
|
+
// 向上收起
|
|
314
|
+
"chevron-left": "M15 18l-6-6 6-6",
|
|
315
|
+
// 向左收起
|
|
316
|
+
// 移动类
|
|
317
|
+
"move-up": "M5 15l7-7 7 7",
|
|
318
|
+
// 上移
|
|
319
|
+
"move-down": "M19 9l-7 7-7-7",
|
|
320
|
+
// 下移
|
|
321
|
+
"back-top": "M12 19V5m-7 7l7-7 7 7",
|
|
322
|
+
// 回到顶部
|
|
323
|
+
// 下拉箭头
|
|
324
|
+
"dropdown-arrow": "M6 9l6 6 6-6",
|
|
325
|
+
// 关闭/错误类
|
|
326
|
+
"close-circle": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
327
|
+
// 圆形关闭
|
|
328
|
+
"close-bold": "M6 18L18 6M6 6l12 12",
|
|
329
|
+
// 加粗关闭
|
|
330
|
+
// 圆形状态类
|
|
331
|
+
"check-circle": "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
332
|
+
// 圆形勾选
|
|
333
|
+
"info-circle": "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
334
|
+
// 圆形信息
|
|
335
|
+
"warning-circle": "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
|
|
336
|
+
// 圆形警告
|
|
337
|
+
// 返回类
|
|
338
|
+
"back-arrow": "M19 12H5m0 0l7 7m-7-7l7-7",
|
|
339
|
+
// 返回箭头
|
|
340
|
+
// 日历导航类
|
|
341
|
+
"d-arrow-left": "M11 17l-5-5 5-5M18 17l-5-5 5-5",
|
|
342
|
+
// 双左箭头
|
|
343
|
+
"d-arrow-right": "M6 7l5 5-5 5M13 7l5 5-5 5",
|
|
344
|
+
// 双右箭头
|
|
345
|
+
// 方向箭头类
|
|
346
|
+
left: "M15 19l-7-7 7-7",
|
|
347
|
+
// 左箭头
|
|
348
|
+
right: "M9 5l7 7-7 7",
|
|
349
|
+
// 右箭头
|
|
350
|
+
down: "M19 9l-7 7-7-7",
|
|
351
|
+
// 下箭头
|
|
352
|
+
up: "M5 15l7-7 7 7"
|
|
353
|
+
// 上箭头
|
|
278
354
|
};
|
|
279
|
-
function
|
|
280
|
-
return
|
|
355
|
+
function le(t) {
|
|
356
|
+
return t in Q;
|
|
281
357
|
}
|
|
282
|
-
const
|
|
358
|
+
const te = ["aria-hidden", "aria-label"], se = ["stroke-width"], ne = ["d"], _ = /* @__PURE__ */ V({
|
|
283
359
|
name: "XIcon",
|
|
284
360
|
__name: "index",
|
|
285
361
|
props: {
|
|
@@ -289,38 +365,46 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
289
365
|
spin: { type: Boolean, default: !1 },
|
|
290
366
|
strokeWidth: { default: 2 }
|
|
291
367
|
},
|
|
292
|
-
setup(
|
|
293
|
-
const
|
|
368
|
+
setup(t, { expose: v }) {
|
|
369
|
+
const e = t, l = x("icon"), a = b(() => typeof e.size == "number" ? `${e.size}px` : e.size), s = b(() => ({
|
|
294
370
|
width: a.value,
|
|
295
371
|
height: a.value,
|
|
296
|
-
color:
|
|
297
|
-
})),
|
|
298
|
-
strokeWidth:
|
|
299
|
-
})),
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
]),
|
|
303
|
-
return (
|
|
304
|
-
|
|
305
|
-
|
|
372
|
+
color: e.color
|
|
373
|
+
})), h = b(() => ({
|
|
374
|
+
strokeWidth: e.strokeWidth
|
|
375
|
+
})), p = b(() => [
|
|
376
|
+
l.b(),
|
|
377
|
+
l.is("spin", e.spin)
|
|
378
|
+
]), M = b(() => e.name && le(e.name) ? Q[e.name] : "");
|
|
379
|
+
return v({
|
|
380
|
+
iconSize: a,
|
|
381
|
+
iconStyle: s,
|
|
382
|
+
iconPath: M
|
|
383
|
+
}), (k, r) => (u(), m("span", {
|
|
384
|
+
class: o(p.value),
|
|
385
|
+
style: I(s.value),
|
|
386
|
+
"aria-hidden": !t.name,
|
|
387
|
+
"aria-label": t.name,
|
|
388
|
+
role: "img"
|
|
306
389
|
}, [
|
|
307
|
-
|
|
390
|
+
M.value ? (u(), m("svg", {
|
|
308
391
|
key: 0,
|
|
309
392
|
viewBox: "0 0 24 24",
|
|
310
393
|
fill: "none",
|
|
311
394
|
stroke: "currentColor",
|
|
312
|
-
"stroke-width":
|
|
395
|
+
"stroke-width": t.strokeWidth,
|
|
313
396
|
"stroke-linecap": "round",
|
|
314
397
|
"stroke-linejoin": "round",
|
|
315
|
-
style:
|
|
398
|
+
style: I(h.value),
|
|
399
|
+
"aria-hidden": "true"
|
|
316
400
|
}, [
|
|
317
|
-
|
|
318
|
-
], 12,
|
|
319
|
-
|
|
401
|
+
z("path", { d: M.value }, null, 8, ne)
|
|
402
|
+
], 12, se)) : y(k.$slots, "default", { key: 1 }, () => [
|
|
403
|
+
A($(t.name), 1)
|
|
320
404
|
])
|
|
321
|
-
],
|
|
405
|
+
], 14, te));
|
|
322
406
|
}
|
|
323
|
-
}),
|
|
407
|
+
}), E = "x-menu-item", ze = /* @__PURE__ */ V({
|
|
324
408
|
name: "XMenuItem",
|
|
325
409
|
__name: "MenuItem",
|
|
326
410
|
props: {
|
|
@@ -328,65 +412,65 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
328
412
|
disabled: { type: Boolean, default: !1 },
|
|
329
413
|
icon: {}
|
|
330
414
|
},
|
|
331
|
-
setup(
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
|
|
415
|
+
setup(t) {
|
|
416
|
+
const v = t, e = T("menu");
|
|
417
|
+
j();
|
|
418
|
+
const l = b(() => (e == null ? void 0 : e.activeIndex.value) === v.index), a = b(() => e == null ? void 0 : e.props.collapse), s = b(() => (e == null ? void 0 : e.props.mode) === "horizontal"), h = b(() => [
|
|
419
|
+
E,
|
|
336
420
|
{
|
|
337
|
-
"is-active":
|
|
338
|
-
"is-disabled":
|
|
339
|
-
"is-horizontal":
|
|
340
|
-
"is-collapse":
|
|
421
|
+
"is-active": l.value,
|
|
422
|
+
"is-disabled": v.disabled,
|
|
423
|
+
"is-horizontal": s.value,
|
|
424
|
+
"is-collapse": a.value
|
|
341
425
|
}
|
|
342
|
-
]),
|
|
343
|
-
|
|
426
|
+
]), p = b(() => l.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), M = () => {
|
|
427
|
+
v.disabled || v.index && (e == null || e.handleSelect(v.index, [v.index]));
|
|
344
428
|
};
|
|
345
|
-
return (
|
|
346
|
-
class:
|
|
347
|
-
style:
|
|
348
|
-
onClick:
|
|
429
|
+
return (k, r) => (u(), m("li", {
|
|
430
|
+
class: o(h.value),
|
|
431
|
+
style: I(p.value),
|
|
432
|
+
onClick: M
|
|
349
433
|
}, [
|
|
350
|
-
|
|
351
|
-
class:
|
|
434
|
+
z("div", {
|
|
435
|
+
class: o(E + "__content")
|
|
352
436
|
}, [
|
|
353
|
-
|
|
437
|
+
t.icon ? (u(), m("span", {
|
|
354
438
|
key: 0,
|
|
355
|
-
class:
|
|
439
|
+
class: o(E + "__icon")
|
|
356
440
|
}, [
|
|
357
|
-
|
|
358
|
-
name:
|
|
441
|
+
R(n(_), {
|
|
442
|
+
name: t.icon,
|
|
359
443
|
size: 18
|
|
360
444
|
}, null, 8, ["name"])
|
|
361
|
-
], 2)) :
|
|
445
|
+
], 2)) : k.$slots.icon ? (u(), m("span", {
|
|
362
446
|
key: 1,
|
|
363
|
-
class:
|
|
447
|
+
class: o(E + "__icon")
|
|
364
448
|
}, [
|
|
365
|
-
k
|
|
449
|
+
y(k.$slots, "icon")
|
|
366
450
|
], 2)) : C("", !0),
|
|
367
|
-
|
|
368
|
-
class:
|
|
451
|
+
z("span", {
|
|
452
|
+
class: o(E + "__text")
|
|
369
453
|
}, [
|
|
370
|
-
k
|
|
454
|
+
y(k.$slots, "default")
|
|
371
455
|
], 2)
|
|
372
456
|
], 2)
|
|
373
457
|
], 6));
|
|
374
458
|
}
|
|
375
|
-
}),
|
|
459
|
+
}), oe = { class: "x-menu-item-group" }, ie = { class: "x-menu-item-group__title" }, ke = /* @__PURE__ */ V({
|
|
376
460
|
name: "XMenuItemGroup",
|
|
377
461
|
__name: "MenuItemGroup",
|
|
378
462
|
props: {
|
|
379
463
|
title: {}
|
|
380
464
|
},
|
|
381
|
-
setup(
|
|
382
|
-
return (
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
465
|
+
setup(t) {
|
|
466
|
+
return (v, e) => (u(), m("li", oe, [
|
|
467
|
+
z("div", ie, $(t.title), 1),
|
|
468
|
+
z("ul", null, [
|
|
469
|
+
y(v.$slots, "default")
|
|
386
470
|
])
|
|
387
471
|
]));
|
|
388
472
|
}
|
|
389
|
-
}), L = "x-sub-menu",
|
|
473
|
+
}), L = "x-sub-menu", ye = /* @__PURE__ */ V({
|
|
390
474
|
name: "XSubMenu",
|
|
391
475
|
__name: "SubMenu",
|
|
392
476
|
props: {
|
|
@@ -395,83 +479,83 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
395
479
|
disabled: { type: Boolean, default: !1 },
|
|
396
480
|
icon: {}
|
|
397
481
|
},
|
|
398
|
-
setup(
|
|
399
|
-
const
|
|
400
|
-
|
|
482
|
+
setup(t) {
|
|
483
|
+
const v = t, e = T("menu"), l = T("subMenu", null), a = w(!1), s = b(() => !!l), h = b(() => e == null ? void 0 : e.props.collapse);
|
|
484
|
+
S(
|
|
401
485
|
() => e == null ? void 0 : e.activeIndex.value,
|
|
402
486
|
() => {
|
|
403
|
-
(e == null ? void 0 : e.props.mode) === "horizontal" && (
|
|
487
|
+
(e == null ? void 0 : e.props.mode) === "horizontal" && (a.value = !1);
|
|
404
488
|
}
|
|
405
489
|
);
|
|
406
|
-
const
|
|
407
|
-
var
|
|
408
|
-
return
|
|
409
|
-
}),
|
|
490
|
+
const p = b(() => {
|
|
491
|
+
var i, f;
|
|
492
|
+
return h.value ? a.value : ((f = (i = e == null ? void 0 : e.openedMenus) == null ? void 0 : i.value) == null ? void 0 : f.includes(v.index)) ?? !1;
|
|
493
|
+
}), M = b(() => (e == null ? void 0 : e.activeIndex.value) === v.index), k = b(() => [
|
|
410
494
|
L,
|
|
411
495
|
L + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
|
|
412
496
|
{
|
|
413
|
-
"is-active":
|
|
414
|
-
"is-opened":
|
|
415
|
-
"is-disabled":
|
|
416
|
-
"is-nested":
|
|
417
|
-
"is-collapse":
|
|
497
|
+
"is-active": M.value,
|
|
498
|
+
"is-opened": p.value,
|
|
499
|
+
"is-disabled": v.disabled,
|
|
500
|
+
"is-nested": s.value,
|
|
501
|
+
"is-collapse": h.value
|
|
418
502
|
}
|
|
419
|
-
]),
|
|
420
|
-
var
|
|
421
|
-
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
((e == null ? void 0 : e.props.mode) === "horizontal" ||
|
|
503
|
+
]), r = () => {
|
|
504
|
+
var i, f;
|
|
505
|
+
v.disabled || h.value || (p.value ? (i = e == null ? void 0 : e.handleClose) == null || i.call(e, v.index) : (f = e == null ? void 0 : e.handleOpen) == null || f.call(e, v.index));
|
|
506
|
+
}, c = () => {
|
|
507
|
+
v.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || h.value) && (a.value = !0);
|
|
508
|
+
}, d = () => {
|
|
509
|
+
((e == null ? void 0 : e.props.mode) === "horizontal" || h.value) && (a.value = !1);
|
|
426
510
|
};
|
|
427
|
-
return
|
|
428
|
-
isOpen:
|
|
429
|
-
isNested:
|
|
430
|
-
index:
|
|
431
|
-
}), (
|
|
511
|
+
return X("subMenu", {
|
|
512
|
+
isOpen: p,
|
|
513
|
+
isNested: s,
|
|
514
|
+
index: v.index
|
|
515
|
+
}), (i, f) => {
|
|
432
516
|
var g;
|
|
433
|
-
return
|
|
434
|
-
class:
|
|
435
|
-
onMouseenter:
|
|
436
|
-
onMouseleave:
|
|
517
|
+
return u(), m("li", {
|
|
518
|
+
class: o(k.value),
|
|
519
|
+
onMouseenter: c,
|
|
520
|
+
onMouseleave: d
|
|
437
521
|
}, [
|
|
438
|
-
|
|
439
|
-
class:
|
|
440
|
-
onClick:
|
|
522
|
+
z("div", {
|
|
523
|
+
class: o(L + "__title"),
|
|
524
|
+
onClick: r
|
|
441
525
|
}, [
|
|
442
|
-
|
|
443
|
-
class:
|
|
526
|
+
z("div", {
|
|
527
|
+
class: o(L + "__content")
|
|
444
528
|
}, [
|
|
445
|
-
|
|
529
|
+
t.icon ? (u(), m("span", {
|
|
446
530
|
key: 0,
|
|
447
|
-
class:
|
|
531
|
+
class: o(L + "__icon")
|
|
448
532
|
}, [
|
|
449
|
-
|
|
450
|
-
name:
|
|
533
|
+
R(n(_), {
|
|
534
|
+
name: t.icon,
|
|
451
535
|
size: 18
|
|
452
536
|
}, null, 8, ["name"])
|
|
453
|
-
], 2)) :
|
|
537
|
+
], 2)) : i.$slots.icon ? (u(), m("span", {
|
|
454
538
|
key: 1,
|
|
455
|
-
class:
|
|
539
|
+
class: o(L + "__icon")
|
|
456
540
|
}, [
|
|
457
|
-
|
|
541
|
+
y(i.$slots, "icon")
|
|
458
542
|
], 2)) : C("", !0),
|
|
459
|
-
|
|
460
|
-
class:
|
|
543
|
+
z("span", {
|
|
544
|
+
class: o(L + "__text")
|
|
461
545
|
}, [
|
|
462
|
-
|
|
463
|
-
|
|
546
|
+
y(i.$slots, "title", {}, () => [
|
|
547
|
+
A($(t.title), 1)
|
|
464
548
|
])
|
|
465
549
|
], 2),
|
|
466
|
-
|
|
467
|
-
class:
|
|
468
|
-
}, [...
|
|
469
|
-
|
|
550
|
+
z("span", {
|
|
551
|
+
class: o([L + "__arrow", { "is-open": p.value }])
|
|
552
|
+
}, [...f[0] || (f[0] = [
|
|
553
|
+
z("svg", {
|
|
470
554
|
viewBox: "0 0 1024 1024",
|
|
471
555
|
width: "12",
|
|
472
556
|
height: "12"
|
|
473
557
|
}, [
|
|
474
|
-
|
|
558
|
+
z("path", {
|
|
475
559
|
fill: "currentColor",
|
|
476
560
|
d: "M512 714.667c-17.067 0-32-6.4-44.8-19.2L147.2 375.467c-25.6-25.6-25.6-64 0-89.6s64-25.6 89.6 0L512 561.067l275.2-275.2c25.6-25.6 64-25.6 89.6 0s25.6 64 0 89.6L556.8 695.467c-12.8 12.8-27.733 19.2-44.8 19.2z"
|
|
477
561
|
})
|
|
@@ -479,18 +563,18 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
479
563
|
])], 2)
|
|
480
564
|
], 2)
|
|
481
565
|
], 2),
|
|
482
|
-
|
|
483
|
-
name: ((g =
|
|
566
|
+
R(Y, {
|
|
567
|
+
name: ((g = n(e)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
|
|
484
568
|
}, {
|
|
485
|
-
default:
|
|
486
|
-
var
|
|
569
|
+
default: U(() => {
|
|
570
|
+
var H;
|
|
487
571
|
return [
|
|
488
|
-
|
|
489
|
-
class:
|
|
572
|
+
N(z("ul", {
|
|
573
|
+
class: o([L + "__menu", { "is-horizontal": ((H = n(e)) == null ? void 0 : H.props.mode) === "horizontal", "is-collapse": h.value }])
|
|
490
574
|
}, [
|
|
491
|
-
|
|
575
|
+
y(i.$slots, "default")
|
|
492
576
|
], 2), [
|
|
493
|
-
[
|
|
577
|
+
[q, p.value]
|
|
494
578
|
])
|
|
495
579
|
];
|
|
496
580
|
}),
|
|
@@ -499,32 +583,32 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
499
583
|
], 34);
|
|
500
584
|
};
|
|
501
585
|
}
|
|
502
|
-
}),
|
|
586
|
+
}), ge = /* @__PURE__ */ V({
|
|
503
587
|
name: "XBreadcrumb",
|
|
504
588
|
__name: "index",
|
|
505
589
|
props: {
|
|
506
590
|
separator: { default: "/" },
|
|
507
591
|
separatorIcon: {}
|
|
508
592
|
},
|
|
509
|
-
setup(
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
separator:
|
|
513
|
-
separatorIcon:
|
|
593
|
+
setup(t) {
|
|
594
|
+
const v = t, e = x("breadcrumb");
|
|
595
|
+
X("breadcrumb", {
|
|
596
|
+
separator: b(() => v.separator),
|
|
597
|
+
separatorIcon: b(() => v.separatorIcon)
|
|
514
598
|
});
|
|
515
|
-
const
|
|
516
|
-
return (
|
|
517
|
-
class:
|
|
599
|
+
const l = b(() => [e.b()]);
|
|
600
|
+
return (a, s) => (u(), m("nav", {
|
|
601
|
+
class: o(l.value),
|
|
518
602
|
"aria-label": "Breadcrumb"
|
|
519
603
|
}, [
|
|
520
|
-
|
|
521
|
-
class: n(
|
|
604
|
+
z("ol", {
|
|
605
|
+
class: o(n(e).e("list"))
|
|
522
606
|
}, [
|
|
523
|
-
|
|
607
|
+
y(a.$slots, "default")
|
|
524
608
|
], 2)
|
|
525
609
|
], 2));
|
|
526
610
|
}
|
|
527
|
-
}),
|
|
611
|
+
}), ce = ["aria-current"], we = /* @__PURE__ */ V({
|
|
528
612
|
name: "XBreadcrumbItem",
|
|
529
613
|
__name: "BreadcrumbItem",
|
|
530
614
|
props: {
|
|
@@ -533,50 +617,50 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
533
617
|
disabled: { type: Boolean }
|
|
534
618
|
},
|
|
535
619
|
emits: ["click"],
|
|
536
|
-
setup(
|
|
537
|
-
const e =
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
]),
|
|
542
|
-
var
|
|
543
|
-
return ((
|
|
544
|
-
}),
|
|
545
|
-
var
|
|
546
|
-
return (
|
|
547
|
-
}),
|
|
548
|
-
e.disabled || (
|
|
620
|
+
setup(t, { emit: v }) {
|
|
621
|
+
const e = t, l = v, a = x("breadcrumb"), s = T("breadcrumb"), h = b(() => [
|
|
622
|
+
a.e("item"),
|
|
623
|
+
a.is("link", !!e.to && !e.disabled),
|
|
624
|
+
a.is("disabled", e.disabled)
|
|
625
|
+
]), p = b(() => {
|
|
626
|
+
var r;
|
|
627
|
+
return ((r = s == null ? void 0 : s.separator) == null ? void 0 : r.value) || "/";
|
|
628
|
+
}), M = b(() => {
|
|
629
|
+
var r;
|
|
630
|
+
return (r = s == null ? void 0 : s.separatorIcon) == null ? void 0 : r.value;
|
|
631
|
+
}), k = (r) => {
|
|
632
|
+
e.disabled || (l("click", r), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
|
|
549
633
|
};
|
|
550
|
-
return (
|
|
551
|
-
class:
|
|
634
|
+
return (r, c) => (u(), m("li", {
|
|
635
|
+
class: o(h.value)
|
|
552
636
|
}, [
|
|
553
|
-
|
|
637
|
+
t.to && !t.disabled ? (u(), m("span", {
|
|
554
638
|
key: 0,
|
|
555
|
-
class: n(
|
|
556
|
-
onClick:
|
|
639
|
+
class: o(n(a).e("link")),
|
|
640
|
+
onClick: k
|
|
557
641
|
}, [
|
|
558
|
-
|
|
559
|
-
], 2)) : (
|
|
642
|
+
y(r.$slots, "default")
|
|
643
|
+
], 2)) : (u(), m("span", {
|
|
560
644
|
key: 1,
|
|
561
|
-
class: n(
|
|
562
|
-
"aria-current":
|
|
645
|
+
class: o(n(a).e("text")),
|
|
646
|
+
"aria-current": t.disabled ? "page" : void 0
|
|
563
647
|
}, [
|
|
564
|
-
|
|
565
|
-
], 10,
|
|
566
|
-
|
|
567
|
-
class: n(
|
|
648
|
+
y(r.$slots, "default")
|
|
649
|
+
], 10, ce)),
|
|
650
|
+
z("span", {
|
|
651
|
+
class: o(n(a).e("separator")),
|
|
568
652
|
"aria-hidden": "true"
|
|
569
653
|
}, [
|
|
570
|
-
|
|
654
|
+
M.value ? (u(), m("span", {
|
|
571
655
|
key: 0,
|
|
572
|
-
class: n(
|
|
573
|
-
},
|
|
574
|
-
|
|
656
|
+
class: o(n(a).e("separator-icon"))
|
|
657
|
+
}, $(M.value), 3)) : (u(), m(O, { key: 1 }, [
|
|
658
|
+
A($(p.value), 1)
|
|
575
659
|
], 64))
|
|
576
660
|
], 2)
|
|
577
661
|
], 2));
|
|
578
662
|
}
|
|
579
|
-
}),
|
|
663
|
+
}), Ve = /* @__PURE__ */ V({
|
|
580
664
|
name: "XSteps",
|
|
581
665
|
__name: "index",
|
|
582
666
|
props: {
|
|
@@ -589,37 +673,37 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
589
673
|
space: {}
|
|
590
674
|
},
|
|
591
675
|
emits: ["change", "update:active"],
|
|
592
|
-
setup(
|
|
593
|
-
const e =
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}),
|
|
676
|
+
setup(t, { emit: v }) {
|
|
677
|
+
const e = t, l = v, a = x("steps"), s = w(e.active), h = w(0);
|
|
678
|
+
S(() => e.active, (c) => {
|
|
679
|
+
s.value = c;
|
|
680
|
+
}), X("steps", {
|
|
597
681
|
props: e,
|
|
598
|
-
currentActive:
|
|
599
|
-
stepCount:
|
|
600
|
-
setCurrentActive: (
|
|
601
|
-
|
|
682
|
+
currentActive: s,
|
|
683
|
+
stepCount: h,
|
|
684
|
+
setCurrentActive: (c) => {
|
|
685
|
+
s.value = c, l("change", c), l("update:active", c);
|
|
602
686
|
},
|
|
603
|
-
setStepCount: (
|
|
604
|
-
|
|
687
|
+
setStepCount: (c) => {
|
|
688
|
+
h.value = c;
|
|
605
689
|
}
|
|
606
690
|
});
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
]),
|
|
691
|
+
const k = b(() => [
|
|
692
|
+
a.b(),
|
|
693
|
+
a.m(e.direction),
|
|
694
|
+
a.is("simple", e.simple),
|
|
695
|
+
a.is("center", e.alignCenter)
|
|
696
|
+
]), r = b(() => e.space ? {
|
|
613
697
|
"--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
|
|
614
698
|
} : {});
|
|
615
|
-
return (
|
|
616
|
-
class:
|
|
617
|
-
style:
|
|
699
|
+
return (c, d) => (u(), m("div", {
|
|
700
|
+
class: o(k.value),
|
|
701
|
+
style: I(r.value)
|
|
618
702
|
}, [
|
|
619
|
-
|
|
703
|
+
y(c.$slots, "default")
|
|
620
704
|
], 6));
|
|
621
705
|
}
|
|
622
|
-
}),
|
|
706
|
+
}), Ce = /* @__PURE__ */ V({
|
|
623
707
|
name: "XStep",
|
|
624
708
|
__name: "Step",
|
|
625
709
|
props: {
|
|
@@ -628,96 +712,100 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
628
712
|
icon: {},
|
|
629
713
|
status: {}
|
|
630
714
|
},
|
|
631
|
-
setup(
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
|
|
715
|
+
setup(t) {
|
|
716
|
+
const v = t, e = x("step"), l = T("steps"), a = w(-1);
|
|
717
|
+
W(() => {
|
|
718
|
+
l && (a.value = l.stepCount.value, l.setStepCount(l.stepCount.value + 1));
|
|
635
719
|
});
|
|
636
|
-
const
|
|
637
|
-
var
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
return
|
|
641
|
-
}),
|
|
642
|
-
var
|
|
643
|
-
return
|
|
644
|
-
}),
|
|
645
|
-
|
|
720
|
+
const s = b(() => {
|
|
721
|
+
var c, d, i;
|
|
722
|
+
if (v.status) return v.status;
|
|
723
|
+
const r = ((c = l == null ? void 0 : l.currentActive) == null ? void 0 : c.value) ?? 0;
|
|
724
|
+
return a.value < r ? ((d = l == null ? void 0 : l.props) == null ? void 0 : d.finishStatus) || "finish" : a.value === r ? ((i = l == null ? void 0 : l.props) == null ? void 0 : i.processStatus) || "process" : "wait";
|
|
725
|
+
}), h = b(() => {
|
|
726
|
+
var r;
|
|
727
|
+
return a.value === (((r = l == null ? void 0 : l.stepCount) == null ? void 0 : r.value) || 0) - 1;
|
|
728
|
+
}), p = b(() => a.value === 0);
|
|
729
|
+
b(() => ({
|
|
646
730
|
wait: "#c0c4cc",
|
|
647
731
|
process: "#409eff",
|
|
648
732
|
finish: "#67c23a",
|
|
649
733
|
error: "#f56c6c",
|
|
650
734
|
success: "#67c23a"
|
|
651
|
-
})[
|
|
652
|
-
const
|
|
653
|
-
var
|
|
735
|
+
})[s.value] || "#c0c4cc");
|
|
736
|
+
const M = b(() => {
|
|
737
|
+
var r;
|
|
654
738
|
return [
|
|
655
739
|
e.b(),
|
|
656
|
-
e.is(
|
|
657
|
-
e.is("last",
|
|
658
|
-
e.m(((
|
|
740
|
+
e.is(s.value),
|
|
741
|
+
e.is("last", h.value),
|
|
742
|
+
e.m(((r = l == null ? void 0 : l.props) == null ? void 0 : r.direction) || "horizontal")
|
|
659
743
|
];
|
|
660
|
-
}),
|
|
661
|
-
var
|
|
662
|
-
|
|
744
|
+
}), k = () => {
|
|
745
|
+
var r;
|
|
746
|
+
a.value > -1 && ((r = l == null ? void 0 : l.setCurrentActive) == null || r.call(l, a.value));
|
|
663
747
|
};
|
|
664
|
-
return (
|
|
665
|
-
class:
|
|
666
|
-
onClick:
|
|
748
|
+
return (r, c) => (u(), m("div", {
|
|
749
|
+
class: o(M.value),
|
|
750
|
+
onClick: k
|
|
667
751
|
}, [
|
|
668
|
-
|
|
669
|
-
class: n(
|
|
752
|
+
z("div", {
|
|
753
|
+
class: o(n(e).e("head"))
|
|
670
754
|
}, [
|
|
671
|
-
|
|
755
|
+
p.value ? C("", !0) : (u(), m("div", {
|
|
672
756
|
key: 0,
|
|
673
|
-
class:
|
|
757
|
+
class: o([n(e).e("line"), n(e).em("line", "prev")])
|
|
674
758
|
}, null, 2)),
|
|
675
|
-
|
|
676
|
-
class: n(
|
|
759
|
+
z("div", {
|
|
760
|
+
class: o(n(e).e("icon"))
|
|
677
761
|
}, [
|
|
678
|
-
|
|
762
|
+
t.icon ? (u(), m("span", {
|
|
679
763
|
key: 0,
|
|
680
|
-
class: n(
|
|
681
|
-
},
|
|
764
|
+
class: o(n(e).e("icon-inner"))
|
|
765
|
+
}, $(t.icon), 3)) : (u(), m("span", {
|
|
682
766
|
key: 1,
|
|
683
|
-
class: n(
|
|
767
|
+
class: o(n(e).e("icon-inner"))
|
|
684
768
|
}, [
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
769
|
+
s.value === "finish" || s.value === "success" ? (u(), D(n(_), {
|
|
770
|
+
key: 0,
|
|
771
|
+
name: "check",
|
|
772
|
+
size: 14
|
|
773
|
+
})) : s.value === "error" ? (u(), D(n(_), {
|
|
774
|
+
key: 1,
|
|
775
|
+
name: "close",
|
|
776
|
+
size: 14
|
|
777
|
+
})) : (u(), m(O, { key: 2 }, [
|
|
778
|
+
A($(a.value + 1), 1)
|
|
691
779
|
], 64))
|
|
692
780
|
], 2))
|
|
693
781
|
], 2),
|
|
694
|
-
|
|
782
|
+
h.value ? C("", !0) : (u(), m("div", {
|
|
695
783
|
key: 1,
|
|
696
|
-
class: n(
|
|
784
|
+
class: o(n(e).e("line"))
|
|
697
785
|
}, null, 2))
|
|
698
786
|
], 2),
|
|
699
|
-
|
|
700
|
-
class: n(
|
|
787
|
+
z("div", {
|
|
788
|
+
class: o(n(e).e("content"))
|
|
701
789
|
}, [
|
|
702
|
-
|
|
703
|
-
class: n(
|
|
790
|
+
z("div", {
|
|
791
|
+
class: o(n(e).e("title"))
|
|
704
792
|
}, [
|
|
705
|
-
|
|
706
|
-
|
|
793
|
+
y(r.$slots, "title", {}, () => [
|
|
794
|
+
A($(t.title), 1)
|
|
707
795
|
])
|
|
708
796
|
], 2),
|
|
709
|
-
|
|
797
|
+
t.description || r.$slots.description ? (u(), m("div", {
|
|
710
798
|
key: 0,
|
|
711
|
-
class: n(
|
|
799
|
+
class: o(n(e).e("description"))
|
|
712
800
|
}, [
|
|
713
|
-
|
|
714
|
-
|
|
801
|
+
y(r.$slots, "description", {}, () => [
|
|
802
|
+
A($(t.description), 1)
|
|
715
803
|
])
|
|
716
804
|
], 2)) : C("", !0)
|
|
717
805
|
], 2)
|
|
718
806
|
], 2));
|
|
719
807
|
}
|
|
720
|
-
}),
|
|
808
|
+
}), He = /* @__PURE__ */ V({
|
|
721
809
|
name: "XPageHeader",
|
|
722
810
|
__name: "index",
|
|
723
811
|
props: {
|
|
@@ -727,69 +815,74 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
727
815
|
showBack: { type: Boolean, default: !1 }
|
|
728
816
|
},
|
|
729
817
|
emits: ["back"],
|
|
730
|
-
setup(
|
|
731
|
-
const e =
|
|
818
|
+
setup(t, { emit: v }) {
|
|
819
|
+
const e = v, l = x("page-header"), a = () => {
|
|
732
820
|
e("back");
|
|
733
821
|
};
|
|
734
|
-
return (
|
|
735
|
-
class: n(
|
|
822
|
+
return (s, h) => (u(), m("div", {
|
|
823
|
+
class: o(n(l).b())
|
|
736
824
|
}, [
|
|
737
|
-
|
|
738
|
-
class: n(
|
|
825
|
+
z("div", {
|
|
826
|
+
class: o(n(l).e("main"))
|
|
739
827
|
}, [
|
|
740
|
-
|
|
741
|
-
class: n(
|
|
828
|
+
z("div", {
|
|
829
|
+
class: o(n(l).e("left"))
|
|
742
830
|
}, [
|
|
743
|
-
|
|
831
|
+
t.showBack ? (u(), m("span", {
|
|
744
832
|
key: 0,
|
|
745
|
-
class: n(
|
|
746
|
-
onClick:
|
|
833
|
+
class: o(n(l).e("back")),
|
|
834
|
+
onClick: a
|
|
747
835
|
}, [
|
|
748
|
-
|
|
749
|
-
class: n(
|
|
750
|
-
},
|
|
751
|
-
|
|
836
|
+
z("span", {
|
|
837
|
+
class: o(n(l).e("back-icon"))
|
|
838
|
+
}, [
|
|
839
|
+
R(n(_), {
|
|
840
|
+
name: "arrow-left",
|
|
841
|
+
size: 16
|
|
842
|
+
})
|
|
843
|
+
], 2),
|
|
844
|
+
t.backText ? (u(), m("span", {
|
|
752
845
|
key: 0,
|
|
753
|
-
class: n(
|
|
754
|
-
},
|
|
846
|
+
class: o(n(l).e("back-text"))
|
|
847
|
+
}, $(t.backText), 3)) : C("", !0)
|
|
755
848
|
], 2)) : C("", !0),
|
|
756
|
-
|
|
757
|
-
class: n(
|
|
849
|
+
z("span", {
|
|
850
|
+
class: o(n(l).e("title"))
|
|
758
851
|
}, [
|
|
759
|
-
|
|
760
|
-
|
|
852
|
+
y(s.$slots, "title", {}, () => [
|
|
853
|
+
A($(t.title), 1)
|
|
761
854
|
])
|
|
762
855
|
], 2),
|
|
763
|
-
|
|
856
|
+
t.subtitle || s.$slots.subtitle ? (u(), m("span", {
|
|
764
857
|
key: 1,
|
|
765
|
-
class: n(
|
|
858
|
+
class: o(n(l).e("subtitle"))
|
|
766
859
|
}, [
|
|
767
|
-
|
|
768
|
-
|
|
860
|
+
y(s.$slots, "subtitle", {}, () => [
|
|
861
|
+
A($(t.subtitle), 1)
|
|
769
862
|
])
|
|
770
863
|
], 2)) : C("", !0)
|
|
771
864
|
], 2),
|
|
772
|
-
|
|
773
|
-
class: n(
|
|
865
|
+
z("div", {
|
|
866
|
+
class: o(n(l).e("extra"))
|
|
774
867
|
}, [
|
|
775
|
-
|
|
868
|
+
y(s.$slots, "extra")
|
|
776
869
|
], 2)
|
|
777
870
|
], 2),
|
|
778
|
-
|
|
871
|
+
s.$slots.default ? (u(), m("div", {
|
|
779
872
|
key: 0,
|
|
780
|
-
class: n(
|
|
873
|
+
class: o(n(l).e("content"))
|
|
781
874
|
}, [
|
|
782
|
-
|
|
875
|
+
y(s.$slots, "default")
|
|
783
876
|
], 2)) : C("", !0),
|
|
784
|
-
|
|
877
|
+
s.$slots.footer ? (u(), m("div", {
|
|
785
878
|
key: 1,
|
|
786
|
-
class: n(
|
|
879
|
+
class: o(n(l).e("footer"))
|
|
787
880
|
}, [
|
|
788
|
-
|
|
881
|
+
y(s.$slots, "footer")
|
|
789
882
|
], 2)) : C("", !0)
|
|
790
883
|
], 2));
|
|
791
884
|
}
|
|
792
|
-
}),
|
|
885
|
+
}), $e = /* @__PURE__ */ V({
|
|
793
886
|
name: "XDropdown",
|
|
794
887
|
__name: "index",
|
|
795
888
|
props: {
|
|
@@ -800,67 +893,67 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
800
893
|
hideOnClick: { type: Boolean, default: !0 }
|
|
801
894
|
},
|
|
802
895
|
emits: ["visible-change", "click", "command"],
|
|
803
|
-
setup(
|
|
804
|
-
const e =
|
|
805
|
-
e.disabled || (
|
|
806
|
-
},
|
|
807
|
-
|
|
808
|
-
},
|
|
809
|
-
|
|
896
|
+
setup(t, { emit: v }) {
|
|
897
|
+
const e = t, l = v, a = x("dropdown"), s = w(e.visible || !1), h = w(), p = () => {
|
|
898
|
+
e.disabled || (s.value = !0, l("visible-change", !0));
|
|
899
|
+
}, M = () => {
|
|
900
|
+
s.value = !1, l("visible-change", !1);
|
|
901
|
+
}, k = () => {
|
|
902
|
+
s.value ? M() : p();
|
|
810
903
|
};
|
|
811
|
-
|
|
812
|
-
visible:
|
|
813
|
-
handleClick: (
|
|
814
|
-
|
|
904
|
+
X("x-dropdown", {
|
|
905
|
+
visible: s,
|
|
906
|
+
handleClick: (f) => {
|
|
907
|
+
l("click", f), l("command", f), e.hideOnClick && M();
|
|
815
908
|
},
|
|
816
|
-
hide:
|
|
909
|
+
hide: M
|
|
817
910
|
});
|
|
818
|
-
const
|
|
819
|
-
e.trigger === "hover" &&
|
|
820
|
-
},
|
|
821
|
-
e.trigger === "hover" &&
|
|
822
|
-
},
|
|
823
|
-
|
|
911
|
+
const c = () => {
|
|
912
|
+
e.trigger === "hover" && p();
|
|
913
|
+
}, d = () => {
|
|
914
|
+
e.trigger === "hover" && M();
|
|
915
|
+
}, i = (f) => {
|
|
916
|
+
h.value && !h.value.contains(f.target) && M();
|
|
824
917
|
};
|
|
825
|
-
return typeof window < "u" && document.addEventListener("click",
|
|
918
|
+
return typeof window < "u" && document.addEventListener("click", i), (f, g) => (u(), m("div", {
|
|
826
919
|
ref_key: "dropdownRef",
|
|
827
|
-
ref:
|
|
828
|
-
class:
|
|
829
|
-
onMouseenter:
|
|
830
|
-
onMouseleave:
|
|
920
|
+
ref: h,
|
|
921
|
+
class: o([n(a).b(), n(a).is("disabled", t.disabled)]),
|
|
922
|
+
onMouseenter: c,
|
|
923
|
+
onMouseleave: d
|
|
831
924
|
}, [
|
|
832
|
-
|
|
833
|
-
class: n(
|
|
834
|
-
onClick: g[0] || (g[0] = (
|
|
925
|
+
z("div", {
|
|
926
|
+
class: o(n(a).e("trigger")),
|
|
927
|
+
onClick: g[0] || (g[0] = (H) => t.trigger === "click" && k())
|
|
835
928
|
}, [
|
|
836
|
-
|
|
929
|
+
y(f.$slots, "default")
|
|
837
930
|
], 2),
|
|
838
|
-
|
|
839
|
-
default:
|
|
840
|
-
|
|
841
|
-
class:
|
|
931
|
+
R(Y, { name: "x-dropdown-zoom" }, {
|
|
932
|
+
default: U(() => [
|
|
933
|
+
N(z("div", {
|
|
934
|
+
class: o([n(a).e("menu"), n(a).m(t.placement)])
|
|
842
935
|
}, [
|
|
843
|
-
|
|
936
|
+
y(f.$slots, "dropdown")
|
|
844
937
|
], 2), [
|
|
845
|
-
[
|
|
938
|
+
[q, s.value]
|
|
846
939
|
])
|
|
847
940
|
]),
|
|
848
941
|
_: 3
|
|
849
942
|
})
|
|
850
943
|
], 34));
|
|
851
944
|
}
|
|
852
|
-
}),
|
|
945
|
+
}), xe = /* @__PURE__ */ V({
|
|
853
946
|
name: "XDropdownMenu",
|
|
854
947
|
__name: "DropdownMenu",
|
|
855
|
-
setup(
|
|
856
|
-
const
|
|
857
|
-
return (e,
|
|
858
|
-
class: n(
|
|
948
|
+
setup(t) {
|
|
949
|
+
const v = x("dropdown-menu");
|
|
950
|
+
return (e, l) => (u(), m("ul", {
|
|
951
|
+
class: o(n(v).b())
|
|
859
952
|
}, [
|
|
860
|
-
|
|
953
|
+
y(e.$slots, "default")
|
|
861
954
|
], 2));
|
|
862
955
|
}
|
|
863
|
-
}),
|
|
956
|
+
}), Be = /* @__PURE__ */ V({
|
|
864
957
|
name: "XDropdownItem",
|
|
865
958
|
__name: "DropdownItem",
|
|
866
959
|
props: {
|
|
@@ -870,43 +963,334 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
870
963
|
icon: {}
|
|
871
964
|
},
|
|
872
965
|
emits: ["click"],
|
|
873
|
-
setup(
|
|
874
|
-
const e =
|
|
875
|
-
e.disabled || (
|
|
876
|
-
},
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
966
|
+
setup(t, { emit: v }) {
|
|
967
|
+
const e = t, l = v, a = x("dropdown-item"), s = T("x-dropdown"), h = (M) => {
|
|
968
|
+
e.disabled || (l("click", M), s != null && s.handleClick && s.handleClick(e.command ?? M));
|
|
969
|
+
}, p = b(() => [
|
|
970
|
+
a.b(),
|
|
971
|
+
a.is("disabled", e.disabled),
|
|
972
|
+
a.is("divided", e.divided)
|
|
880
973
|
]);
|
|
881
|
-
return (
|
|
882
|
-
class:
|
|
883
|
-
onClick:
|
|
974
|
+
return (M, k) => (u(), m("li", {
|
|
975
|
+
class: o(p.value),
|
|
976
|
+
onClick: h
|
|
884
977
|
}, [
|
|
885
|
-
|
|
978
|
+
t.icon ? (u(), m("span", {
|
|
886
979
|
key: 0,
|
|
887
|
-
class: n(
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
class: n(
|
|
980
|
+
class: o(n(a).e("icon"))
|
|
981
|
+
}, $(t.icon), 3)) : C("", !0),
|
|
982
|
+
z("span", {
|
|
983
|
+
class: o(n(a).e("content"))
|
|
891
984
|
}, [
|
|
892
|
-
|
|
985
|
+
y(M.$slots, "default")
|
|
893
986
|
], 2)
|
|
894
987
|
], 2));
|
|
895
988
|
}
|
|
989
|
+
}), Le = /* @__PURE__ */ V({
|
|
990
|
+
name: "XAffix",
|
|
991
|
+
__name: "index",
|
|
992
|
+
props: {
|
|
993
|
+
offset: { default: 0 },
|
|
994
|
+
position: { default: "top" },
|
|
995
|
+
target: {},
|
|
996
|
+
zIndex: { default: 100 }
|
|
997
|
+
},
|
|
998
|
+
emits: ["change"],
|
|
999
|
+
setup(t, { emit: v }) {
|
|
1000
|
+
const e = t, l = v, a = x("affix"), s = w(!1), h = w(), p = w(), M = () => e.target ? document.querySelector(e.target) : window, k = () => {
|
|
1001
|
+
if (!h.value || !p.value) return;
|
|
1002
|
+
const f = M(), g = p.value.getBoundingClientRect(), H = f === window ? { top: 0, bottom: window.innerHeight } : f.getBoundingClientRect();
|
|
1003
|
+
let B = !1;
|
|
1004
|
+
e.position === "top" ? B = g.top < H.top + e.offset : B = g.bottom > H.bottom - e.offset, B !== s.value && (s.value = B, l("change", B));
|
|
1005
|
+
}, r = w({}), c = () => {
|
|
1006
|
+
if (!s.value || !p.value) return;
|
|
1007
|
+
const f = p.value.getBoundingClientRect(), g = {
|
|
1008
|
+
width: `${f.width}px`,
|
|
1009
|
+
height: `${f.height}px`,
|
|
1010
|
+
zIndex: String(e.zIndex)
|
|
1011
|
+
};
|
|
1012
|
+
e.position === "top" ? g.top = `${e.offset}px` : g.bottom = `${e.offset}px`, r.value = g;
|
|
1013
|
+
}, d = () => {
|
|
1014
|
+
k(), s.value && c();
|
|
1015
|
+
};
|
|
1016
|
+
let i = null;
|
|
1017
|
+
return W(() => {
|
|
1018
|
+
i = M(), i == null || i.addEventListener("scroll", d), window.addEventListener("resize", d), F(() => {
|
|
1019
|
+
k();
|
|
1020
|
+
});
|
|
1021
|
+
}), J(() => {
|
|
1022
|
+
i == null || i.removeEventListener("scroll", d), window.removeEventListener("resize", d);
|
|
1023
|
+
}), S(s, () => {
|
|
1024
|
+
c();
|
|
1025
|
+
}), (f, g) => (u(), m("div", {
|
|
1026
|
+
ref_key: "affixPlaceholderRef",
|
|
1027
|
+
ref: p,
|
|
1028
|
+
class: o(n(a).b())
|
|
1029
|
+
}, [
|
|
1030
|
+
s.value ? (u(), m("div", {
|
|
1031
|
+
key: 0,
|
|
1032
|
+
ref_key: "affixRef",
|
|
1033
|
+
ref: h,
|
|
1034
|
+
class: o(n(a).e("fixed")),
|
|
1035
|
+
style: I(r.value)
|
|
1036
|
+
}, [
|
|
1037
|
+
y(f.$slots, "default")
|
|
1038
|
+
], 6)) : (u(), m("div", {
|
|
1039
|
+
key: 1,
|
|
1040
|
+
ref_key: "affixRef",
|
|
1041
|
+
ref: h
|
|
1042
|
+
}, [
|
|
1043
|
+
y(f.$slots, "default")
|
|
1044
|
+
], 512))
|
|
1045
|
+
], 2));
|
|
1046
|
+
}
|
|
1047
|
+
}), re = ["href", "target", "onClick"], Se = /* @__PURE__ */ V({
|
|
1048
|
+
name: "XAnchor",
|
|
1049
|
+
__name: "index",
|
|
1050
|
+
props: {
|
|
1051
|
+
links: { default: () => [] },
|
|
1052
|
+
container: { default: "" },
|
|
1053
|
+
offset: { default: 0 },
|
|
1054
|
+
showBorder: { type: Boolean, default: !1 },
|
|
1055
|
+
sticky: { type: Boolean, default: !1 }
|
|
1056
|
+
},
|
|
1057
|
+
emits: ["change"],
|
|
1058
|
+
setup(t, { emit: v }) {
|
|
1059
|
+
const e = t, l = v, a = x("anchor"), s = w(""), h = w(), p = () => e.container ? document.querySelector(e.container) : window, M = () => {
|
|
1060
|
+
const c = p();
|
|
1061
|
+
c === window ? window.scrollY : c.scrollTop;
|
|
1062
|
+
for (const d of e.links) {
|
|
1063
|
+
const i = document.querySelector(d.href);
|
|
1064
|
+
if (i) {
|
|
1065
|
+
const f = i.getBoundingClientRect(), g = c === window ? { top: 0 } : c.getBoundingClientRect(), H = f.top - g.top - e.offset;
|
|
1066
|
+
if (H <= 0 && H + f.height > 0) {
|
|
1067
|
+
s.value !== d.href && (s.value = d.href, l("change", d.href));
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}, k = (c, d) => {
|
|
1073
|
+
d.preventDefault();
|
|
1074
|
+
const i = document.querySelector(c.href);
|
|
1075
|
+
if (i) {
|
|
1076
|
+
const f = p(), g = i.getBoundingClientRect(), H = f === window ? { top: 0 } : f.getBoundingClientRect(), P = (f === window ? window.scrollY : f.scrollTop) + g.top - H.top - e.offset;
|
|
1077
|
+
f === window ? window.scrollTo({
|
|
1078
|
+
top: P,
|
|
1079
|
+
behavior: "smooth"
|
|
1080
|
+
}) : f.scrollTo({
|
|
1081
|
+
top: P,
|
|
1082
|
+
behavior: "smooth"
|
|
1083
|
+
}), s.value = c.href, l("change", c.href);
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
1086
|
+
let r = null;
|
|
1087
|
+
return W(() => {
|
|
1088
|
+
r = p(), r == null || r.addEventListener("scroll", M), F(() => {
|
|
1089
|
+
M();
|
|
1090
|
+
});
|
|
1091
|
+
}), J(() => {
|
|
1092
|
+
r == null || r.removeEventListener("scroll", M);
|
|
1093
|
+
}), S(() => e.links, () => {
|
|
1094
|
+
F(() => {
|
|
1095
|
+
M();
|
|
1096
|
+
});
|
|
1097
|
+
}), (c, d) => (u(), m("div", {
|
|
1098
|
+
ref_key: "anchorRef",
|
|
1099
|
+
ref: h,
|
|
1100
|
+
class: o([
|
|
1101
|
+
n(a).b(),
|
|
1102
|
+
n(a).is("border", t.showBorder),
|
|
1103
|
+
n(a).is("sticky", t.sticky)
|
|
1104
|
+
])
|
|
1105
|
+
}, [
|
|
1106
|
+
z("ul", {
|
|
1107
|
+
class: o(n(a).e("list"))
|
|
1108
|
+
}, [
|
|
1109
|
+
(u(!0), m(O, null, K(t.links, (i) => (u(), m("li", {
|
|
1110
|
+
key: i.href,
|
|
1111
|
+
class: o([
|
|
1112
|
+
n(a).e("item"),
|
|
1113
|
+
n(a).is("active", s.value === i.href)
|
|
1114
|
+
])
|
|
1115
|
+
}, [
|
|
1116
|
+
z("a", {
|
|
1117
|
+
href: i.href,
|
|
1118
|
+
target: i.target,
|
|
1119
|
+
class: o(n(a).e("link")),
|
|
1120
|
+
onClick: (f) => k(i, f)
|
|
1121
|
+
}, $(i.title), 11, re)
|
|
1122
|
+
], 2))), 128))
|
|
1123
|
+
], 2),
|
|
1124
|
+
s.value ? (u(), m("div", {
|
|
1125
|
+
key: 0,
|
|
1126
|
+
class: o(n(a).e("indicator"))
|
|
1127
|
+
}, null, 2)) : C("", !0)
|
|
1128
|
+
], 2));
|
|
1129
|
+
}
|
|
1130
|
+
}), ue = ["onClick"], _e = /* @__PURE__ */ V({
|
|
1131
|
+
name: "XPopselect",
|
|
1132
|
+
__name: "index",
|
|
1133
|
+
props: {
|
|
1134
|
+
modelValue: { default: "" },
|
|
1135
|
+
options: { default: () => [] },
|
|
1136
|
+
disabled: { type: Boolean, default: !1 },
|
|
1137
|
+
placement: { default: "bottom" },
|
|
1138
|
+
width: { default: 200 },
|
|
1139
|
+
multiple: { type: Boolean, default: !1 }
|
|
1140
|
+
},
|
|
1141
|
+
emits: ["update:modelValue", "change"],
|
|
1142
|
+
setup(t, { emit: v }) {
|
|
1143
|
+
const e = t, l = v, a = x("popselect"), s = w(!1), h = w(e.multiple ? [] : "");
|
|
1144
|
+
S(() => e.modelValue, (c) => {
|
|
1145
|
+
h.value = c;
|
|
1146
|
+
}, { immediate: !0 });
|
|
1147
|
+
const p = b(() => ({
|
|
1148
|
+
width: typeof e.width == "number" ? `${e.width}px` : e.width
|
|
1149
|
+
})), M = (c) => e.multiple ? h.value.includes(c.value) : h.value === c.value, k = (c) => {
|
|
1150
|
+
if (!(c.disabled || e.disabled))
|
|
1151
|
+
if (e.multiple) {
|
|
1152
|
+
const d = h.value, i = d.indexOf(c.value);
|
|
1153
|
+
i > -1 ? d.splice(i, 1) : d.push(c.value), l("update:modelValue", d), l("change", d);
|
|
1154
|
+
} else
|
|
1155
|
+
h.value = c.value, l("update:modelValue", c.value), l("change", c.value), s.value = !1;
|
|
1156
|
+
}, r = (c) => {
|
|
1157
|
+
c.target.closest(`.${a.b()}`) || (s.value = !1);
|
|
1158
|
+
};
|
|
1159
|
+
return S(s, (c) => {
|
|
1160
|
+
c ? document.addEventListener("click", r) : document.removeEventListener("click", r);
|
|
1161
|
+
}), (c, d) => (u(), m("div", {
|
|
1162
|
+
class: o(n(a).b()),
|
|
1163
|
+
onClick: d[1] || (d[1] = Z(() => {
|
|
1164
|
+
}, ["stop"]))
|
|
1165
|
+
}, [
|
|
1166
|
+
z("div", {
|
|
1167
|
+
class: o(n(a).e("trigger")),
|
|
1168
|
+
onClick: d[0] || (d[0] = (i) => !t.disabled && (s.value = !s.value))
|
|
1169
|
+
}, [
|
|
1170
|
+
y(c.$slots, "default")
|
|
1171
|
+
], 2),
|
|
1172
|
+
N(z("div", {
|
|
1173
|
+
class: o([n(a).e("dropdown"), n(a).em("dropdown", t.placement)]),
|
|
1174
|
+
style: I(p.value)
|
|
1175
|
+
}, [
|
|
1176
|
+
z("ul", {
|
|
1177
|
+
class: o(n(a).e("list"))
|
|
1178
|
+
}, [
|
|
1179
|
+
(u(!0), m(O, null, K(t.options, (i) => (u(), m("li", {
|
|
1180
|
+
key: i.value,
|
|
1181
|
+
class: o([
|
|
1182
|
+
n(a).e("item"),
|
|
1183
|
+
n(a).is("selected", M(i)),
|
|
1184
|
+
n(a).is("disabled", i.disabled)
|
|
1185
|
+
]),
|
|
1186
|
+
onClick: (f) => k(i)
|
|
1187
|
+
}, [
|
|
1188
|
+
i.icon ? (u(), D(n(_), {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
name: i.icon,
|
|
1191
|
+
size: 16
|
|
1192
|
+
}, null, 8, ["name"])) : C("", !0),
|
|
1193
|
+
z("span", {
|
|
1194
|
+
class: o(n(a).e("label"))
|
|
1195
|
+
}, $(i.label), 3),
|
|
1196
|
+
M(i) ? (u(), m("span", {
|
|
1197
|
+
key: 1,
|
|
1198
|
+
class: o(n(a).e("check"))
|
|
1199
|
+
}, [
|
|
1200
|
+
R(n(_), {
|
|
1201
|
+
name: "check",
|
|
1202
|
+
size: 14
|
|
1203
|
+
})
|
|
1204
|
+
], 2)) : C("", !0)
|
|
1205
|
+
], 10, ue))), 128))
|
|
1206
|
+
], 2)
|
|
1207
|
+
], 6), [
|
|
1208
|
+
[q, s.value]
|
|
1209
|
+
])
|
|
1210
|
+
], 2));
|
|
1211
|
+
}
|
|
1212
|
+
}), de = ["onClick"], ve = { key: 1 }, me = ["disabled"], Ae = /* @__PURE__ */ V({
|
|
1213
|
+
name: "XFloatButton",
|
|
1214
|
+
__name: "index",
|
|
1215
|
+
props: {
|
|
1216
|
+
icon: { default: "plus" },
|
|
1217
|
+
type: { default: "primary" },
|
|
1218
|
+
shape: { default: "circle" },
|
|
1219
|
+
size: { default: "large" },
|
|
1220
|
+
position: { default: "right" },
|
|
1221
|
+
bottom: { default: 80 },
|
|
1222
|
+
offset: { default: 24 },
|
|
1223
|
+
menu: { default: () => [] },
|
|
1224
|
+
disabled: { type: Boolean, default: !1 }
|
|
1225
|
+
},
|
|
1226
|
+
emits: ["click"],
|
|
1227
|
+
setup(t, { emit: v }) {
|
|
1228
|
+
const e = t, l = v, a = x("float-button"), s = w(!1), h = b(() => ({
|
|
1229
|
+
bottom: `${e.bottom}px`,
|
|
1230
|
+
[e.position]: `${e.offset}px`
|
|
1231
|
+
})), p = () => {
|
|
1232
|
+
e.disabled || (e.menu.length > 0 ? s.value = !s.value : l("click"));
|
|
1233
|
+
}, M = (k) => {
|
|
1234
|
+
var r;
|
|
1235
|
+
(r = k.onClick) == null || r.call(k), s.value = !1;
|
|
1236
|
+
};
|
|
1237
|
+
return (k, r) => (u(), m("div", {
|
|
1238
|
+
class: o([n(a).b(), n(a).m(t.position)]),
|
|
1239
|
+
style: I(h.value)
|
|
1240
|
+
}, [
|
|
1241
|
+
t.menu.length > 0 ? (u(), m("div", {
|
|
1242
|
+
key: 0,
|
|
1243
|
+
class: o([n(a).e("menu"), n(a).is("visible", s.value)])
|
|
1244
|
+
}, [
|
|
1245
|
+
(u(!0), m(O, null, K(t.menu, (c, d) => (u(), m("div", {
|
|
1246
|
+
key: d,
|
|
1247
|
+
class: o(n(a).e("menu-item")),
|
|
1248
|
+
onClick: (i) => M(c)
|
|
1249
|
+
}, [
|
|
1250
|
+
c.icon ? (u(), D(n(_), {
|
|
1251
|
+
key: 0,
|
|
1252
|
+
name: c.icon,
|
|
1253
|
+
size: 16
|
|
1254
|
+
}, null, 8, ["name"])) : C("", !0),
|
|
1255
|
+
c.label ? (u(), m("span", ve, $(c.label), 1)) : C("", !0)
|
|
1256
|
+
], 10, de))), 128))
|
|
1257
|
+
], 2)) : C("", !0),
|
|
1258
|
+
z("button", {
|
|
1259
|
+
class: o([
|
|
1260
|
+
n(a).e("button"),
|
|
1261
|
+
n(a).m(t.type),
|
|
1262
|
+
n(a).m(t.shape),
|
|
1263
|
+
n(a).m(t.size),
|
|
1264
|
+
n(a).is("disabled", t.disabled)
|
|
1265
|
+
]),
|
|
1266
|
+
disabled: t.disabled,
|
|
1267
|
+
onClick: p
|
|
1268
|
+
}, [
|
|
1269
|
+
R(n(_), {
|
|
1270
|
+
name: t.icon,
|
|
1271
|
+
size: t.size === "large" ? 24 : t.size === "small" ? 16 : 20
|
|
1272
|
+
}, null, 8, ["name", "size"])
|
|
1273
|
+
], 10, me)
|
|
1274
|
+
], 6));
|
|
1275
|
+
}
|
|
896
1276
|
});
|
|
897
1277
|
export {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
1278
|
+
Le as Affix,
|
|
1279
|
+
Se as Anchor,
|
|
1280
|
+
ge as Breadcrumb,
|
|
1281
|
+
we as BreadcrumbItem,
|
|
1282
|
+
$e as Dropdown,
|
|
1283
|
+
Be as DropdownItem,
|
|
1284
|
+
xe as DropdownMenu,
|
|
1285
|
+
Ae as FloatButton,
|
|
1286
|
+
be as Menu,
|
|
1287
|
+
ze as MenuItem,
|
|
1288
|
+
ke as MenuItemGroup,
|
|
1289
|
+
He as PageHeader,
|
|
1290
|
+
_e as Popselect,
|
|
1291
|
+
Ce as Step,
|
|
1292
|
+
Ve as Steps,
|
|
1293
|
+
ye as SubMenu,
|
|
1294
|
+
Me as TabPane,
|
|
1295
|
+
pe as Tabs
|
|
912
1296
|
};
|