Skip to content

Commit 5d2313c

Browse files
committed
use less confusing variable name
1 parent fc80f89 commit 5d2313c

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/guide/extras/animation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
import ElasticHeader from './demos/ElasticHeader.vue'
3-
import NotActivated from './demos/NotActivated.vue'
3+
import DisabledButton from './demos/DisabledButton.vue'
44
import Colors from './demos/Colors.vue'
55
import AnimateWatcher from './demos/AnimateWatcher.vue'
66
</script>
@@ -16,12 +16,12 @@ For elements that are not entering / leaving the DOM, we can trigger animations
1616
<div class="composition-api">
1717

1818
```js
19-
const notActivated = ref(false)
19+
const disabled = ref(false)
2020

21-
function warnNotActivated() {
22-
notActivated.value = true
21+
function warnDisabled() {
22+
disabled.value = true
2323
setTimeout(() => {
24-
notActivated.value = false
24+
disabled.value = false
2525
}, 1500)
2626
}
2727
```
@@ -33,14 +33,14 @@ function warnNotActivated() {
3333
export default {
3434
data() {
3535
return {
36-
notActivated: false
36+
disabled: false
3737
}
3838
},
3939
methods: {
40-
warnNotActivated() {
41-
this.notActivated = true
40+
warnDisabled() {
41+
this.disabled = true
4242
setTimeout(() => {
43-
this.notActivated = false
43+
this.disabled = false
4444
}, 1500)
4545
}
4646
}
@@ -50,9 +50,9 @@ export default {
5050
</div>
5151

5252
```vue-html
53-
<div :class="{ shake: notActivated }">
54-
<button @click="warnNotActivated">Click me</button>
55-
<span v-if="notActivated">This feature is not activated.</span>
53+
<div :class="{ shake: disabled }">
54+
<button @click="warnDisabled">Click me</button>
55+
<span v-if="disabled">This feature is disabled!</span>
5656
</div>
5757
```
5858

@@ -86,7 +86,7 @@ export default {
8686
}
8787
```
8888

89-
<NotActivated />
89+
<DisabledButton />
9090

9191
## State-driven Animations
9292

src/guide/extras/demos/NotActivated.vue renamed to src/guide/extras/demos/DisabledButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function warnNotActivated() {
1414
<div :class="{ shake: notActivated }">
1515
<button @click="warnNotActivated">Click me</button>
1616
<span v-if="notActivated" style="margin-left: 20px"
17-
>This feature is not activated!</span
17+
>This feature is disabled!</span
1818
>
1919
</div>
2020
</div>

0 commit comments

Comments
 (0)