25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(grid): smooth canvas horizontal scroll
t8y2c1280511ae7e
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vueindex dc2d29ddc6..0d07369eab 100644--- a/apps/desktop/src/components/grid/DataGrid.vue+++ b/apps/desktop/src/components/grid/DataGrid.vue@@ -4195,20 +4195,31 @@ function onCanvasScroll(event: Event) {const scrollLeft = scroller.scrollLeft;const viewportWidth = scroller.clientWidth;const viewportHeight = scroller.clientHeight;+ const scrollTopChanged = canvasScrollTop.value !== scrollTop;+ const viewportHeightChanged = canvasViewportHeight.value !== viewportHeight;+ const scrollLeftChanged = gridHorizontalScrollLeft.value !== scrollLeft;+ const viewportWidthChanged = gridViewportWidth.value !== viewportWidth || canvasViewportWidth.value !== viewportWidth;+if (canvasScrollTop.value !== scrollTop) canvasScrollTop.value = scrollTop;if (canvasViewportWidth.value !== viewportWidth) canvasViewportWidth.value = viewportWidth;if (canvasViewportHeight.value !== viewportHeight) canvasViewportHeight.value = viewportHeight;- if (gridHorizontalScrollLeft.value !== scrollLeft || gridViewportWidth.value !== viewportWidth) {- updateGridHorizontalViewport(scroller);+ if (scrollLeftChanged || viewportWidthChanged) {+ gridHorizontalScrollLeft.value = scrollLeft;+ gridViewportWidth.value = viewportWidth;+ updateGridHorizontalScrollbar(scroller);+ }+ if (scrollTopChanged || viewportHeightChanged) {+ updateGridVerticalScrollbar(scroller);+ maybeCheckInfiniteScroll(scroller);+ }+ if (viewportWidthChanged || viewportHeightChanged) {+ const gutter = scrollbarGutterWidth(scroller);+ if (gridScrollbarGutter.value !== gutter) gridScrollbarGutter.value = gutter;}- updateGridVerticalScrollbar(scroller);- const gutter = scrollbarGutterWidth(scroller);- if (gridScrollbarGutter.value !== gutter) gridScrollbarGutter.value = gutter;if (headerRef.value && headerRef.value.scrollLeft !== scrollLeft) headerRef.value.scrollLeft = scrollLeft;recordScrollPosition({ top: scrollTop, left: scrollLeft });markGridScrolling();scheduleCanvasDraw();- maybeCheckInfiniteScroll(scroller);}function canvasWheelDeltaToPixels(delta: number, deltaMode: number, pageSize: number): number {@@ -4220,7 +4231,7 @@ function canvasWheelDeltaToPixels(delta: number, deltaMode: number, pageSize: nufunction shouldAccelerateCanvasWheel(event: WheelEvent): boolean {if (event.ctrlKey || event.metaKey) return false;if (event.deltaMode !== WheelEvent.DOM_DELTA_PIXEL) return true;- return Math.abs(event.deltaY) >= CANVAS_TRACKPAD_DELTA_THRESHOLD || Math.abs(event.deltaX) >= CANVAS_TRACKPAD_DELTA_THRESHOLD;+ return event.shiftKey && Math.abs(event.deltaY) > Math.abs(event.deltaX) && Math.abs(event.deltaY) >= CANVAS_TRACKPAD_DELTA_THRESHOLD;}function onCanvasWheel(event: WheelEvent) {