Blame view
src/components/AppToolbar.vue
2.59 KB
93a68cfa1
|
1 2 |
<template> <v-toolbar |
8fc85e8ec
|
3 |
color="grey" |
93a68cfa1
|
4 |
fixed |
93a68cfa1
|
5 |
app |
defcc5da3
|
6 |
> |
03dcbf0c1
|
7 8 9 |
<v-toolbar-title class="ml-0 pl-3"> <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> </v-toolbar-title> |
93a68cfa1
|
10 |
<v-spacer></v-spacer> |
93a68cfa1
|
11 12 |
<v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> <v-btn icon large flat slot="activator"> |
269061695
|
13 14 |
<v-avatar size="40px"> <img src="/static/icon/user.png"/> |
93a68cfa1
|
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
</v-avatar> </v-btn> <v-list class="pa-0"> <v-list-tile v-for="(item,index) in items" :to="!item.href ? { name: item.name } : null" :href="item.href" @click="item.click" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="index"> <v-list-tile-action v-if="item.icon"> <v-icon>{{ item.icon }}</v-icon> </v-list-tile-action> <v-list-tile-content> <v-list-tile-title>{{ item.title }}</v-list-tile-title> </v-list-tile-content> </v-list-tile> </v-list> </v-menu> </v-toolbar> </template> <script> |
03dcbf0c1
|
31 32 |
import NotificationList from "@/components/widgets/list/NotificationList"; import Util from "@/util"; |
93a68cfa1
|
33 |
export default { |
03dcbf0c1
|
34 35 |
search: "", name: "app-toolbar", |
93a68cfa1
|
36 37 38 39 |
components: { NotificationList }, data: () => ({ |
03dcbf0c1
|
40 |
search: "", |
eba96ec51
|
41 |
userName:'', |
93a68cfa1
|
42 43 44 |
items: [ { // icon: 'account_circle', |
03dcbf0c1
|
45 46 47 |
href: "/changepassword", title: "Change Password", click: e => { |
93a68cfa1
|
48 49 50 51 52 53 54 55 56 57 58 59 60 |
console.log(e); } }, // { // icon: 'settings', // href: '#', // title: 'Settings', // click: (e) => { // console.log(e); // } // }, { // icon: 'fullscreen_exit', |
03dcbf0c1
|
61 62 63 64 65 |
href: "#", title: "Logout", click: e => { window.getApp.$emit("APP_LOGOUT"); // this.$store.dispatch("setToken", null); |
93a68cfa1
|
66 67 |
} } |
03dcbf0c1
|
68 |
] |
93a68cfa1
|
69 70 |
}), computed: { |
03dcbf0c1
|
71 |
toolbarColor() { |
93a68cfa1
|
72 73 74 75 |
return this.$vuetify.options.extra.mainNav; } }, methods: { |
03dcbf0c1
|
76 77 |
handleDrawerToggle() { window.getApp.$emit("APP_DRAWER_TOGGLED"); |
93a68cfa1
|
78 |
}, |
03dcbf0c1
|
79 |
handleFullScreen() { |
93a68cfa1
|
80 81 |
Util.toggleFullScreen(); } |
eba96ec51
|
82 |
}, |
93a68cfa1
|
83 84 |
}; </script> |
03dcbf0c1
|
85 86 87 88 89 90 91 92 |
<style> .v-icon{ font-size:30px; } @media screen and (min-width: 1270px){ .hide{ display: none; } |
a0fe54618
|
93 94 95 |
/* } @media screen and (max-width: 962px) { .imglogo{ |
659b42db7
|
96 97 98 99 100 |
position: absolute; top: 13px; left: 13px !important; width: 70px; height: 24px; |
f42c1d9c9
|
101 |
} */ |
a0fe54618
|
102 |
} |
a647b5fbe
|
103 |
@media screen and (max-width: 420px){ |
03dcbf0c1
|
104 105 106 107 |
.v-list__tile { font-size:14px; padding: 0 10px; } |
659b42db7
|
108 109 110 |
.name{ font-size:15px; } |
03dcbf0c1
|
111 112 |
} </style> |