mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 05:56:00 +00:00
SYNC: settings permissions
This commit is contained in:
committed by
Diflow
parent
3ca514c85b
commit
8ced6aa205
@@ -8,10 +8,11 @@
|
||||
component?: any;
|
||||
props?: any;
|
||||
testid?: string;
|
||||
identifier?: string;
|
||||
}
|
||||
|
||||
export let tabs: TabDef[];
|
||||
export let value = 0;
|
||||
export let value: string | number = 0;
|
||||
export let menu = null;
|
||||
export let isInline = false;
|
||||
export let containerMaxWidth = undefined;
|
||||
@@ -36,10 +37,10 @@
|
||||
{#each _.compact(tabs) as tab, index}
|
||||
<div
|
||||
class="tab-item"
|
||||
class:selected={value == index}
|
||||
class:selected={value == (tab.identifier ?? index)}
|
||||
on:click={() => {
|
||||
value = index;
|
||||
onUserChange?.(index);
|
||||
value = tab.identifier ?? index;
|
||||
onUserChange?.(tab.identifier ?? index);
|
||||
}}
|
||||
data-testid={tab.testid}
|
||||
>
|
||||
@@ -60,14 +61,14 @@
|
||||
class:flexColContainer
|
||||
class:maxHeight100
|
||||
class:isInline
|
||||
class:tabVisible={index == value}
|
||||
class:tabVisible={(tab.identifier ?? index) == value}
|
||||
style:max-width={containerMaxWidth}
|
||||
>
|
||||
<svelte:component
|
||||
this={tab.component}
|
||||
{...tab.props}
|
||||
tabVisible={index == value}
|
||||
tabControlHiddenTab={index != value}
|
||||
tabVisible={(tab.identifier ?? index) == value}
|
||||
tabControlHiddenTab={(tab.identifier ?? index) != value}
|
||||
/>
|
||||
{#if tab.slot != null}
|
||||
{#if tab.slot == 0}<slot name="0" />
|
||||
|
||||
Reference in New Issue
Block a user