Explorar el Código

Merge branch 'master' of http://git.ycjcjy.com/honghe/h5-draw-lots

Baozhangchao hace 3 años
padre
commit
4147bd9318
Se han modificado 2 ficheros con 41 adiciones y 34 borrados
  1. 40
    33
      public/index.html
  2. 1
    1
      src/utils/index.js

+ 40
- 33
public/index.html Ver fichero

@@ -1,37 +1,44 @@
1 1
 <!DOCTYPE html>
2 2
 <html lang="">
3
+  <head>
4
+    <meta charset="utf-8">
5
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
+    <title><%= htmlWebpackPlugin.options.title %></title>
9
+    <style>
10
+      .page-loading-wrapper {
11
+        position: absolute;
12
+        left: 0;
13
+        top: 0;
14
+        width: 100vw;
15
+        height: 100vh;
16
+        overflow: hidden;
17
+        z-index: 999;
18
+      }
3 19
 
4
-<head>
5
-  <meta charset="utf-8">
6
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
-  <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
-  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
-  <title>
10
-    <%= htmlWebpackPlugin.options.title %>
11
-  </title>
12
-  <style>
13
-    .mainloading {
14
-      position: absolute;
15
-      left: 0;
16
-      top: 0;
17
-      width: 100vw;
18
-      height: 100vh;
19
-      overflow: hidden;
20
+      .page-loading {
21
+        width: 100%;
22
+        height: 100%;
23
+        background: #262626 url('./loading.gif') no-repeat center center;
24
+        animation: loadingrotate 2s linear infinite;
25
+      }
20 26
 
21
-      background: #262626 url('./loading.gif') no-repeat center center;
22
-      z-index: 999;
23
-    }
24
-  </style>
25
-</head>
26
-
27
-<body>
28
-  <noscript>
29
-    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
30
-        Please enable it to continue.</strong>
31
-  </noscript>
32
-  <div class="mainloading"></div>
33
-  <div id="app"></div>
34
-  <!-- built files will be auto injected -->
35
-</body>
36
-
37
-</html>
27
+      @keyframes loadingrotate {
28
+        100% {
29
+          transform:rotate(360deg);
30
+        }
31
+      }
32
+    </style>
33
+  </head>
34
+  <body>
35
+    <noscript>
36
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
37
+    </noscript>
38
+    <div class="page-loading-wrapper">
39
+      <div class="page-loading"></div> 
40
+    </div>
41
+    <div id="app"></div>
42
+    <!-- built files will be auto injected -->
43
+  </body>
44
+</html>

+ 1
- 1
src/utils/index.js Ver fichero

@@ -1,4 +1,4 @@
1 1
 
2 2
 export function hideLoading() {
3
-  document.getElementsByClassName('mainloading')[0].style="display: none"
3
+  document.getElementsByClassName('page-loading-wrapper')[0].style="display: none"
4 4
 }