From 191e6c692090d12ae39b232954eba098facc9ffa Mon Sep 17 00:00:00 2001 From: Cmen <1176967590@qq.com> Date: Mon, 17 Jan 2022 14:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor/Catalog/index.tsx | 7 +++++++ src/editor/Menu/index.tsx | 7 +++++++ src/editor/Plot/index.tsx | 7 +++++++ src/editor/Property/index.tsx | 7 +++++++ src/editor/index.less | 7 +++++++ src/editor/index.tsx | 21 +++++++++++++-------- src/index.tsx | 3 ++- 7 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 src/editor/Catalog/index.tsx create mode 100644 src/editor/Menu/index.tsx create mode 100644 src/editor/Plot/index.tsx create mode 100644 src/editor/Property/index.tsx diff --git a/src/editor/Catalog/index.tsx b/src/editor/Catalog/index.tsx new file mode 100644 index 0000000..0b328d9 --- /dev/null +++ b/src/editor/Catalog/index.tsx @@ -0,0 +1,7 @@ + + +const Catalog = () => { + return

属性区域

; +} + +export default Catalog; \ No newline at end of file diff --git a/src/editor/Menu/index.tsx b/src/editor/Menu/index.tsx new file mode 100644 index 0000000..6982a87 --- /dev/null +++ b/src/editor/Menu/index.tsx @@ -0,0 +1,7 @@ + + +const Menu = () => { + return

属性区域

; +} + +export default Menu; \ No newline at end of file diff --git a/src/editor/Plot/index.tsx b/src/editor/Plot/index.tsx new file mode 100644 index 0000000..77b4801 --- /dev/null +++ b/src/editor/Plot/index.tsx @@ -0,0 +1,7 @@ + + +const Plot = () => { + return

属性区域

; +} + +export default Plot; \ No newline at end of file diff --git a/src/editor/Property/index.tsx b/src/editor/Property/index.tsx new file mode 100644 index 0000000..51aa238 --- /dev/null +++ b/src/editor/Property/index.tsx @@ -0,0 +1,7 @@ + + +const Property = () => { + return

属性区域

; +} + +export default Property; \ No newline at end of file diff --git a/src/editor/index.less b/src/editor/index.less index 265de49..2d7af32 100644 --- a/src/editor/index.less +++ b/src/editor/index.less @@ -1,4 +1,11 @@ +.editor-main{ + height: 100%; +} +.editor-header, .editor-body-left, .editor-body-right{ + background-color: #fff; +} + #mapStage{ height: 100%; } \ No newline at end of file diff --git a/src/editor/index.tsx b/src/editor/index.tsx index 0a1552e..7df82c4 100644 --- a/src/editor/index.tsx +++ b/src/editor/index.tsx @@ -1,15 +1,20 @@ import { useEffect, useRef } from "react"; +import { Layout } from "antd"; import { MapStage } from "../mapStage"; import "./index.less"; -export const Editor = () => { - const mapStageRef = useRef(null); - - useEffect(() => { - const mapStage = new MapStage(mapStageRef.current!); - mapStage.init(); - }); +const { Header, Footer, Sider, Content } = Layout; - return
+export const Editor = () => { + return ( + +
header
+ + Sider + Content + Sider + +
+ ); } \ No newline at end of file diff --git a/src/index.tsx b/src/index.tsx index dc87461..428bbb1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,9 +1,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import 'antd/dist/antd.css'; + import { store, StoreContext } from './store'; import { Editor } from './editor'; - import './index.less'; ReactDOM.render(