add 文件管理
This commit is contained in:
@@ -46,7 +46,6 @@ const { getState, subscribe } = store
|
||||
const stroePath = 'user'
|
||||
|
||||
export default class Auth extends Component {
|
||||
|
||||
state = getState(stroePath)
|
||||
|
||||
constructor(props) {
|
||||
@@ -62,11 +61,10 @@ export default class Auth extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const flag = auth.call(this.state, this.props.auth)
|
||||
|
||||
if (flag) {
|
||||
return this.props.children
|
||||
return this.props.children || <></>
|
||||
}
|
||||
|
||||
return <></>
|
||||
|
||||
Reference in New Issue
Block a user