feat: 新手指引添加遮罩

This commit is contained in:
wenbo.dong 2017-09-29 14:44:00 +08:00
parent 5185774cbe
commit af28b43421
2 changed files with 17 additions and 2 deletions

View File

@ -17,7 +17,8 @@ const LOADING_STATUS = 0;
@connect(
state => {
return {
loginState: state.user.loginState
loginState: state.user.loginState,
study: state.user.study
};
},
{
@ -34,7 +35,8 @@ export default class App extends Component {
static propTypes = {
checkLoginState: PropTypes.func,
loginState: PropTypes.number
loginState: PropTypes.number,
study: PropTypes.bool
};
@ -49,6 +51,8 @@ export default class App extends Component {
} else {
r = (
<Router getUserConfirmation={(msg, callback) => {
// 自定义 window.confirm
// http://reacttraining.cn/web/api/BrowserRouter/getUserConfirmation-func
let container = document.createElement('div');
document.body.appendChild(container);
ReactDOM.render((
@ -69,6 +73,7 @@ export default class App extends Component {
</div>
</div>
<Footer/>
{!this.props.study ? <div className="study-mask"></div> : null}
</div>
</Router>

View File

@ -190,3 +190,13 @@ em {
}
}
}
.study-mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,.2);
z-index: 1;
}