diff client/src/lib/mixins.js @ 3077:db890b71f070

client: panes: added paneId to mixin
author Markus Kottlaender <markus@intevation.de>
date Thu, 18 Apr 2019 08:41:43 +0200
parents 0233845cadb7
children 57255fda7594
line wrap: on
line diff
--- a/client/src/lib/mixins.js	Wed Apr 17 15:04:28 2019 +0200
+++ b/client/src/lib/mixins.js	Thu Apr 18 08:41:43 2019 +0200
@@ -39,13 +39,18 @@
   }
 };
 
-const paneHooks = {
+const pane = {
   props: {
     paneCreated: Function,
     paneMounted: Function,
     paneUpdated: Function,
     paneDestroyed: Function
   },
+  computed: {
+    paneId() {
+      return this.$parent.pane.id;
+    }
+  },
   created() {
     if (this.paneCreated) this.paneCreated();
   },
@@ -60,4 +65,4 @@
   }
 };
 
-export { sortTable, uuid, paneHooks };
+export { sortTable, uuid, pane };