-
Notifications
You must be signed in to change notification settings - Fork 0
/
TheListItem.vue
50 lines (38 loc) · 897 Bytes
/
TheListItem.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
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import TheText from "./TheText.vue";
import TheListOne from "./TheListOne.vue";
import TheListTwo from "./TheListTwo.vue";
import TheListThree from "./TheListThree.vue";
let v = ref(0);
onMounted(() => {
// this is an onmounted callback.
v.value = 1;
});
const onClickButton = () => {
// console.log("item clicked: ", `${JSON.stringify(props.item)}`);
};
</script>
<template>
<div>
<div class="p-1">
<TheText :text="'test'" />
<div>(mounted: {{ v === 1 }})</div>
<br />
<button @click="onClickButton">Button</button>
<br />
<details>
<TheListOne />
<TheListTwo />
<TheListThree />
</details>
<br />
<!-- <NuxtLink to="/">Back to index</NuxtLink> -->
</div>
</div>
</template>
<style scoped>
.p-1 {
padding: 1rem;
}
</style>