rappel-ui 1.0.39 → 1.0.40
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/cjs/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/types.d.ts +6 -6
- package/cjs/components/menu/index.d.ts +46 -4
- package/cjs/components/menu/src/loop.vue.d.ts +8 -3
- package/cjs/components/menu/src/loop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/menu-item.vue.d.ts +16 -2
- package/cjs/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/menu.vue.d.ts +3 -1
- package/cjs/components/menu/src/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/types.d.ts +17 -13
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/composables/index.d.ts +1 -1
- package/cjs/composables/index.js +1 -1
- package/cjs/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
- package/cjs/composables/use-slot-nodes/index.js +1 -0
- package/cjs/index.d.ts +44 -3
- package/cjs/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.umd.js +9 -9
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.mjs +20 -20
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/dropdown/src/types.d.ts +6 -6
- package/es/components/menu/index.d.ts +46 -4
- package/es/components/menu/src/loop.vue.d.ts +8 -3
- package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +108 -13
- package/es/components/menu/src/menu-item.vue.d.ts +16 -2
- package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +169 -195
- package/es/components/menu/src/menu.vue.d.ts +3 -1
- package/es/components/menu/src/menu.vue_vue_type_script_setup_true_lang.mjs +72 -60
- package/es/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.mjs +73 -105
- package/es/components/menu/src/types.d.ts +17 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/composables/index.d.ts +1 -1
- package/es/composables/index.mjs +2 -2
- package/es/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
- package/es/composables/use-slot-nodes/index.mjs +14 -0
- package/es/index.d.ts +44 -3
- package/es/index.mjs +70 -70
- package/package.json +2 -2
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/re-menu.css +1 -1
- package/theme-chalk/src/menu.scss +12 -0
- package/cjs/composables/use-slot-node/index.js +0 -1
- package/es/composables/use-slot-node/index.mjs +0 -10
|
@@ -24,7 +24,10 @@ var E = ["depth"], D = p({
|
|
|
24
24
|
default: () => void 0
|
|
25
25
|
},
|
|
26
26
|
icon: { default: "" },
|
|
27
|
-
subIcon: {
|
|
27
|
+
subIcon: {
|
|
28
|
+
type: [String, Boolean],
|
|
29
|
+
default: () => w
|
|
30
|
+
},
|
|
28
31
|
depth: { default: () => void 0 }
|
|
29
32
|
},
|
|
30
33
|
setup(p) {
|
|
@@ -37,12 +40,9 @@ var E = ["depth"], D = p({
|
|
|
37
40
|
k("children", A.value)
|
|
38
41
|
]), M = o(() => {
|
|
39
42
|
var e;
|
|
40
|
-
return (e = p.depth) == null ?
|
|
41
|
-
}), N = o(() => !A.value || p.disabled),
|
|
42
|
-
|
|
43
|
-
return P == null || (e = P.submenuOffset) == null ? void 0 : e.value;
|
|
44
|
-
}), z = (e) => {
|
|
45
|
-
e.stopPropagation(), !(A.value || p.disabled) && (P == null || P.select(p.value, {
|
|
43
|
+
return (e = p.depth) == null ? P.value : e;
|
|
44
|
+
}), N = o(() => !A.value || p.disabled), { depth: P, theme: F, reverseTheme: I, submenuOffset: L, select: R } = m(r), z = (e) => {
|
|
45
|
+
e.stopPropagation(), !(A.value || p.disabled) && R(p.value, {
|
|
46
46
|
label: p.label,
|
|
47
47
|
disabled: p.disabled,
|
|
48
48
|
value: p.value,
|
|
@@ -51,12 +51,12 @@ var E = ["depth"], D = p({
|
|
|
51
51
|
icon: p.icon,
|
|
52
52
|
subIcon: p.subIcon,
|
|
53
53
|
depth: M.value
|
|
54
|
-
})
|
|
55
|
-
}, B = C(async () => await T(p.icon)), V = C(async () => await T(p.subIcon)), H = x("tooltipRef"), U = o(() => {
|
|
54
|
+
});
|
|
55
|
+
}, B = C(async () => await T(p.icon)), V = C(async () => await T(p.subIcon || "")), H = x("tooltipRef"), U = o(() => {
|
|
56
56
|
var e;
|
|
57
57
|
let t = (e = H.value) == null ? void 0 : e.floatingPlacement;
|
|
58
58
|
return [{ "transform-origin": i[t] }];
|
|
59
|
-
}), { currentTheme: W } = t(
|
|
59
|
+
}), { currentTheme: W } = t(F.value, I.value);
|
|
60
60
|
return (e, t) => (g(), l("li", {
|
|
61
61
|
class: h(j.value),
|
|
62
62
|
depth: M.value,
|
|
@@ -72,9 +72,9 @@ var E = ["depth"], D = p({
|
|
|
72
72
|
"show-arrow": !1,
|
|
73
73
|
transform: !1,
|
|
74
74
|
transition: "dropdown",
|
|
75
|
-
offset:
|
|
76
|
-
theme:
|
|
77
|
-
"reverse-theme":
|
|
75
|
+
offset: b(L),
|
|
76
|
+
theme: b(F),
|
|
77
|
+
"reverse-theme": b(I)
|
|
78
78
|
}, {
|
|
79
79
|
content: S(() => {
|
|
80
80
|
var t;
|
|
@@ -91,29 +91,29 @@ var E = ["depth"], D = p({
|
|
|
91
91
|
}, null, 8, ["class", "options"])) : _(e.$slots, "default", {}, () => [d(y(p.label), 1)], void 0, 2)];
|
|
92
92
|
}),
|
|
93
93
|
default: S(() => [u("div", { class: h([b(D)("label-wrap")]) }, [
|
|
94
|
-
p.icon ? (g(), l("div", {
|
|
94
|
+
_(e.$slots, "icon", {}, () => [p.icon ? (g(), l("div", {
|
|
95
95
|
key: 0,
|
|
96
96
|
class: h([b(D)("icon")])
|
|
97
|
-
}, [
|
|
97
|
+
}, [typeof b(B) == "string" ? (g(), l("i", {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: h([b(B)]),
|
|
100
100
|
"aria-hidden": "true"
|
|
101
101
|
}, null, 2)) : (g(), s(v(b(B)), {
|
|
102
102
|
key: 1,
|
|
103
103
|
"aria-hidden": "true"
|
|
104
|
-
}))]
|
|
104
|
+
}))], 2)) : c("", !0)]),
|
|
105
105
|
u("div", { class: h([b(D)("label")]) }, [_(e.$slots, "default", {}, () => [d(y(p.label), 1)])], 2),
|
|
106
|
-
p.subIcon && A.value ? (g(), l("div", {
|
|
107
|
-
key:
|
|
106
|
+
_(e.$slots, "sub-icon", {}, () => [p.subIcon && A.value ? (g(), l("div", {
|
|
107
|
+
key: 0,
|
|
108
108
|
class: h([b(D)("subicon")])
|
|
109
|
-
}, [
|
|
109
|
+
}, [typeof b(V) == "string" ? (g(), l("i", {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: h([b(V)]),
|
|
112
112
|
"aria-hidden": "true"
|
|
113
113
|
}, null, 2)) : (g(), s(v(b(V)), {
|
|
114
114
|
key: 1,
|
|
115
115
|
"aria-hidden": "true"
|
|
116
|
-
}))]
|
|
116
|
+
}))], 2)) : c("", !0)])
|
|
117
117
|
], 2)]),
|
|
118
118
|
_: 3
|
|
119
119
|
}, 8, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeOptions as e } from "../../../utils/util.mjs";
|
|
2
2
|
import "../../../utils/index.mjs";
|
|
3
3
|
import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
|
|
4
|
-
import { useSlotFirstNode as n } from "../../../composables/use-slot-
|
|
4
|
+
import { useSlotFirstNode as n } from "../../../composables/use-slot-nodes/index.mjs";
|
|
5
5
|
import "../../../composables/index.mjs";
|
|
6
6
|
import { ReTooltip as r } from "../../tooltip/index.mjs";
|
|
7
7
|
import { _dropdownProvideKey as i, originsMap as a } from "./constants.mjs";
|
|
@@ -19,17 +19,17 @@ export interface DropdownOption {
|
|
|
19
19
|
children?: DropdownOption[];
|
|
20
20
|
hasChildren?: boolean;
|
|
21
21
|
icon?: string | Component;
|
|
22
|
-
subIcon?: string | Component;
|
|
22
|
+
subIcon?: string | Component | false;
|
|
23
23
|
depth?: number;
|
|
24
24
|
}
|
|
25
25
|
export interface DropdownProvides {
|
|
26
26
|
select: (value: any, item: DropdownOption) => void;
|
|
27
27
|
depth: Ref<number>;
|
|
28
|
-
hasOptions
|
|
29
|
-
cssDuration
|
|
30
|
-
theme
|
|
31
|
-
reverseTheme
|
|
32
|
-
submenuOffset
|
|
28
|
+
hasOptions: ComputedRef<boolean>;
|
|
29
|
+
cssDuration: ComputedRef<number>;
|
|
30
|
+
theme: ComputedRef<Theme>;
|
|
31
|
+
reverseTheme: ComputedRef<boolean>;
|
|
32
|
+
submenuOffset: ComputedRef<OffsetOptions>;
|
|
33
33
|
}
|
|
34
34
|
export interface DropdownSubmenuProps {
|
|
35
35
|
item?: DropdownOption;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, ShallowRef, ComputedRef, Ref, Component } from 'vue';
|
|
2
2
|
import { MenuProps, MenuOption, SubmenuProps } from './index.ts';
|
|
3
|
+
import { Placement } from '@floating-ui/vue';
|
|
3
4
|
export * from './src/types.ts';
|
|
4
5
|
export * from './src/use-menu-emit.ts';
|
|
5
6
|
export declare const ReMenu: {
|
|
@@ -33,6 +34,8 @@ export declare const ReMenu: {
|
|
|
33
34
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
34
35
|
$slots: {
|
|
35
36
|
default?: (props: {}) => any;
|
|
37
|
+
} & {
|
|
38
|
+
'ellipsis-icon'?: (props: {}) => any;
|
|
36
39
|
};
|
|
37
40
|
});
|
|
38
41
|
export declare const ReSubmenu: {
|
|
@@ -57,18 +60,57 @@ export declare const ReSubmenu: {
|
|
|
57
60
|
};
|
|
58
61
|
});
|
|
59
62
|
export declare const ReMenuItem: {
|
|
60
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< MenuOption> & Readonly<{}>, {
|
|
63
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< MenuOption> & Readonly<{}>, {
|
|
64
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
65
|
+
hasChild: ComputedRef<boolean>;
|
|
66
|
+
showArrow: ComputedRef<boolean>;
|
|
67
|
+
placement: ComputedRef<Placement>;
|
|
68
|
+
visible: Ref<boolean, boolean>;
|
|
69
|
+
value: any;
|
|
70
|
+
label: string | undefined;
|
|
71
|
+
disabled: boolean | undefined;
|
|
72
|
+
icon: string | Component;
|
|
73
|
+
subIcon: string | false | Component | undefined;
|
|
74
|
+
depth: number;
|
|
75
|
+
children: MenuOption[];
|
|
76
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
61
77
|
P: {};
|
|
62
78
|
B: {};
|
|
63
79
|
D: {};
|
|
64
80
|
C: {};
|
|
65
81
|
M: {};
|
|
66
82
|
Defaults: {};
|
|
67
|
-
}, Readonly< MenuOption> & Readonly<{}>, {
|
|
83
|
+
}, Readonly< MenuOption> & Readonly<{}>, {
|
|
84
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
85
|
+
hasChild: ComputedRef<boolean>;
|
|
86
|
+
showArrow: ComputedRef<boolean>;
|
|
87
|
+
placement: ComputedRef<Placement>;
|
|
88
|
+
visible: Ref<boolean, boolean>;
|
|
89
|
+
value: any;
|
|
90
|
+
label: string | undefined;
|
|
91
|
+
disabled: boolean | undefined;
|
|
92
|
+
icon: string | Component;
|
|
93
|
+
subIcon: string | false | Component | undefined;
|
|
94
|
+
depth: number;
|
|
95
|
+
children: MenuOption[];
|
|
96
|
+
}, {}, {}, {}, {}>;
|
|
68
97
|
__isFragment?: never;
|
|
69
98
|
__isTeleport?: never;
|
|
70
99
|
__isSuspense?: never;
|
|
71
|
-
} & ComponentOptionsBase<Readonly< MenuOption> & Readonly<{}>, {
|
|
100
|
+
} & ComponentOptionsBase<Readonly< MenuOption> & Readonly<{}>, {
|
|
101
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
102
|
+
hasChild: ComputedRef<boolean>;
|
|
103
|
+
showArrow: ComputedRef<boolean>;
|
|
104
|
+
placement: ComputedRef<Placement>;
|
|
105
|
+
visible: Ref<boolean, boolean>;
|
|
106
|
+
value: any;
|
|
107
|
+
label: string | undefined;
|
|
108
|
+
disabled: boolean | undefined;
|
|
109
|
+
icon: string | Component;
|
|
110
|
+
subIcon: string | false | Component | undefined;
|
|
111
|
+
depth: number;
|
|
112
|
+
children: MenuOption[];
|
|
113
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
72
114
|
$slots: {
|
|
73
115
|
icon?: (props: {}) => any;
|
|
74
116
|
} & {
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { MenuOption } from './types';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
options?: MenuOption[];
|
|
5
5
|
};
|
|
6
|
-
declare var __VLS_1: {};
|
|
6
|
+
declare var __VLS_1: {}, __VLS_28: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
8
|
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
} & {
|
|
10
|
+
'ellipsis-icon'?: (props: typeof __VLS_28) => any;
|
|
9
11
|
};
|
|
10
|
-
declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
12
|
+
declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
13
|
+
loopRef: Readonly< ShallowRef<HTMLUListElement | null>>;
|
|
14
|
+
update: () => Promise<void>;
|
|
15
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
11
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
17
|
declare const _default: typeof __VLS_export;
|
|
13
18
|
export default _default;
|
|
@@ -1,22 +1,117 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { useSlotNodes as e } from "../../../composables/use-slot-nodes/index.mjs";
|
|
2
|
+
import "../../../composables/index.mjs";
|
|
3
|
+
import { _menuProvideKey as t } from "./constants.mjs";
|
|
4
|
+
import n from "./menu-item.mjs";
|
|
5
|
+
import r from "./submenu.mjs";
|
|
6
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createSlots as l, defineComponent as u, inject as d, mergeProps as f, nextTick as p, onMounted as m, onUnmounted as h, openBlock as g, renderList as _, renderSlot as v, resolveDynamicComponent as y, shallowRef as b, unref as x, useSlots as S, useTemplateRef as C, watch as w, withCtx as T } from "vue";
|
|
7
|
+
import { computedAsync as E, useDebounceFn as D, useElementSize as O } from "@vueuse/core";
|
|
8
|
+
import { getAsyncIcon as k } from "@rappel-ui/svg-icons";
|
|
4
9
|
//#region packages/components/menu/src/loop.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
10
|
+
var A = u({
|
|
6
11
|
__name: "loop",
|
|
7
12
|
props: { options: { default: () => void 0 } },
|
|
8
|
-
setup(
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
return
|
|
13
|
+
setup(u, { expose: A }) {
|
|
14
|
+
let j = C("loopRef"), M = C("moreRef"), N = b([]), P = b([]), F = b([]), { depth: I, hasOptions: L, direction: R, ellipsis: z, ellipsisIcon: B } = d(t), V = a(() => {
|
|
15
|
+
var e;
|
|
16
|
+
return R.value === "horizontal" && z != null && z.value ? N.value : (e = u.options) == null ? [] : e;
|
|
17
|
+
}), H = E(async () => await k(B == null ? void 0 : B.value) || ""), U = b(!1), W = () => {
|
|
18
|
+
let e = j.value;
|
|
19
|
+
return e ? e.scrollWidth > e.clientWidth : !1;
|
|
20
|
+
}, G = S(), K = () => {
|
|
21
|
+
var e, t;
|
|
22
|
+
let n = (e = (t = M.value) == null ? void 0 : t.itemRef) == null ? M.value : e, r = j.value;
|
|
23
|
+
if (!n || !r) return -1;
|
|
24
|
+
let i = r.offsetWidth, a = Array.from(r.children), o = n.offsetWidth;
|
|
25
|
+
return a.findIndex((e) => (o += e.offsetWidth, o > i));
|
|
26
|
+
}, q = (e, t) => {
|
|
27
|
+
P.value = e.splice(t, e.length - t);
|
|
28
|
+
}, J = (t, n) => {
|
|
29
|
+
var r, i, a;
|
|
30
|
+
let o = e(t), s = (r = o == null || (i = o[0]) == null ? void 0 : i.children) == null ? [] : r, c = (a = s == null ? void 0 : s.length) == null ? 0 : a;
|
|
31
|
+
for (let e = n; e < c; e++) {
|
|
32
|
+
var l;
|
|
33
|
+
(l = j.value) == null || l.children[e].setAttribute("is-hidden", "true");
|
|
34
|
+
}
|
|
35
|
+
F.value = s.splice(n, s.length - n).map((e) => ({
|
|
36
|
+
...e,
|
|
37
|
+
props: {
|
|
38
|
+
...e.props,
|
|
39
|
+
"is-more": !0
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
}, Y = async () => {
|
|
43
|
+
var e;
|
|
44
|
+
if (N.value = [...(e = u.options) == null ? [] : e], I.value === 0 && R.value !== "vertical" && z.value) {
|
|
45
|
+
if (!L.value && j.value && j.value.querySelectorAll("li[is-hidden=\"true\"]").forEach((e) => {
|
|
46
|
+
e.setAttribute("is-hidden", "false");
|
|
47
|
+
}), await p(), W()) {
|
|
48
|
+
U.value = !0, await p();
|
|
49
|
+
let e = K();
|
|
50
|
+
if (e === -1) return;
|
|
51
|
+
L.value ? q(N.value, e) : J(G, e);
|
|
52
|
+
} else U.value = !1, F.value = [], P.value = [];
|
|
53
|
+
}
|
|
54
|
+
}, X = D(Y, 100), Z = () => {
|
|
55
|
+
let e = [];
|
|
56
|
+
if (z.value) {
|
|
57
|
+
let { width: t, stop: n } = O(j.value), { stop: r } = w(t, () => {
|
|
58
|
+
X();
|
|
59
|
+
});
|
|
60
|
+
e.push(n, r);
|
|
61
|
+
}
|
|
62
|
+
return { cleanup: () => {
|
|
63
|
+
e.forEach((e) => e());
|
|
64
|
+
} };
|
|
65
|
+
}, Q = [], $ = () => {
|
|
66
|
+
Q.forEach((e) => e());
|
|
67
|
+
}, ee = async () => {
|
|
68
|
+
if (z.value) {
|
|
69
|
+
await Y();
|
|
70
|
+
let { cleanup: e } = Z();
|
|
71
|
+
Q.push(e);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return m(() => {
|
|
75
|
+
ee();
|
|
76
|
+
}), h(() => {
|
|
77
|
+
$();
|
|
78
|
+
}), A({
|
|
79
|
+
loopRef: j,
|
|
80
|
+
update: Y
|
|
81
|
+
}), (e, t) => (g(), c("ul", {
|
|
82
|
+
ref_key: "loopRef",
|
|
83
|
+
ref: j
|
|
84
|
+
}, [v(e.$slots, "default", {}, () => [(g(!0), c(i, null, _(V.value, (t) => {
|
|
85
|
+
var a;
|
|
86
|
+
return g(), c(i, { key: typeof t.value == "boolean" ? t.label : t.value }, [t != null && (a = t.children) != null && a.length ? (g(), o(r, {
|
|
12
87
|
key: 0,
|
|
13
|
-
item:
|
|
14
|
-
|
|
88
|
+
item: t,
|
|
89
|
+
"is-more": e.$attrs["is-more"]
|
|
90
|
+
}, null, 8, ["item", "is-more"])) : (g(), o(n, f({
|
|
15
91
|
key: 1,
|
|
16
92
|
ref_for: !0
|
|
17
|
-
},
|
|
18
|
-
}), 128))])
|
|
93
|
+
}, t, { "is-more": e.$attrs["is-more"] }), null, 16, ["is-more"]))], 64);
|
|
94
|
+
}), 128))]), U.value ? (g(), o(n, {
|
|
95
|
+
key: 0,
|
|
96
|
+
ref_key: "moreRef",
|
|
97
|
+
ref: M,
|
|
98
|
+
value: "more",
|
|
99
|
+
children: P.value,
|
|
100
|
+
"has-children": "",
|
|
101
|
+
"sub-icon": !1,
|
|
102
|
+
depth: -1,
|
|
103
|
+
"is-more": !0,
|
|
104
|
+
class: "is-more",
|
|
105
|
+
icon: x(H)
|
|
106
|
+
}, l({
|
|
107
|
+
icon: T(() => [v(e.$slots, "ellipsis-icon")]),
|
|
108
|
+
_: 2
|
|
109
|
+
}, [x(L) ? void 0 : {
|
|
110
|
+
name: "item-submenu",
|
|
111
|
+
fn: T(() => [(g(), o(y(() => F.value)))]),
|
|
112
|
+
key: "0"
|
|
113
|
+
}]), 1032, ["children", "icon"])) : s("", !0)], 512));
|
|
19
114
|
}
|
|
20
115
|
});
|
|
21
116
|
//#endregion
|
|
22
|
-
export {
|
|
117
|
+
export { A as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MenuOption } from './types';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ShallowRef, ComputedRef, Ref, Component, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { Placement } from '@floating-ui/vue';
|
|
3
4
|
declare var __VLS_7: {}, __VLS_14: {}, __VLS_16: {}, __VLS_30: {}, __VLS_37: {}, __VLS_39: {};
|
|
4
5
|
type __VLS_Slots = {} & {
|
|
5
6
|
icon?: (props: typeof __VLS_7) => any;
|
|
@@ -14,7 +15,20 @@ type __VLS_Slots = {} & {
|
|
|
14
15
|
} & {
|
|
15
16
|
submenu?: (props: typeof __VLS_39) => any;
|
|
16
17
|
};
|
|
17
|
-
declare const __VLS_base: DefineComponent<MenuOption, {
|
|
18
|
+
declare const __VLS_base: DefineComponent<MenuOption, {
|
|
19
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
20
|
+
hasChild: ComputedRef<boolean>;
|
|
21
|
+
showArrow: ComputedRef<boolean>;
|
|
22
|
+
placement: ComputedRef<Placement>;
|
|
23
|
+
visible: Ref<boolean, boolean>;
|
|
24
|
+
value: any;
|
|
25
|
+
label: string | undefined;
|
|
26
|
+
disabled: boolean | undefined;
|
|
27
|
+
icon: string | Component;
|
|
28
|
+
subIcon: string | false | Component | undefined;
|
|
29
|
+
depth: number;
|
|
30
|
+
children: MenuOption[];
|
|
31
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MenuOption> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
18
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
33
|
declare const _default: typeof __VLS_export;
|
|
20
34
|
export default _default;
|