This commit is contained in:
2019-04-16 22:52:12 +00:00
parent a6ae0560e6
commit f76a98090d
2 changed files with 12 additions and 17 deletions

View File

@@ -58,7 +58,7 @@
</v-list>--> </v-list>-->
<v-list> <v-list>
<v-list-tile <v-list-tile
v-for="item in contextItems" v-for="item in appBar.contextItems"
:key="item.key" :key="item.key"
@click="$gzevent.$emit('context-click',item.key)" @click="$gzevent.$emit('context-click',item.key)"
> >
@@ -106,7 +106,7 @@ export default {
isMain: true, isMain: true,
icon: "", icon: "",
title: "", title: "",
contextMenuItems: [], contextItems: [],
mainMenuItems: [] mainMenuItems: []
}, },
items: [ items: [
@@ -132,12 +132,7 @@ export default {
"<span class='text--primary'>Sandra Adams</span> &mdash; Do you have Paris recommendations? Have you ever been?" "<span class='text--primary'>Sandra Adams</span> &mdash; Do you have Paris recommendations? Have you ever been?"
} }
], ],
contextItems: [ contextItems: []
{ title: "stub view log", icon: "glasses", key: "log" },
{ title: "Click Me 2", key: "2" },
{ title: "Click Me 3", key: "3" },
{ title: "Click Me 4", key: "4" }
]
}; };
}, },
created() { created() {
@@ -147,9 +142,7 @@ export default {
that.appBar.isMain = ctx.isMain; that.appBar.isMain = ctx.isMain;
that.appBar.icon = ctx.icon; that.appBar.icon = ctx.icon;
that.appBar.title = ctx.title; that.appBar.title = ctx.title;
that.appBar.contextMenuItems = ctx.contextMenuItems that.appBar.contextItems = ctx.contextItems ? ctx.contextItems : [];
? ctx.contextMenuItems
: [];
}); });
this.$gzevent.$on("context-click", function(key) { this.$gzevent.$on("context-click", function(key) {
@@ -180,7 +173,6 @@ export default {
navItems() { navItems() {
return this.$store.state.navItems; return this.$store.state.navItems;
}, },
copyright() { copyright() {
return aboutInfo.copyright; return aboutInfo.copyright;
}, },

View File

@@ -176,7 +176,13 @@ export default {
this.$gzevent.$emit("context-menu-change", { this.$gzevent.$emit("context-menu-change", {
isMain: false, isMain: false,
icon: "fa-splotch", icon: "fa-splotch",
title: this.$gzlocale.get("Widget") title: this.$gzlocale.get("Widget"),
contextItems: [
{ title: "stub view log", icon: "glasses", key: "log" },
{ title: "Click Me 2", key: "2" },
{ title: "Click Me 3", key: "3" },
{ title: "Click Me 4", key: "4" }
]
}); });
this.$gzevent.$on("context-click", clickHandler); this.$gzevent.$on("context-click", clickHandler);
this.getDataFromApi(); this.getDataFromApi();
@@ -253,10 +259,7 @@ export default {
alert("STUB: DELETE"); alert("STUB: DELETE");
}, //end of remove() }, //end of remove()
stubTestClick() { stubTestClick() {
this.$gzevent.$emit( alert("stub test click");
"context-menu-change",
"HI FROM inventory-widget-edit.vue"
);
} }
} }
}; };