Topbar.vue
895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<Header>
<Menu mode="horizontal" theme="dark" active-name="1" class="header-menu">
<div class="header-logo"></div>
<div class="header-nav">
<MenuItem name="1">
<Icon type="log-out"></Icon>
<span @click="logout">退出</span>
</MenuItem>
</div>
</Menu>
</Header>
</template>
<script>
export default {
methods: {
logout() {
location.href = '/logout'
}
}
}
</script>
<style scoped lang="scss">
.header-menu {
display: flex;
justify-content: space-between;
margin-top: 2px;
}
.header-logo {
width: 150px;
height: 60px;
background: url("../../../images/logo.png");
filter: invert(100%);
margin-left: -15px;
}
.header-nav {
li:last-child {
padding-right: 0;
}
}
</style>