| | |
| | | |
| | | componentDidMount () { |
| | | this.loadHomeConfig() |
| | | if (this.props.permMenus.length > 0 && JSON.stringify(this.props.permAction) !== '{}') { |
| | | this.setState({ |
| | | waiting: false |
| | | }) |
| | | } |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | |
| | | if (loading || waiting) { |
| | | return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>) |
| | | } else if (view === 'custom') { |
| | | return (<CustomPage MenuID={this.props.MenuID}/>) |
| | | return (<CustomPage MenuID={this.props.MenuID} MenuName="首页"/>) |
| | | } else { |
| | | return (<DefaultHome />) |
| | | } |