mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 17:06:01 +00:00
quick export from table data grid toolstrip
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
<script lang="ts">
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
|
||||
import { currentDropDownMenu } from '../stores';
|
||||
|
||||
import ToolStripButton from './ToolStripButton.svelte';
|
||||
|
||||
export let menu;
|
||||
export let title;
|
||||
export let title = undefined;
|
||||
export let label;
|
||||
export let icon;
|
||||
export let component = ToolStripButton;
|
||||
|
||||
function handleClick(e) {
|
||||
const rect = e.target.getBoundingClientRect();
|
||||
const rect = e.detail.target.getBoundingClientRect();
|
||||
const left = rect.left;
|
||||
const top = rect.bottom;
|
||||
currentDropDownMenu.set({ left, top, items: menu });
|
||||
@@ -19,4 +21,5 @@
|
||||
|
||||
<svelte:component this={component} {title} {icon} on:click={handleClick}>
|
||||
{label}
|
||||
<FontIcon icon="icon chevron-down" />
|
||||
</svelte:component>
|
||||
|
||||
Reference in New Issue
Block a user