mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
add loading state
This commit is contained in:
parent
fd404f5c1f
commit
2475bf6123
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="editor">
|
||||
<editor-content class="editor__content" :editor="editor" v-if="editor" />
|
||||
<editor-content class="editor__content" :editor="editor" v-if="editor && !loading" />
|
||||
<em v-else>
|
||||
Connecting to socket server …
|
||||
</em>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +22,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
editor: null,
|
||||
socket: null,
|
||||
}
|
||||
@ -26,6 +30,8 @@ export default {
|
||||
|
||||
methods: {
|
||||
initEditor({ doc, version }) {
|
||||
this.loading = false
|
||||
|
||||
if (this.editor) {
|
||||
this.editor.destroy()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user