import { observer } from "mobx-react"; import { observable, action, computed } from "mobx"; import { Icon } from 'antd'; import { WeaLocaleProvider } from "ecCom"; const getLabel = WeaLocaleProvider.getLabel; export const RightMenu = observer(({ store, onToggleChildren,menus }) => { const { left, top, visible, hasChild, childVisible, isRoot } = store; // console.log(data); return (
) }); export class RightMenuStore { @observable visible = false; @observable left = 0; @observable top = 0; @observable isRoot = false; @observable hasChild = false; @observable childVisible = false; @action show = (left, top, isRoot, hasChild, childVisible) => { this.visible = true; this.left = left; this.top = top; this.isRoot = isRoot; this.hasChild = hasChild; this.childVisible = childVisible; } @action hide = () => { this.visible = false; } @action position = (left, top) => { this.left = left; this.top = top; } }