Browse Source

class

class
xiaolin.mayu 5 years ago
parent
commit
ee311c54ac
2 changed files with 11 additions and 3 deletions
  1. 10
    2
      src/components/Home.vue
  2. 1
    1
      src/components/Login.vue

+ 10
- 2
src/components/Home.vue View File

7
             <i class="ico"></i> |
7
             <i class="ico"></i> |
8
             <span class="photo"></span>
8
             <span class="photo"></span>
9
             <span class="name">你好</span> |
9
             <span class="name">你好</span> |
10
-            <a href="#" class="logout">退出</a>
10
+            <a href="#" class="logout" @click="logout" >退出</a>
11
         </div>
11
         </div>
12
         </div>
12
         </div>
13
         <!-- 头部菜单栏 -->
13
         <!-- 头部菜单栏 -->
33
 export default {
33
 export default {
34
     
34
     
35
     data(){
35
     data(){
36
-       
36
+       return {
37
+
38
+       }
39
+    },
40
+    methods:{
41
+        logout(){
42
+            this.$router.push('/login')
43
+        }
37
     }
44
     }
38
 }
45
 }
39
 </script>
46
 </script>
125
 
132
 
126
 }
133
 }
127
 
134
 
135
+
128
 </style>
136
 </style>

+ 1
- 1
src/components/Login.vue View File

86
     line-height: 47px;
86
     line-height: 47px;
87
     padding-left: 54.5px;
87
     padding-left: 54.5px;
88
     font-size: 15px;
88
     font-size: 15px;
89
-    
89
+    overflow: hidden;
90
 }
90
 }
91
 .input1 {
91
 .input1 {
92
     top: 54.5px;
92
     top: 54.5px;

Loading…
Cancel
Save