mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-25 04:19:02 +08:00
refactoring
This commit is contained in:
parent
f327be30bc
commit
3cca79b960
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user