mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-29 08:19:34 +08:00
refactoring
This commit is contained in:
parent
2f1edbd8c3
commit
111b9cab2e
@ -16,12 +16,12 @@ export default class ComponentView {
|
||||
this.editable = editable
|
||||
|
||||
this.dom = this.createDOM()
|
||||
this.contentDOM = this._vm.$refs.content
|
||||
this.contentDOM = this.vm.$refs.content
|
||||
}
|
||||
|
||||
createDOM() {
|
||||
const Component = Vue.extend(this.component)
|
||||
this._vm = new Component({
|
||||
this.vm = new Component({
|
||||
propsData: {
|
||||
node: this.node,
|
||||
view: this.view,
|
||||
@ -32,7 +32,7 @@ export default class ComponentView {
|
||||
updateContent: content => this.updateContent(content),
|
||||
},
|
||||
}).$mount()
|
||||
return this._vm.$el
|
||||
return this.vm.$el
|
||||
}
|
||||
|
||||
updateAttrs(attrs) {
|
||||
@ -75,12 +75,12 @@ export default class ComponentView {
|
||||
|
||||
this.node = node
|
||||
this.decorations = decorations
|
||||
this._vm._props.node = node
|
||||
this._vm._props.decorations = decorations
|
||||
this.vm._props.node = node
|
||||
this.vm._props.decorations = decorations
|
||||
return true
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this._vm.$destroy()
|
||||
this.vm.$destroy()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user