mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
execute query
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</script>
|
||||
|
||||
<div bind:clientWidth bind:clientHeight class="ace-container">
|
||||
<AceEditorCore {...$$props} width={clientWidth} height={clientHeight} on:input/>
|
||||
<AceEditorCore {...$$props} width={clientWidth} height={clientHeight} on:input on:focus on:blur />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<script lang="ts">
|
||||
import AceEditor from './AceEditor.svelte';
|
||||
export let engine;
|
||||
let domEditor;
|
||||
|
||||
let mode;
|
||||
|
||||
@@ -16,6 +17,10 @@
|
||||
const match = (engine || '').match(/^([^@]*)@/);
|
||||
mode = engineToMode[match ? match[1] : engine] || 'sql';
|
||||
}
|
||||
|
||||
export function getSelectedText() {
|
||||
return domEditor.getSelectedText()
|
||||
}
|
||||
</script>
|
||||
|
||||
<AceEditor {mode} {...$$props} on:input />
|
||||
<AceEditor {mode} {...$$props} on:input on:focus on:blur bind:this={domEditor}/>
|
||||
|
||||
Reference in New Issue
Block a user