refactoring

This commit is contained in:
Philipp Kühn 2020-04-24 12:23:29 +02:00
parent f327be30bc
commit 3cca79b960

View File

@ -3,27 +3,30 @@ import Vue from 'vue'
export default class ComponentView {
// @ts-ignore
constructor(component, options) {
// @ts-ignore
this.component = component
// @ts-ignore
this.dom = this.createDOM()
// @ts-ignore
this.contentDOM = this.vm.$refs.content
this.mount(component)
}
createDOM() {
// @ts-ignore
mount(component) {
// @ts-ignore
const Component = Vue.extend(this.component)
const Component = Vue.extend(component)
// @ts-ignore
this.vm = new Component({
// parent: this.parent,
// propsData: props,
}).$mount()
}
get dom() {
// @ts-ignore
return this.vm.$el
}
get contentDOM() {
// @ts-ignore
return this.vm.$refs.content
}
}