From 659a6fdecfa5bb4aa24d5adcc1bc33c8be26941d Mon Sep 17 00:00:00 2001 From: tengge1 <930372551@qq.com> Date: Sun, 12 May 2019 14:35:50 +0800 Subject: [PATCH] LightMenu --- ShadowEditor.UI/src/editor/MenuBar.jsx | 3 +- ShadowEditor.UI/src/editor/menu/LightMenu.jsx | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ShadowEditor.UI/src/editor/menu/LightMenu.jsx diff --git a/ShadowEditor.UI/src/editor/MenuBar.jsx b/ShadowEditor.UI/src/editor/MenuBar.jsx index 5604cf61..f0d33922 100644 --- a/ShadowEditor.UI/src/editor/MenuBar.jsx +++ b/ShadowEditor.UI/src/editor/MenuBar.jsx @@ -6,6 +6,7 @@ import SceneMenu from './menu/SceneMenu.jsx'; import EditMenu from './menu/EditMenu.jsx'; import TwoDMenu from './menu/TwoDMenu.jsx'; import GeometryMenu from './menu/GeometryMenu.jsx'; +import LightMenu from './menu/LightMenu.jsx'; /** * 菜单栏 @@ -22,7 +23,7 @@ class MenuBar extends React.Component { - + diff --git a/ShadowEditor.UI/src/editor/menu/LightMenu.jsx b/ShadowEditor.UI/src/editor/menu/LightMenu.jsx new file mode 100644 index 00000000..6aff3543 --- /dev/null +++ b/ShadowEditor.UI/src/editor/menu/LightMenu.jsx @@ -0,0 +1,42 @@ +import PropTypes from 'prop-types'; +import MenuItem from '../../menu/MenuItem.jsx'; +import MenuItemSeparator from '../../menu/MenuItemSeparator.jsx'; + +/** + * 光源菜单 + * @author tengge / https://github.com/tengge1 + * @property {String} className 样式类 + * @property {Object} style 样式 + */ +class LightMenu extends React.Component { + constructor(props) { + super(props); + + this.handleClick = this.handleClick.bind(this); + } + + handleClick(event) { + event.stopPropagation(); + alert('Hello, world!'); + } + + render() { + const { className, style } = this.props; + + return + + + + + + + ; + } +} + +LightMenu.propTypes = { + className: PropTypes.string, + style: PropTypes.object, +}; + +export default LightMenu; \ No newline at end of file