Browse Source

logo地址配置

jbb 2 years ago
parent
commit
004b9a2afe

+ 2 - 1
idea.config.js

@@ -18,7 +18,8 @@ module.exports = {
       '@utils': resolve('src/utils'),
       '@entry': resolve('src/entry'),
       '@router': resolve('src/router'),
-      '@store': resolve('src/store')
+      '@store': resolve('src/store'),
+      '@assets': resolve('src/assets'),
     }
   }
 }

+ 1 - 1
src/components/NumberInfo/NumberInfo.vue

@@ -50,5 +50,5 @@
 </script>
 
 <style lang="less" scoped>
-  @import "index";
+  // @import "index";
 </style>

+ 1 - 1
src/components/layouts/11.vue

@@ -3,7 +3,7 @@
     <div class="container">
       <!-- 萃颠logo -->
       <div class="logo">
-        <img src="../../assets/logo-blue.png" alt="" />
+        <img :src="THIS.imgUrl" alt="" />
       </div>
 
       <!-- 放表单的盒子 -->

+ 6 - 1
src/components/layouts/UserLayout.vue

@@ -7,7 +7,7 @@
         <div class="logo">
           <!-- 技能博物馆 -->
           <!-- <img src="../../assets/logo-cd-left1.png" alt="" /> -->
-          <img src="../../assets/logo-blue.png" alt="" />
+          <img :src="this.imgUrl" alt="" />
         </div>
 
         <!-- 放表单的盒子 -->
@@ -56,6 +56,11 @@ export default {
     data () {
         return {}
     },
+    created(){
+      this.imgUrl = require(this.imgUrl)
+      console.log(this.imgUrl)
+      debugger
+    },
     mounted () {
         document.body.classList.add('userLayout')
     },

+ 1 - 1
src/components/tools/Logo.vue

@@ -13,7 +13,7 @@
       <!-- 技能博物馆 -->
       <!-- <img src="~@/assets/logo-cd-left1.png" alt="logo">
       <h1 >OA办公系统</h1>  -->
-      <img src="~@/assets/logo-cd-left.png" alt="logo">
+      <img :src="this.logoUrl" alt="logo">
       <h1 >{{ dashboard }}</h1> 
     </router-link>
   </div>

+ 4 - 0
src/main.js

@@ -67,6 +67,10 @@ Vue.prototype.doMian = '/jeecg-boot/'
 Vue.prototype.postFormAction = postFormAction
 Vue.prototype.postDataAction = postAction
 Vue.prototype.getAction = getAction
+//登陆界面logo
+Vue.prototype.imgUrl = require("@assets/logo-blue.png")
+//首页左上角logo
+Vue.prototype.logoUrl = require("@assets/logo-cd-left.png")
 Vue.use(dataV)
 new Vue({
     router,