Skip to content

Commit b02c587

Browse files
author
it-evan
committed
docs(computed): correct parameter positions in the computed example
1 parent fcee623 commit b02c587

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,8 +263,15 @@ Now when you run `fullName.value = 'John Doe'`, the setter will be invoked and `
263263

264264
- Only supported in 3.4+
265265

266+
<p class="options-api">
267+
In case you need it, you can get the previous value returned by the computed property accessing
268+
the second argument of the getter:
269+
</p>
270+
271+
<p class="composition-api">
266272
In case you need it, you can get the previous value returned by the computed property accessing
267273
the first argument of the getter:
274+
</p>
268275

269276
<div class="options-api">
270277

@@ -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)