Skip to content

Commit eebfff2

Browse files
authored
docs(computed): correct parameter positions in the computed example (#2588)
1 parent 211a8b9 commit eebfff2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/guide/essentials/computed.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ const fullName = computed({
263263

264264
- 3.4 以上でのみサポートされています
265265

266+
<p class="options-api">
267+
必要であれば、ゲッターの第 2 引数にアクセスすることで、算出プロパティが前回返した値を取得できます:
268+
</p>
269+
270+
271+
<p class="composition-api">
266272
必要であれば、ゲッターの第 1 引数にアクセスすることで、算出プロパティが前回返した値を取得できます:
273+
</p>
267274

268275

269276
<div class="options-api">
@@ -326,7 +333,7 @@ export default {
326333
},
327334
computed: {
328335
alwaysSmall: {
329-
get(previous) {
336+
get(_, previous) {
330337
if (this.count <= 3) {
331338
return this.count
332339
}

0 commit comments

Comments
 (0)