| 9 | |
| 10 | module.exports = class VueComponentView extends RootView { |
| 11 | constructor (component, options) { |
| 12 | super(options) |
| 13 | const baseTemplate = options.baseTemplate || 'base-flat-vue' //base template, by default using base-flat |
| 14 | this.id = 'vue-component-view' |
| 15 | try { |
| 16 | this.template = require('templates/vue-base/'+ baseTemplate) |
| 17 | } |
| 18 | catch (err) { |
| 19 | console.error("Error in importing the base template.", err) |
| 20 | } |
| 21 | this.VueComponent = component |
| 22 | this.propsData = options.propsData |
| 23 | } |
| 24 | |
| 25 | buildVueComponent() { |
| 26 | return new this.VueComponent({ |