src/components/core/AppHeader.vue
@@ -10,7 +10,7 @@ </el-col> <el-col :span="12" class="logout"> <FYBgTaskDialog></FYBgTaskDialog> <el-button icon="SwitchButton">退出登录</el-button> <el-button icon="SwitchButton" @click="logout">退出登录</el-button> </el-col> </el-row> </template> @@ -50,6 +50,12 @@ this.isCollapsed = !this.isCollapsed this.$emit('collapsedSider', this.isCollapsed) }, /** * 退出登录 */ logout() { this.$router.push(`/login`); }, }, } </script>