index.vue
1.24 KB
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
51
52
53
54
55
56
57
58
59
60
<script setup>
import About from './About.vue'
import ActivityTimeline from './ActivityTimeline.vue'
import Connection from './Connection.vue'
import ProjectList from './ProjectList.vue'
import Teams from './Teams.vue'
const router = useRoute('pages-user-profile-tab')
const profileTabData = ref()
const fetchAboutData = async () => {
if (router.params.tab === 'profile') {
const data = await $api('/pages/profile', { query: { tab: router.params.tab } }).catch(err => console.log(err))
profileTabData.value = data
}
}
watch(router, fetchAboutData, { immediate: true })
</script>
<template>
<VRow v-if="profileTabData">
<VCol
md="4"
cols="12"
>
<About :data="profileTabData" />
</VCol>
<VCol
cols="12"
md="8"
>
<VRow>
<VCol cols="12">
<ActivityTimeline />
</VCol>
<VCol
cols="12"
md="6"
>
<Connection :connections-data="profileTabData.connections" />
</VCol>
<VCol
cols="12"
md="6"
>
<Teams :teams-data="profileTabData.teamsTech" />
</VCol>
<VCol cols="12">
<ProjectList />
</VCol>
</VRow>
</VCol>
</VRow>
</template>