mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 21:26:00 +00:00
Refactor DbKeyItemDetail and DbKeyValueDetail for improved layout and editor responsiveness
This commit is contained in:
@@ -28,9 +28,9 @@
|
||||
.props {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,14 +31,16 @@
|
||||
</div>
|
||||
<div class="colvalue">
|
||||
{#if display == 'text'}
|
||||
<AceEditor
|
||||
readOnly={!onChangeValue}
|
||||
{value}
|
||||
mode={keyType === 'JSON' ? 'json' : undefined}
|
||||
on:input={e => {
|
||||
onChangeValue?.(e.detail);
|
||||
}}
|
||||
/>
|
||||
<div class="editor-wrapper">
|
||||
<AceEditor
|
||||
readOnly={!onChangeValue}
|
||||
{value}
|
||||
mode={keyType === 'JSON' ? 'json' : undefined}
|
||||
on:input={e => {
|
||||
onChangeValue?.(e.detail);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if display == 'json'}
|
||||
<div class="outer">
|
||||
@@ -66,6 +68,13 @@
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.editor-wrapper {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
min-height: 60px;
|
||||
max-height: 1000px;
|
||||
}
|
||||
|
||||
.outer {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user