diff --git a/src/editor/Menu/File.tsx b/src/editor/Menu/File.tsx new file mode 100644 index 0000000..2e0b34e --- /dev/null +++ b/src/editor/Menu/File.tsx @@ -0,0 +1,19 @@ +import MenuGroup from "./MenuGroup"; + +const FileMenu = () => { + const openGeoJSON = () => {}; + return ( + + ); +}; + +export default FileMenu; diff --git a/src/editor/Menu/MenuGroup.tsx b/src/editor/Menu/MenuGroup.tsx new file mode 100644 index 0000000..1fd9570 --- /dev/null +++ b/src/editor/Menu/MenuGroup.tsx @@ -0,0 +1,29 @@ +import { Menu, Dropdown } from "antd"; + +export type MenuItemConfig = { + name: string; + onClick: () => void; +}; + +export type MenuConfig = { + name: string; + items: MenuItemConfig[]; +}; + +const MenuGroup = (props: MenuConfig) => { + const menu = ( + + {props.items.map((item, index) => ( + {item.name} + ))} + + ); + + return ( + + {props.name} + + ); +}; + +export default MenuGroup; diff --git a/src/editor/Menu/index.tsx b/src/editor/Menu/index.tsx index 2845fc5..673dde1 100644 --- a/src/editor/Menu/index.tsx +++ b/src/editor/Menu/index.tsx @@ -1,5 +1,13 @@ +import FileMenu from "./File"; + +import "./style.less"; + const Menu = () => { - return

属性区域

; + return ( + <> + + + ); }; export default Menu; diff --git a/src/editor/Menu/style.less b/src/editor/Menu/style.less new file mode 100644 index 0000000..0fd7580 --- /dev/null +++ b/src/editor/Menu/style.less @@ -0,0 +1,3 @@ +.menu-title{ + cursor: pointer; +} \ No newline at end of file diff --git a/src/editor/index.tsx b/src/editor/index.tsx index fb73855..67fb957 100644 --- a/src/editor/index.tsx +++ b/src/editor/index.tsx @@ -1,21 +1,31 @@ import { useEffect, useRef } from "react"; import { Layout } from "antd"; -import "./index.less"; import Plot from "./Plot"; +import Menu from "./Menu"; +import Catalog from "./Catalog"; +import Property from "./Property"; + +import "./index.less"; const { Header, Footer, Sider, Content } = Layout; export const Editor = () => { return ( -
header
+
+ +
- Sider + + + - Sider + + +
);