Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/guide/essentials/computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ export default {
// instead until count is less or equal to 3
alwaysSmall(previous) {
if (this.count <= 3) {
return this.count;
return this.count
}

return previous;
return previous
}
}
}
Expand All @@ -304,10 +304,10 @@ const count = ref(2)
// instead until count is less or equal to 3
const alwaysSmall = computed((previous) => {
if (count.value <= 3) {
return count.value;
return count.value
}

return previous;
return previous
})
</script>
```
Expand All @@ -328,13 +328,13 @@ export default {
alwaysSmall: {
get(previous) {
if (this.count <= 3) {
return this.count;
return this.count
}

return previous;
},
set(newValue) {
this.count = newValue * 2;
this.count = newValue * 2
}
}
}
Expand All @@ -353,13 +353,13 @@ const count = ref(2)
const alwaysSmall = computed({
get(previous) {
if (count.value <= 3) {
return count.value;
return count.value
}

return previous;
return previous
},
set(newValue) {
count.value = newValue * 2;
count.value = newValue * 2
}
})
</script>
Expand Down