瀏覽代碼

Move style to Exception css

afc163 7 年之前
父節點
當前提交
5b24b0e3ff

+ 1 - 1
src/components/Authorized/Secured.js

@@ -5,7 +5,7 @@ import CheckPermissions from './CheckPermissions';
  * 默认不能访问任何页面
  * default is "NULL"
  */
-const Exception403 = () => <Exception type="403" style={{ minHeight: 500, height: '80%' }} />;
+const Exception403 = () => <Exception type="403" />;
 
 // Determine whether the incoming component has been instantiated
 // AuthorizedRoute is already instantiated

+ 2 - 1
src/components/Exception/index.less

@@ -3,7 +3,8 @@
 .exception {
   display: flex;
   align-items: center;
-  height: 100%;
+  height: 80%;
+  min-height: 500px;
 
   .imgBlock {
     flex: 0 0 62.5%;

+ 1 - 1
src/pages/404.js

@@ -3,5 +3,5 @@ import Link from 'umi/link';
 import Exception from '@/components/Exception';
 
 export default () => (
-  <Exception type="404" style={{ minHeight: 500, height: '80%' }} linkElement={Link} />
+  <Exception type="404" linkElement={Link} />
 );

+ 0 - 1
src/pages/Authorized.js

@@ -22,7 +22,6 @@ export default ({ children, route, location }) => {
     <Exception
       type="403"
       desc={formatMessage({ id: 'app.exception.description.403' }, {})}
-      style={{ minHeight: 500, height: '80%' }}
       linkElement={Link}
       backText={formatMessage({ id: 'app.exception.back' })}
     />

+ 0 - 1
src/pages/Exception/403.js

@@ -7,7 +7,6 @@ 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' })}
   />

+ 0 - 1
src/pages/Exception/404.js

@@ -7,7 +7,6 @@ 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' })}
   />

+ 0 - 1
src/pages/Exception/500.js

@@ -7,7 +7,6 @@ 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' })}
   />