Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

1. 修复 ORDER BY watch 重复数组 2. WHERE / ORDER BY 输入框 @blur 处理

rarnuc6aa0cf84f94
diff --git a/src/components/grid/DataGrid.vue b/src/components/grid/DataGrid.vue
index 941e392022..17072dc0cd 100644
--- a/src/components/grid/DataGrid.vue
+++ b/src/components/grid/DataGrid.vue
@@ -512,7 +512,7 @@ watch(orderByInput, (val) => {
const trimmed = val.trim();
if (trimmed.length === 0) return;
const lastToken = trimmed.split(/[\s,()]+/).pop() || "";
- if (lastToken.length > 0 && !["asc", "desc", "asc", "desc"].includes(lastToken.toLowerCase())) {
+ if (lastToken.length > 0 && !["asc", "desc"].includes(lastToken.toLowerCase())) {
const tl = lastToken.toLowerCase();
orderBySuggestions.value = props.tableMeta.columns
.map((c) => c.name)
@@ -1725,6 +1725,7 @@ defineExpose({
placeholder="id > 100"
@keydown="onWhereFilterKeydown"
@click="updateWhereSuggestionPosition"
+ @blur="dismissWhereSuggestions"
/>
<span
ref="whereMeasureRef"
@@ -1775,6 +1776,7 @@ defineExpose({
placeholder="column desc"
@keydown="onOrderByKeydown"
@click="updateOrderBySuggestionPosition"
+ @blur="dismissOrderBySuggestions"
/>
<span
ref="orderByMeasureRef"