This commit is contained in:
2019-04-16 22:40:37 +00:00
parent 2327f8395a
commit 7c1d4a1a60
2 changed files with 8 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ export default {
}); });
this.$gzevent.$on("context-click", function(key) { this.$gzevent.$on("context-click", function(key) {
alert("context click: " + key); alert("App.vue::context click: " + key);
}); });
//redirect to login if not authenticated //redirect to login if not authenticated

View File

@@ -130,7 +130,9 @@
<script> <script>
/* xeslint-disable */ /* xeslint-disable */
function clickHandler(key) {
alert("inventory-widget-edit.vue::context click: " + key);
}
export default { export default {
beforeCreate() { beforeCreate() {
//Cache all required lt keys //Cache all required lt keys
@@ -176,8 +178,12 @@ export default {
icon: "fa-splotch", icon: "fa-splotch",
title: this.$gzlocale.get("Widget") title: this.$gzlocale.get("Widget")
}); });
this.$gzevent.$on("context-click", clickHandler);
this.getDataFromApi(); this.getDataFromApi();
}, },
beforeDestroy() {
this.$gzevent.$off("context-click", clickHandler);
},
components: {}, components: {},
data() { data() {
return { return {