From 5b70626cf78200433535cbc92faa77623f31a2bb Mon Sep 17 00:00:00 2001 From: zipg Date: Wed, 8 Jul 2026 12:10:46 +0800 Subject: [PATCH] =?UTF-8?q?Improve:=20=E7=BC=A9=E7=9F=AD=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=20JSON=20=E7=BC=96=E8=BE=91=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve: 调整格式化 JSON 编辑提示频率 * Improve: 减少格式化 JSON 编辑提示次数 --------- Co-authored-by: zipg <4047349+zipg@users.noreply.github.com> --- apps/desktop/src/components/grid/DataGrid.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 2682a1ae7..09de11f55 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -160,7 +160,7 @@ import { SearchableSelect } from "@/components/ui/searchable-select"; const SqlPreviewPanel = defineAsyncComponent(() => import("@/components/editor/SqlPreviewPanel.vue")); const FORMATTED_JSON_EDIT_WARNING_COUNT_STORAGE_KEY = "dbx-cell-detail-formatted-json-edit-warning-count"; -const FORMATTED_JSON_EDIT_WARNING_MAX_COUNT = 10; +const FORMATTED_JSON_EDIT_WARNING_MAX_COUNT = 3; const { t } = useI18n(); const slots = useSlots(); @@ -4987,7 +4987,7 @@ function warnFormattedJsonEditIfNeeded(detail: DataGridCellDetail, force = false if (!force && (!sideDetailJsonView.value || !detail.formattedJson)) return; const count = Number(safeLocalStorageGet(FORMATTED_JSON_EDIT_WARNING_COUNT_STORAGE_KEY)) || 0; if (count >= FORMATTED_JSON_EDIT_WARNING_MAX_COUNT) return; - toast(t("grid.formattedJsonEditWarning"), 10000); + toast(t("grid.formattedJsonEditWarning"), 6000); safeLocalStorageSet(FORMATTED_JSON_EDIT_WARNING_COUNT_STORAGE_KEY, String(count + 1)); }