This commit is contained in:
2019-04-16 23:29:17 +00:00
parent ccb56817e5
commit 0a835c2d0b
2 changed files with 39 additions and 24 deletions

View File

@@ -131,7 +131,9 @@
<script>
/* xeslint-disable */
function clickHandler(key) {
alert("inventory-widget-edit.vue::context click: " + key);
if (!key.startsWith("app:")) {
alert("inventory-widget-edit.vue::context click: " + key);
}
}
export default {
beforeCreate() {
@@ -177,18 +179,18 @@ export default {
isMain: false,
icon: "fa-splotch",
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" }
contextMenuItems: [
{ title: "DUPLICATE", icon: "clone", key: "duplicate" },
{ title: "SAVE", icon: "save", key: "save" },
{ title: "DELETE", icon: "trash-alt", key: "delete" },
{ title: "HELP", key: "app:help:inventory-widget-edit" }
]
});
this.$gzevent.$on("context-menu-click", clickHandler);
this.$gzevent.$on("menu-click", clickHandler);
this.getDataFromApi();
},
beforeDestroy() {
this.$gzevent.$off("context-menu-click", clickHandler);
this.$gzevent.$off("menu-click", clickHandler);
},
components: {},
data() {