From fe25f91ab02b662440f071ab83e6e4c794ce3d29 Mon Sep 17 00:00:00 2001 From: watchingfun Date: Wed, 17 Jan 2024 11:25:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=AE=B9=E5=99=A8=E6=94=B9=E4=B8=BA=E5=8F=AF=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E7=9A=84=E5=88=86=E5=89=B2=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 ++ src/App.vue | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 57dcdd8..e42190c 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,12 @@ "@ant-design/icons-vue": "^6.1.0", "ant-design-vue": "^3.2.3", "monaco-editor": "^0.33.0", + "splitpanes": "^3.1.5", "sql-formatter": "^4.0.2", "vue": "^3.2.25" }, "devDependencies": { + "@types/splitpanes": "^2.2.6", "@typescript-eslint/eslint-plugin": "^5.23.0", "@typescript-eslint/parser": "^5.23.0", "@vitejs/plugin-vue": "^2.3.1", diff --git a/src/App.vue b/src/App.vue index 4a28cc6..d8ac32c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,8 @@ import { onMounted, ref, toRaw } from "vue"; import * as monaco from "monaco-editor"; import { format } from "sql-formatter"; import { GithubOutlined } from "@ant-design/icons-vue"; +import { Splitpanes, Pane } from "splitpanes"; +import "splitpanes/dist/splitpanes.css"; import EditorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker"; import JsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker"; @@ -137,22 +139,22 @@ onMounted(() => {
- - + +
- - + +
- - + +
yupi:你能体会手写一句 3000 行的 SQL、牵一发而动全身的恐惧么? From e73b6a96c8898137035aec290120d93127ade93f Mon Sep 17 00:00:00 2001 From: watchingfun Date: Wed, 17 Jan 2024 11:27:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=86=E5=89=B2=E6=94=B9=E4=B8=BA=E6=AD=A3=E5=88=99=E5=88=86?= =?UTF-8?q?=E5=89=B2=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=8F=82=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E4=B8=BA=E2=80=9C=3D=E2=80=9D=E5=BC=80=E5=A4=B4=E6=97=B6?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=80=BC=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/generator/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator/index.ts b/src/generator/index.ts index aa0f9f0..a9897c4 100644 --- a/src/generator/index.ts +++ b/src/generator/index.ts @@ -156,7 +156,7 @@ function replaceSubSql( const params: Record = {}; for (const singleParamsStr of singleParamsStrArray) { // 必须分成 2 段 - const keyValueArray = singleParamsStr.split("=", 2); + const keyValueArray = singleParamsStr.split(/=(.+)/, 2); if (keyValueArray.length < 2) { continue; } From 5b79d2ff8425f868756948b103264aa1b2b5a59b Mon Sep 17 00:00:00 2001 From: watchingfun Date: Wed, 17 Jan 2024 11:29:17 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=A0=91=E7=9A=84=E8=8A=82=E7=82=B9=E8=AF=A6=E6=83=85=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E7=82=B9=E5=87=BB=E6=89=93=E5=BC=80=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=BB=9A=E5=8A=A8=E6=9D=A1=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=BF=87=E9=95=BF=E5=AF=BC=E8=87=B4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchableTree.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/SearchableTree.vue b/src/components/SearchableTree.vue index c66dec9..cb02c8b 100644 --- a/src/components/SearchableTree.vue +++ b/src/components/SearchableTree.vue @@ -14,9 +14,15 @@ @expand="onExpand" >