Kaynağa Gözat

仅在登录页显示版本

Michael Wang 6 yıl önce
ebeveyn
işleme
2304943c64
2 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 0 3
      public/index.html
  2. 7 2
      src/features/Login/Login.vue

+ 0 - 3
public/index.html

@@ -59,9 +59,6 @@
 
     <div id="app"></div>
 
-    <div style="position: absolute; right: 20px; bottom: 20px;">
-      版本: <%= VUE_APP_GIT_REPO_VERSION %>
-    </div>
     <!-- built files will be auto injected -->
 
     <!-- baidu tongji -->

+ 7 - 2
src/features/Login/Login.vue

@@ -93,7 +93,11 @@
       </div>
     </div>
 
-    <footer class="footer"></footer>
+    <footer class="footer">
+      <div style="position: absolute; right: 20px; bottom: 20px;">
+        版本: {{ VUE_APP_GIT_REPO_VERSION }}
+      </div>
+    </footer>
   </div>
 </template>
 
@@ -135,7 +139,8 @@ export default {
           }
         ]
       },
-      disableLoginBtn: true
+      disableLoginBtn: true,
+      VUE_APP_GIT_REPO_VERSION: process.env.VUE_APP_GIT_REPO_VERSION
     };
   },
   async mounted() {