mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 07:16:01 +00:00
view table list in database widget
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
<script lang="ts">
|
||||
export let component;
|
||||
export let data;
|
||||
export let subItemsComponent;
|
||||
export let expandOnClick;
|
||||
|
||||
let isExpanded = false;
|
||||
|
||||
function handleExpand() {
|
||||
if (subItemsComponent && expandOnClick) {
|
||||
isExpanded = !isExpanded;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:component this={component} {data} />
|
||||
<svelte:component this={component} {data} on:click={handleExpand} />
|
||||
|
||||
{#if isExpanded && subItemsComponent}
|
||||
<svelte:component this={subItemsComponent} {data} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user