-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathApp.vue
More file actions
45 lines (40 loc) · 715 Bytes
/
App.vue
File metadata and controls
45 lines (40 loc) · 715 Bytes
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
<template>
<div>
<nav>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/posts/$postId" :params="{ postId: '1' }">Post 1</Link>
</li>
<li>
<Link to="/posts/$postId" :params="{ postId: '2' }" id="nav-link"> Post 2 </Link>
</li>
</ul>
</nav>
<hr />
<Outlet />
</div>
</template>
<script setup lang="ts">
import { Link, Outlet } from '@tanstack/vue-router';
</script>
<style scoped>
nav ul {
list-style: none;
padding: 0;
display: flex;
gap: 1rem;
}
nav li {
display: inline;
}
nav a {
color: #42b983;
text-decoration: none;
}
nav a:hover {
text-decoration: underline;
}
</style>