From 83c548d3dba59aaed9b52b5d413c6912a87d2efc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 16 六月 2024 15:50:14 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/home/index.jsx | 41 +++++++++++++++++++++++++++++++----------
1 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/zy-asrs-flow/src/pages/home/index.jsx b/zy-asrs-flow/src/pages/home/index.jsx
index cbfa9c0..780dccf 100644
--- a/zy-asrs-flow/src/pages/home/index.jsx
+++ b/zy-asrs-flow/src/pages/home/index.jsx
@@ -1,11 +1,32 @@
-import ProSkeleton from '@ant-design/pro-skeleton';
+import React, { useEffect, useRef, useState } from "react";
+import { Graph, Shape } from "@antv/x6";
+import { GraphComponent } from "../../components/Flow/GraphComponent";
+import { GraphTools } from "../../components/Flow/GraphTools";
+import { RightMenu } from "../../components/Flow/RightMenu";
+import { GraphDrawer } from "../../components/Flow/GraphDrawer";
+import './index.less';
-export default () => (
- <div
- style={{
- padding: 24,
- }}
- >
- <ProSkeleton type="list" />
- </div>
-);
\ No newline at end of file
+export default function () {
+ const graphRef = useRef(null);
+ const [ready, setReady] = useState(false);
+
+ const initHandle = () => {
+ setReady(true);
+ }
+
+ useEffect(() => {
+ if (ready) {
+ // 浣犻渶瑕佸湪loading鐘舵�佹敼鍙樺悗鎵ц鐨勪唬鐮�
+ console.log('graphRef is ready:', graphRef.current);
+ }
+ }, [ready]);
+
+ return (
+ <div className="stencil-app">
+ <GraphTools isReady={ready} graphRef={graphRef} />
+ <GraphComponent ref={graphRef} initHandle={initHandle} />
+ <RightMenu isReady={ready} graphRef={graphRef} />
+ <GraphDrawer isReady={ready} graphRef={graphRef} />
+ </div>
+ );
+}
\ No newline at end of file
--
Gitblit v1.9.1