import presetable from '../../mixins/vbform/presetable.js'; import tab from './tab.js'; export default { template: `
`, components: { "tab": tab }, mixins: [ presetable ], created: function() { if( this.children.length > 0 ) { this.activetab = this.children[0].guioptions.id; } }, data: function() { return { activetab: '' } }, methods: { getPayload: function() { var children = []; for( var i in this.$refs.parts ) { children.push(this.$refs.parts[i].getPayload()); } var payload = { "type": "tabs", "guioptions": JSON.parse(JSON.stringify(this.preset.guioptions)), "children": children } return payload; } } }