docs: update content

This commit is contained in:
Hans Pagel
2021-03-09 11:17:48 +01:00
parent d49af82a85
commit 6f38e15450
7 changed files with 231 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
<div class="content">
<button @click="increase">
This button has been clicked {{ count }} times.
This button has been clicked {{ node.attrs.count }} times.
</button>
</div>
</node-view-wrapper>
@@ -18,15 +18,23 @@ export default {
NodeViewWrapper,
},
data() {
return {
count: 0,
}
props: {
updateAttributes: {
type: Function,
required: true,
},
node: {
type: Object,
required: true,
},
},
methods: {
increase() {
this.count += 1
this.updateAttributes({
count: this.node.attrs.count + 1,
})
},
},
}