7 changed files with 40 additions and 76 deletions
@ -1,21 +0,0 @@ |
|||
const path = require('path'); |
|||
|
|||
module.exports = { |
|||
plugins: [ |
|||
[ |
|||
'module-resolver', |
|||
{ |
|||
alias: { |
|||
components: path.join(__dirname, './src/components'), |
|||
}, |
|||
}, |
|||
], |
|||
[ |
|||
'import', |
|||
{ |
|||
libraryName: 'antd', |
|||
style: true, // or 'css'
|
|||
}, |
|||
], |
|||
], |
|||
}; |
|||
@ -1,12 +1,8 @@ |
|||
import React from 'react'; |
|||
import CheckPermissions from './CheckPermissions'; |
|||
|
|||
class Authorized extends React.Component { |
|||
render() { |
|||
const { children, authority, noMatch = null } = this.props; |
|||
const childrenRender = typeof children === 'undefined' ? null : children; |
|||
return CheckPermissions(authority, childrenRender, noMatch); |
|||
} |
|||
} |
|||
const Authorized = ({ children, authority, noMatch = null }) => { |
|||
const childrenRender = typeof children === 'undefined' ? null : children; |
|||
return CheckPermissions(authority, childrenRender, noMatch); |
|||
}; |
|||
|
|||
export default Authorized; |
|||
|
|||
@ -1,19 +1,16 @@ |
|||
import React, { Component } from 'react'; |
|||
import React from 'react'; |
|||
import { formatMessage } from 'umi/locale'; |
|||
import Link from 'umi/link'; |
|||
import Exception from '@/components/Exception'; |
|||
|
|||
class Exception403 extends Component { |
|||
render() { |
|||
return ( |
|||
<Exception |
|||
type="403" |
|||
desc={formatMessage({ id: 'app.exception.description.403' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
} |
|||
} |
|||
const Exception403 = () => ( |
|||
<Exception |
|||
type="403" |
|||
desc={formatMessage({ id: 'app.exception.description.403' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
|
|||
export default Exception403; |
|||
|
|||
@ -1,19 +1,16 @@ |
|||
import React, { Component } from 'react'; |
|||
import React from 'react'; |
|||
import { formatMessage } from 'umi/locale'; |
|||
import Link from 'umi/link'; |
|||
import Exception from '@/components/Exception'; |
|||
|
|||
class Exception404 extends Component { |
|||
render() { |
|||
return ( |
|||
<Exception |
|||
type="404" |
|||
desc={formatMessage({ id: 'app.exception.description.404' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
} |
|||
} |
|||
const Exception404 = () => ( |
|||
<Exception |
|||
type="404" |
|||
desc={formatMessage({ id: 'app.exception.description.404' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
|
|||
export default Exception404; |
|||
|
|||
@ -1,19 +1,16 @@ |
|||
import React, { Component } from 'react'; |
|||
import React from 'react'; |
|||
import { formatMessage } from 'umi/locale'; |
|||
import Link from 'umi/link'; |
|||
import Exception from '@/components/Exception'; |
|||
|
|||
class Exception500 extends Component { |
|||
render() { |
|||
return ( |
|||
<Exception |
|||
type="500" |
|||
desc={formatMessage({ id: 'app.exception.description.500' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
} |
|||
} |
|||
const Exception500 = () => ( |
|||
<Exception |
|||
type="500" |
|||
desc={formatMessage({ id: 'app.exception.description.500' }, {})} |
|||
style={{ minHeight: 500, height: '80%' }} |
|||
linkElement={Link} |
|||
backText={formatMessage({ id: 'app.exception.back' })} |
|||
/> |
|||
); |
|||
|
|||
export default Exception500; |
|||
|
|||
Loading…
Reference in new issue