-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.vue
50 lines (48 loc) · 1.13 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
<h1>Ejercicio 1: Reverse String</h1>
<ReverseString />
<hr />
<h1>Ejercicio 2: Reverse String (v-model, emit)</h1>
<p>Reversed String: {{reversedString}}</p>
<InputString v-model:text="myText"></InputString>
<hr />
<h1>Ejercicio 3: People List (reactivity, teleport)</h1>
<PeopleReactiveList />
<hr />
<h1>Ejercicio 4: People List (Suspense)</h1>
<Suspense>
<template #default>
<people-list></people-list>
</template>
<template #fallback>
<div class="text-center">Cargando...</div>
</template>
</Suspense>
<hr />
</template>
<script>
import ReverseString from './components/ReverseString.vue'
import InputString from './components/InputString.vue'
import PeopleReactiveList from './components/PeopleReactiveList.vue'
import PeopleList from './components/PeopleList.vue'
export default {
name: 'App',
components: {
ReverseString,
InputString,
PeopleReactiveList,
PeopleList,
},
/** Ejercicio 2 */
data() {
return {
myText: ''
}
},
computed: {
reversedString() {
return this.myText.split("").reverse().join("")
}
}
}
</script>