fix(editor): keep scroll after canceling dangerous sql

This commit is contained in:
jearhe authored and GitHub committed 2026-09-01 12:16:59 +08:00
1 parent a751b5690b
commit 694611aade
9 files changed
+215 -11

No files matched your search

@@ -1139,6 +1139,10 @@ function acceptQueryEditorExecutionViewport(requestId: number) {
return queryEditorRef.value?.acceptGutterExecutionViewport(requestId) ?? false;
}
function cancelQueryEditorExecutionViewport(requestId: number) {
return queryEditorRef.value?.cancelGutterExecutionViewport(requestId) ?? false;
}
async function handleExportQuery(payload: { sql: string; format: "csv" | "xlsx" | "txt"; columnComments?: (string | null)[] }) {
const tab = props.activeTab;
if (!tab || tab.mode !== "query") return;
@@ -1183,6 +1187,7 @@ defineExpose({
requestQueryEditorExecuteInNewResultTab,
shouldBlockQueryEditorExecutionShortcut,
acceptQueryEditorExecutionViewport,
cancelQueryEditorExecutionViewport,
pasteClipboardAsSqlInCondition,
applyTableStructureChanges,
insertRedisCommand,