mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 15:16:01 +00:00
show changeset in json view
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
import { getContext, setContext } from 'svelte';
|
||||
import contextKey from './context';
|
||||
import JSONArrow from './JSONArrow.svelte';
|
||||
import JSONNode from './JSONNode.svelte';
|
||||
import JSONKey from './JSONKey.svelte';
|
||||
@@ -12,8 +11,8 @@
|
||||
export let getPreviewValue = getValue;
|
||||
export let expanded = false, expandable = true;
|
||||
|
||||
const context = getContext(contextKey);
|
||||
setContext(contextKey, { ...context, colon })
|
||||
const context = getContext('json-tree-context-key');
|
||||
setContext('json-tree-context-key', { ...context, colon })
|
||||
|
||||
$: slicedKeys = expanded ? keys: previewKeys.slice(0, 5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user