first
This commit is contained in:
51
src/components/Navbar.vue
Normal file
51
src/components/Navbar.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
|
||||
<el-menu
|
||||
router
|
||||
:default-active="$route.path"
|
||||
class="el-menu-demo"
|
||||
mode="horizontal"
|
||||
background-color="#2d3039"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
|
||||
>
|
||||
|
||||
<el-menu-item index="0">
|
||||
<a href="/home"><img style = "height:50px;width:auto" src="../assets/logo.png" alt="logo"></a>
|
||||
</el-menu-item>
|
||||
|
||||
<el-menu-item index="/home">Home</el-menu-item>
|
||||
<el-menu-item index="/scoreboard">Scoreboard</el-menu-item>
|
||||
<el-menu-item index="/users">Users</el-menu-item>
|
||||
<el-menu-item index="/notification">Notification</el-menu-item>
|
||||
<el-menu-item index="/challenges">Challenges</el-menu-item>
|
||||
|
||||
<el-button type="primary" class="login" @click="login">登录/注册</el-button>
|
||||
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods:{
|
||||
login(){
|
||||
this.$router.push('/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
.login{
|
||||
margin-top: 12px;
|
||||
margin-left: auto;
|
||||
margin-right: 30px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user