diff --git a/src/components/diagram_overview.jsx b/src/components/diagram_overview.jsx
new file mode 100644
index 0000000..fc4bc7b
--- /dev/null
+++ b/src/components/diagram_overview.jsx
@@ -0,0 +1,117 @@
+import React from "react";
+import { sqlDataTypes } from "../data/data";
+import {
+ Collapse,
+ Input,
+ Row,
+ Col,
+ Form,
+ Button,
+ Card,
+ TextArea,
+} from "@douyinfe/semi-ui";
+import {
+ IconMore,
+ IconKeyStroked,
+ IconColorPalette,
+} from "@douyinfe/semi-icons";
+
+export default function DiagramOverview(props) {
+ return (
+
+ {props.tables.map((t, i) => (
+
+
+
+ }
+ itemKey={`${i}`}
+ >
+
+
+
+
+ indices
+
+
+
+
+
+
+
+
+
+
+
+
+ }>
+
+
+
+
+
+
+
+
+
+ ))}
+
+ );
+}
diff --git a/src/components/editor_panel.jsx b/src/components/editor_panel.jsx
index 3ba8743..13d2a95 100644
--- a/src/components/editor_panel.jsx
+++ b/src/components/editor_panel.jsx
@@ -10,6 +10,7 @@ import html2canvas from "html2canvas";
import { Parser } from "node-sql-parser";
import { Tabs } from "@douyinfe/semi-ui";
import "react-resizable/css/styles.css";
+import DiagramOverview from "./diagram_overview";
const myTheme = createTheme({
dark: "light",
@@ -26,16 +27,18 @@ const myTheme = createTheme({
});
export default function EditorPanel(props) {
- const [tab, setTab] = useState(1);
+ const [tab, setTab] = useState("1");
const map = useRef(new Map());
const tabList = [
- { tab: "Overview", itemKey: 1 },
- { tab: "Shapes", itemKey: 2 },
- { tab: "Editor", itemKey: 3 },
+ { tab: "Overview", itemKey: "1" },
+ { tab: "Shapes", itemKey: "2" },
+ { tab: "Editor", itemKey: "3" },
];
const contentList = [
-
Overview
,
+
+
+
,
,
@@ -54,10 +57,11 @@ export default function EditorPanel(props) {
return (
@@ -69,7 +73,7 @@ export default function EditorPanel(props) {
setTab(key);
}}
>
- {contentList[tab -1]}
+ {contentList[parseInt(tab) - 1]}