Skip to content

Commit 2c0cd21

Browse files
committed
1 parent 5f37287 commit 2c0cd21

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/guide/migration/render-function-api.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export default {
127127
key: 'submit-button'
128128
}
129129
```
130+
130131
## 登録済みコンポーネント
131132

132133
### 2.x での構文
@@ -136,12 +137,14 @@ export default {
136137
```js
137138
// 2.x
138139
Vue.component('button-counter', {
139-
data: () => ({
140-
count: 0
141-
}),
140+
data() {
141+
return {
142+
count: 0
143+
}
144+
}
142145
template: `
143146
<button @click="count++">
144-
Clicked {{ count }} times.
147+
Clicked {{ count }} times.
145148
</button>
146149
`
147150
})

0 commit comments

Comments
 (0)