Skip to content

Commit

Permalink
docs(computed): remove semicolons (#3117)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiio2 authored Nov 25, 2024
1 parent 8ce9c23 commit 5936eef
Showing 1 changed file with 9 additions and 9 deletions.
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

0 comments on commit 5936eef

Please sign in to comment.