| | |
| | | <el-menu-item index="/index"> |
| | | <div class="showIndex-block"> |
| | | <h1>首页</h1> |
| | | |
| | | </div> |
| | | </el-menu-item> |
| | | <el-menu-item index="/jiuyeAndChuangye"> |
| | |
| | | <h1>文档中心</h1> |
| | | </div> |
| | | </el-menu-item> |
| | | <el-menu-item index="/login"> |
| | | <el-menu-item @click="goOut"> |
| | | <div class="showIndex-block"> |
| | | <h1>退出登录</h1> |
| | | </div> |
| | |
| | | name: "showIndexTitle", |
| | | data() { |
| | | return { |
| | | activeStyle: false, |
| | | activeIndex: '/index' |
| | | } |
| | | }, |
| | |
| | | this.$route.meta.routerParent && (this.activeIndex = '/' + this.$route.meta.routerParent) |
| | | }, |
| | | methods: { |
| | | goOut() { |
| | | this.$confirm('是否退出系统, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$store.dispatch('logout').then(res => { |
| | | this.$router.push('/login') |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |