import { observer } from "mobx-react"; import { WeaAlertPage, WeaLocaleProvider } from "ecCom"; import { Spin } from "antd"; const getLabel = WeaLocaleProvider.getLabel; @observer export default class Authority extends React.Component { render() { const { store } = this.props; const { loading, hasRight } = store; const style = { position: "absolute", top: "50%", left: "50%", marginLeft: -16, marginTop: -16 }; if (loading) { return (
); } if (hasRight) { return this.props.children; } else { return (
{getLabel(2012, "对不起,您暂时没有权限!")}
); } } }