Skip to content

Commit 793ecab

Browse files
committed
Meta & component props
1 parent 8af6303 commit 793ecab

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

01-HelloWorld/03-ComponentSocks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const comp = Vue.component('product', {
2+
// https://vuejs.org/v2/guide/components-props.html
23
// Props with validation
34
props: {
45
premium: {type: Boolean, required: true, default: false},

02-Snippets/07-Meta.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
methods: {
2+
updateMessage: async function () {
3+
this.message = 'updated'
4+
console.log(this.$el.textContent) // => 'not updated'
5+
await this.$nextTick()
6+
console.log(this.$el.textContent) // => 'updated'
7+
}
8+
}

0 commit comments

Comments
 (0)