Browse Source

fix: svg compoent

Sendya 6 years ago
parent
commit
73bcc2cd2d
3 changed files with 11 additions and 4 deletions
  1. 1 1
      src/assets/logo.svg
  2. 2 2
      src/components/page/GlobalLayout.vue
  3. 8 1
      src/components/tools/Logo.vue

+ 1 - 1
src/assets/logo.svg

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg width="128px" height="128px" viewBox="0 0 128 128" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<svg viewBox="0 0 128 128" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
   <!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
   <title>Vue</title>
   <desc>Created with Sketch.</desc>

+ 2 - 2
src/components/page/GlobalLayout.vue

@@ -507,12 +507,12 @@ export default {
       background: #002140;
       overflow: hidden;
 
-      img, h1 {
+      img, svg, h1 {
         display: inline-block;
         vertical-align: middle;
       }
 
-      img {
+      img, svg {
         height: 32px;
       }
 

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

@@ -1,15 +1,22 @@
 <template>
   <div class="logo">
     <router-link :to="{name:'dashboard'}">
-      <img src="~@/assets/logo.svg" alt="logo">
+      <LogoSvg alt="logo" />
       <h1 v-if="showTitle">{{ title }}</h1>
     </router-link>
   </div>
 </template>
 
 <script>
+import LogoSvg from '@/assets/logo.svg'
+
+console.log(LogoSvg)
+
 export default {
   name: 'Logo',
+  components: {
+    LogoSvg
+  },
   props: {
     title: {
       type: String,