Explorar o código

bugfix: remove unuse style and add IE11 style

close #5762
chenshuai2144 %!s(int64=6) %!d(string=hai) anos
pai
achega
38cdd7edce
Modificáronse 3 ficheiros con 9 adicións e 16 borrados
  1. 1 1
      package.json
  2. 7 5
      src/global.less
  3. 1 10
      src/layouts/BlankLayout.tsx

+ 1 - 1
package.json

@@ -58,7 +58,7 @@
     "not ie <= 10"
   ],
   "dependencies": {
-    "@ant-design/pro-layout": "^4.8.7",
+    "@ant-design/pro-layout": "^4.9.11",
     "@antv/data-set": "^0.10.2",
     "antd": "^3.23.6",
     "classnames": "^2.2.6",

+ 7 - 5
src/global.less

@@ -24,11 +24,6 @@ body {
   -moz-osx-font-smoothing: grayscale;
 }
 
-.ant-pro-basicLayout {
-  width: 100%;
-  height: 100%;
-}
-
 ul,
 ol {
   list-style: none;
@@ -50,3 +45,10 @@ ol {
     }
   }
 }
+
+// 兼容IE11
+@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
+  body .ant-design-pro > .ant-layout {
+    min-height: 100vh;
+  }
+}

+ 1 - 10
src/layouts/BlankLayout.tsx

@@ -1,14 +1,5 @@
 import React from 'react';
 
-const Layout: React.FC = ({ children }) => (
-  <div
-    style={{
-      width: '100vw',
-      height: '100vh',
-    }}
-  >
-    {children}
-  </div>
-);
+const Layout: React.FC = ({ children }) => <>{children}</>;
 
 export default Layout;