@funcho/ui 1.1.18 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ContextMenu/ContextMenu.vue.js +11 -3
- package/dist/cjs/packages/ui/package.json.js +1 -1
- package/dist/esm/components/ContextMenu/ContextMenu.vue.mjs +11 -3
- package/dist/esm/packages/ui/package.json.mjs +1 -1
- package/dist/types/components/ContextMenu/ContextMenu.vue.d.ts +5 -1
- package/dist/types/components/ContextMenu/index.d.ts +15 -5
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
14
14
|
props: {
|
|
15
15
|
options: { default: () => [] }
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
emits: ["command"],
|
|
18
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
19
|
const position = vue.ref({
|
|
19
20
|
top: 0,
|
|
20
21
|
left: 0,
|
|
@@ -24,14 +25,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
25
|
const triggerRef = vue.ref({
|
|
25
26
|
getBoundingClientRect: () => position.value
|
|
26
27
|
});
|
|
28
|
+
const emits = __emit;
|
|
29
|
+
const handleCommand = (command) => {
|
|
30
|
+
emits("command", command, ...activeArgs.value);
|
|
31
|
+
};
|
|
27
32
|
const elRef = vue.ref();
|
|
28
|
-
const
|
|
33
|
+
const activeArgs = vue.ref([]);
|
|
34
|
+
const show = (event, ...args) => {
|
|
29
35
|
position.value = DOMRect.fromRect({
|
|
30
36
|
x: event.clientX,
|
|
31
37
|
y: event.clientY
|
|
32
38
|
});
|
|
33
39
|
event.preventDefault();
|
|
34
40
|
elRef.value?.handleOpen();
|
|
41
|
+
activeArgs.value = args;
|
|
35
42
|
};
|
|
36
43
|
__expose(
|
|
37
44
|
new Proxy(
|
|
@@ -58,7 +65,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
58
65
|
},
|
|
59
66
|
"virtual-triggering": "",
|
|
60
67
|
trigger: "contextmenu",
|
|
61
|
-
placement: "bottom-start"
|
|
68
|
+
placement: "bottom-start",
|
|
69
|
+
onCommand: handleCommand
|
|
62
70
|
}, {
|
|
63
71
|
dropdown: vue.withCtx(() => [
|
|
64
72
|
vue.createVNode(vue.unref(index.ElDropdownMenu), null, {
|
|
@@ -10,7 +10,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
props: {
|
|
11
11
|
options: { default: () => [] }
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
emits: ["command"],
|
|
14
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14
15
|
const position = ref({
|
|
15
16
|
top: 0,
|
|
16
17
|
left: 0,
|
|
@@ -20,14 +21,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
21
|
const triggerRef = ref({
|
|
21
22
|
getBoundingClientRect: () => position.value
|
|
22
23
|
});
|
|
24
|
+
const emits = __emit;
|
|
25
|
+
const handleCommand = (command) => {
|
|
26
|
+
emits("command", command, ...activeArgs.value);
|
|
27
|
+
};
|
|
23
28
|
const elRef = ref();
|
|
24
|
-
const
|
|
29
|
+
const activeArgs = ref([]);
|
|
30
|
+
const show = (event, ...args) => {
|
|
25
31
|
position.value = DOMRect.fromRect({
|
|
26
32
|
x: event.clientX,
|
|
27
33
|
y: event.clientY
|
|
28
34
|
});
|
|
29
35
|
event.preventDefault();
|
|
30
36
|
elRef.value?.handleOpen();
|
|
37
|
+
activeArgs.value = args;
|
|
31
38
|
};
|
|
32
39
|
__expose(
|
|
33
40
|
new Proxy(
|
|
@@ -54,7 +61,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
61
|
},
|
|
55
62
|
"virtual-triggering": "",
|
|
56
63
|
trigger: "contextmenu",
|
|
57
|
-
placement: "bottom-start"
|
|
64
|
+
placement: "bottom-start",
|
|
65
|
+
onCommand: handleCommand
|
|
58
66
|
}, {
|
|
59
67
|
dropdown: withCtx(() => [
|
|
60
68
|
createVNode(unref(ElDropdownMenu), null, {
|
|
@@ -580,7 +580,11 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
580
580
|
$route: import('vue-router').TypesConfig extends Record<"$route", infer T> ? T : import('vue-router').RouteLocationNormalizedLoaded;
|
|
581
581
|
$router: import('vue-router').TypesConfig extends Record<"$router", infer T> ? T : import('vue-router').Router;
|
|
582
582
|
show: (event: MouseEvent) => void;
|
|
583
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}
|
|
583
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
584
|
+
command: (...args: any[]) => any;
|
|
585
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
586
|
+
onCommand?: ((...args: any[]) => any) | undefined;
|
|
587
|
+
}>, {
|
|
584
588
|
options: FcContextMenuOption[];
|
|
585
589
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
586
590
|
elRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const FcContextMenu: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
3
|
options?: import('./ContextMenu.vue').FcContextMenuOption[];
|
|
4
|
-
}> & Readonly<{
|
|
4
|
+
}> & Readonly<{
|
|
5
|
+
onCommand?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
}>, {
|
|
5
7
|
$: import('vue').ComponentInternalInstance;
|
|
6
8
|
$data: {};
|
|
7
9
|
$props: Partial<{
|
|
@@ -575,7 +577,9 @@ export declare const FcContextMenu: {
|
|
|
575
577
|
$route: import('vue-router').TypesConfig extends Record<"$route", infer T> ? T : import('vue-router').RouteLocationNormalizedLoaded;
|
|
576
578
|
$router: import('vue-router').TypesConfig extends Record<"$router", infer T> ? T : import('vue-router').Router;
|
|
577
579
|
show: (event: MouseEvent) => void;
|
|
578
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}
|
|
580
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
581
|
+
command: (...args: any[]) => any;
|
|
582
|
+
}, import('vue').PublicProps, {
|
|
579
583
|
options: import('./ContextMenu.vue').FcContextMenuOption[];
|
|
580
584
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
581
585
|
elRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -1047,7 +1051,9 @@ export declare const FcContextMenu: {
|
|
|
1047
1051
|
Defaults: {};
|
|
1048
1052
|
}, Readonly<{
|
|
1049
1053
|
options?: import('./ContextMenu.vue').FcContextMenuOption[];
|
|
1050
|
-
}> & Readonly<{
|
|
1054
|
+
}> & Readonly<{
|
|
1055
|
+
onCommand?: ((...args: any[]) => any) | undefined;
|
|
1056
|
+
}>, {
|
|
1051
1057
|
$: import('vue').ComponentInternalInstance;
|
|
1052
1058
|
$data: {};
|
|
1053
1059
|
$props: Partial<{
|
|
@@ -1629,7 +1635,9 @@ export declare const FcContextMenu: {
|
|
|
1629
1635
|
__isSuspense?: never;
|
|
1630
1636
|
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
1631
1637
|
options?: import('./ContextMenu.vue').FcContextMenuOption[];
|
|
1632
|
-
}> & Readonly<{
|
|
1638
|
+
}> & Readonly<{
|
|
1639
|
+
onCommand?: ((...args: any[]) => any) | undefined;
|
|
1640
|
+
}>, {
|
|
1633
1641
|
$: import('vue').ComponentInternalInstance;
|
|
1634
1642
|
$data: {};
|
|
1635
1643
|
$props: Partial<{
|
|
@@ -2203,7 +2211,9 @@ export declare const FcContextMenu: {
|
|
|
2203
2211
|
$route: import('vue-router').TypesConfig extends Record<"$route", infer T> ? T : import('vue-router').RouteLocationNormalizedLoaded;
|
|
2204
2212
|
$router: import('vue-router').TypesConfig extends Record<"$router", infer T> ? T : import('vue-router').Router;
|
|
2205
2213
|
show: (event: MouseEvent) => void;
|
|
2206
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}
|
|
2214
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2215
|
+
command: (...args: any[]) => any;
|
|
2216
|
+
}, string, {
|
|
2207
2217
|
options: import('./ContextMenu.vue').FcContextMenuOption[];
|
|
2208
2218
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
2209
2219
|
export default FcContextMenu;
|