Skip to content

Commit 9d67355

Browse files
authored
fix: instance properties example (#147)
1 parent b527141 commit 9d67355

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/guide/instance.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,13 @@ const vm = Vue.createApp({
105105
In addition to data properties, Vue instances expose a number of useful instance properties and methods. These are prefixed with `$` to differentiate them from user-defined properties. For example:
106106

107107
```js
108-
const vm = Vue.createApp().mount(
109-
{
110-
data() {
111-
return {
112-
a: 1
113-
}
108+
const vm = Vue.createApp({
109+
data() {
110+
return {
111+
a: 1
114112
}
115-
},
116-
'#example'
117-
)
113+
}
114+
}).mount('#example')
118115

119116
vm.$data.a // => 1
120117
```

0 commit comments

Comments
 (0)