1
1
<script setup >
2
2
import ElasticHeader from ' ./demos/ElasticHeader.vue'
3
- import NotActivated from ' ./demos/NotActivated .vue'
3
+ import DisabledButton from ' ./demos/DisabledButton .vue'
4
4
import Colors from ' ./demos/Colors.vue'
5
5
import AnimateWatcher from ' ./demos/AnimateWatcher.vue'
6
6
</script >
@@ -16,12 +16,12 @@ For elements that are not entering / leaving the DOM, we can trigger animations
16
16
<div class =" composition-api " >
17
17
18
18
``` js
19
- const notActivated = ref (false )
19
+ const disabled = ref (false )
20
20
21
- function warnNotActivated () {
22
- notActivated .value = true
21
+ function warnDisabled () {
22
+ disabled .value = true
23
23
setTimeout (() => {
24
- notActivated .value = false
24
+ disabled .value = false
25
25
}, 1500 )
26
26
}
27
27
```
@@ -33,14 +33,14 @@ function warnNotActivated() {
33
33
export default {
34
34
data () {
35
35
return {
36
- notActivated : false
36
+ disabled : false
37
37
}
38
38
},
39
39
methods: {
40
- warnNotActivated () {
41
- this .notActivated = true
40
+ warnDisabled () {
41
+ this .disabled = true
42
42
setTimeout (() => {
43
- this .notActivated = false
43
+ this .disabled = false
44
44
}, 1500 )
45
45
}
46
46
}
@@ -50,9 +50,9 @@ export default {
50
50
</div >
51
51
52
52
``` 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>
56
56
</div>
57
57
```
58
58
@@ -86,7 +86,7 @@ export default {
86
86
}
87
87
```
88
88
89
- <NotActivated />
89
+ <DisabledButton />
90
90
91
91
## State-driven Animations
92
92
0 commit comments