named anonymous functions

This commit is contained in:
2019-04-18 19:51:21 +00:00
parent 7770b8bad1
commit 8cdae969fb
13 changed files with 43 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
<template>
<v-app id="AYANOVA">
<v-app>
<v-navigation-drawer v-if="isAuthenticated" fixed v-model="drawer" app>
<v-list dense>
<v-list-tile v-for="item in navItems" :key="item.route" :to="item.route">
@@ -19,17 +19,17 @@
<span>{{ appBar.title}}</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-toolbar-items>
<template v-for="(item) in appBar.menuItems">
<v-btn
class="hidden-xs-only"
class="hidden-xs-only"
icon
v-if="item.surface"
:key="item.key"
:disabled="item.disabled"
@click="$gzevent.$emit('menu-click',item)"
>
<v-icon :color="item.color ? item.color : ''">{{ "fa-" + item.icon }}</v-icon>
<v-icon :color="item.color ? item.color : ''">{{ "fa-" + item.icon }}</v-icon>
</v-btn>
</template>
<v-spacer></v-spacer>
@@ -91,7 +91,6 @@ import aboutInfo from "./api/aboutinfo";
import gzmenu from "./api/gzmenu";
export default {
//name: "App",
data() {
return {
drawer: null,
@@ -101,8 +100,7 @@ export default {
title: "",
helpUrl: "index.html",
menuItems: []
},
testcolor: "pink"
}
};
},
created() {
@@ -111,15 +109,17 @@ export default {
//
//
var that = this;
this.$gzevent.$on("menu-change", function(ctx) {
this.$gzevent.$on("menu-change", function handleMenuChange(ctx) {
gzmenu.handleMenuChange(that, ctx);
});
this.$gzevent.$on("menu-replace-item", function(newItem) {
this.$gzevent.$on("menu-replace-item", function handleReplaceMenuItem(
newItem
) {
gzmenu.handleReplaceMenuItem(that, newItem);
});
this.$gzevent.$on("menu-click", function(menuitem) {
this.$gzevent.$on("menu-click", function handleMenuClick(menuitem) {
gzmenu.handleClick(that, menuitem);
});
},
@@ -132,14 +132,14 @@ export default {
this.$router.replace({ name: "login" });
}
},
methods: {
setAuthenticated(status) {
this.$store.state.authenticated = status;
},
logout() {
this.$store.state.authenticated = false;
}
},
// methods: {
// setAuthenticated(status) {
// this.$store.state.authenticated = status;
// },
// logout() {
// this.$store.state.authenticated = false;
// }
// },
computed: {
isAuthenticated() {
return this.$store.state.authenticated === true;