From e22ecb5e75e86dcdd5ea203daaef7c6f85997d4c Mon Sep 17 00:00:00 2001
From: lcxadml <864255598@qq.com>
Date: Thu, 21 Mar 2024 17:05:14 +0800
Subject: [PATCH] feat: detail
---
web/components/chat/db-editor.tsx | 50 +++++++++++++++----------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/web/components/chat/db-editor.tsx b/web/components/chat/db-editor.tsx
index 0c8093cf8..8c4994bdb 100644
--- a/web/components/chat/db-editor.tsx
+++ b/web/components/chat/db-editor.tsx
@@ -60,18 +60,20 @@ function DbEditorContent({ editorValue, chartData, tableData, handleChange }: IP
return (
-
+
{tableData?.values?.length > 0 ? (
>((item) => ({
- key: item,
- dataIndex: item,
- label: item,
- }))}
+ columns={(tableData?.columns as any[]).map>((item) => {
+ return {
+ dataIndex: item,
+ title: item,
+ key: item,
+ };
+ })}
dataSource={tableData?.values}
/>
) : (
@@ -95,7 +97,7 @@ function DbEditor() {
const [newEditorValue, setNewEditorValue] = React.useState();
const [tableData, setTableData] = React.useState<{ columns: string[]; values: any }>();
const [currentTabIndex, setCurrentTabIndex] = React.useState();
- const [isMenuExpand, setIsMenuExpand] = useState(true);
+ const [isMenuExpand, setIsMenuExpand] = useState(false);
const searchParams = useSearchParams();
const id = searchParams?.get('id');
@@ -419,29 +421,27 @@ function DbEditor() {
return (
-
+
-
-
+