comparison client/src/lib/mixins.js @ 3072:0233845cadb7

client: improved splitscreen mechanis Added possibility to define lifecycle hooks for components in panes. Created Pane component.
author Markus Kottlaender <markus@intevation.de>
date Wed, 17 Apr 2019 10:53:13 +0200
parents 87d34efafb3a
children db890b71f070
comparison
equal deleted inserted replaced
3071:53082e5a198a 3072:0233845cadb7
37 return uuidGen.v4(); 37 return uuidGen.v4();
38 } 38 }
39 } 39 }
40 }; 40 };
41 41
42 export { sortTable, uuid }; 42 const paneHooks = {
43 props: {
44 paneCreated: Function,
45 paneMounted: Function,
46 paneUpdated: Function,
47 paneDestroyed: Function
48 },
49 created() {
50 if (this.paneCreated) this.paneCreated();
51 },
52 mounted() {
53 if (this.paneMounted) this.paneMounted();
54 },
55 updated() {
56 if (this.paneUpdated) this.paneUpdated();
57 },
58 destroyed() {
59 if (this.paneDestroyed) this.paneDestroyed();
60 }
61 };
62
63 export { sortTable, uuid, paneHooks };