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> |
4413a8d93
|
10 |
<!-- <v-text-field |
93a68cfa1
|
11 |
flat |
93a68cfa1
|
12 13 14 15 |
prepend-icon="search" label="Find your user" v-model="search" color="black" |
789f8298f
|
16 |
:search="search" |
93a68cfa1
|
17 |
> |
4413a8d93
|
18 |
</v-text-field> --> |
93a68cfa1
|
19 20 21 22 |
<v-spacer></v-spacer> <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> <v-btn icon large flat slot="activator"> |
269061695
|
23 24 |
<v-avatar size="40px"> <img src="/static/icon/user.png"/> |
93a68cfa1
|
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
</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
|
41 42 |
import NotificationList from "@/components/widgets/list/NotificationList"; import Util from "@/util"; |
93a68cfa1
|
43 |
export default { |
03dcbf0c1
|
44 45 |
search: "", name: "app-toolbar", |
93a68cfa1
|
46 47 48 49 |
components: { NotificationList }, data: () => ({ |
03dcbf0c1
|
50 |
search: "", |
93a68cfa1
|
51 52 53 |
items: [ { // icon: 'account_circle', |
03dcbf0c1
|
54 55 56 |
href: "/changepassword", title: "Change Password", click: e => { |
93a68cfa1
|
57 58 59 60 61 62 63 64 65 66 67 68 69 |
console.log(e); } }, // { // icon: 'settings', // href: '#', // title: 'Settings', // click: (e) => { // console.log(e); // } // }, { // icon: 'fullscreen_exit', |
03dcbf0c1
|
70 71 72 73 74 |
href: "#", title: "Logout", click: e => { window.getApp.$emit("APP_LOGOUT"); // this.$store.dispatch("setToken", null); |
93a68cfa1
|
75 76 |
} } |
03dcbf0c1
|
77 |
] |
93a68cfa1
|
78 79 |
}), computed: { |
03dcbf0c1
|
80 |
toolbarColor() { |
93a68cfa1
|
81 82 83 84 |
return this.$vuetify.options.extra.mainNav; } }, methods: { |
03dcbf0c1
|
85 86 |
handleDrawerToggle() { window.getApp.$emit("APP_DRAWER_TOGGLED"); |
93a68cfa1
|
87 |
}, |
03dcbf0c1
|
88 |
handleFullScreen() { |
93a68cfa1
|
89 90 91 92 93 |
Util.toggleFullScreen(); } } }; </script> |
03dcbf0c1
|
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
<style> .v-icon{ font-size:30px; } @media screen and (min-width: 1270px){ .hide{ display: none; } } @media screen and (max-width: 420px) { .v-list__tile { font-size:14px; padding: 0 10px; } } </style> |