feat(sidebar): add connection multi-select toolbar
This commit is contained in:
13 files changed
+318
-52
No files matched your search
@@ -23,6 +23,10 @@ defineEmits<{
|
||||
close: [];
|
||||
}>();
|
||||
|
||||
defineSlots<{
|
||||
default(props: { onContextMenu: (event: MouseEvent) => void }): any;
|
||||
}>();
|
||||
|
||||
// ---- module-level singleton state ----
|
||||
const openMenus = new Set<() => void>();
|
||||
let globalSetup = false;
|
||||
@@ -261,7 +265,7 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<slot :on-context-menu="onContextMenu" />
|
||||
<slot :onContextMenu="onContextMenu" />
|
||||
<!-- Main menu -->
|
||||
<Teleport to="body">
|
||||
<div v-if="show" ref="menuRef" :style="{ position: 'fixed', left: x + 'px', top: y + 'px', zIndex: 9999 }" class="bg-popover text-popover-foreground min-w-40 rounded-[6px] p-1 overflow-x-hidden overflow-y-auto ring-1 ring-foreground/10 shadow-lg">
|
||||
|
||||
@@ -47,6 +47,12 @@ const emit = defineEmits<{
|
||||
"update:open": [value: boolean];
|
||||
}>();
|
||||
|
||||
defineSlots<{
|
||||
"trigger-label"?(props: { value: string; label: string; loading: boolean }): any;
|
||||
"option-label"?(props: { option: string; label: string }): any;
|
||||
"custom-option-label"?(props: { value: string }): any;
|
||||
}>();
|
||||
|
||||
const open = ref(false);
|
||||
const searchText = ref("");
|
||||
const searchInput = ref<InstanceType<typeof Input>>();
|
||||
|
||||
Reference in new issue
Block a user