comparison 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
comparison
equal deleted inserted replaced
3076:e0daeb05bf50 3077:db890b71f070
37 return uuidGen.v4(); 37 return uuidGen.v4();
38 } 38 }
39 } 39 }
40 }; 40 };
41 41
42 const paneHooks = { 42 const pane = {
43 props: { 43 props: {
44 paneCreated: Function, 44 paneCreated: Function,
45 paneMounted: Function, 45 paneMounted: Function,
46 paneUpdated: Function, 46 paneUpdated: Function,
47 paneDestroyed: Function 47 paneDestroyed: Function
48 },
49 computed: {
50 paneId() {
51 return this.$parent.pane.id;
52 }
48 }, 53 },
49 created() { 54 created() {
50 if (this.paneCreated) this.paneCreated(); 55 if (this.paneCreated) this.paneCreated();
51 }, 56 },
52 mounted() { 57 mounted() {
58 destroyed() { 63 destroyed() {
59 if (this.paneDestroyed) this.paneDestroyed(); 64 if (this.paneDestroyed) this.paneDestroyed();
60 } 65 }
61 }; 66 };
62 67
63 export { sortTable, uuid, paneHooks }; 68 export { sortTable, uuid, pane };