-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathapp.vue
54 lines (43 loc) · 888 Bytes
/
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
51
52
53
54
<script setup>
import { ref } from 'vue'
import { useNuxtApp } from '#app'
const { $jsonApi } = useNuxtApp()
const baseUrl = ref($jsonApi.axios.defaults.baseURL)
</script>
<template>
<div class="container">
<h1 class="text-center">Nuxt JSON:API Module</h1>
<img
src="/nuxt-jsonapi-logo.svg"
alt="Nuxt JSON:API logo"
width="400"
height="104"
class="logo center"
/>
<h2>Base URL: {{ baseUrl }}</h2>
<h2>Options API</h2>
<OptionArticles></OptionArticles>
<h2>Composition API</h2>
<CompositionArticles></CompositionArticles>
</div>
</template>
<style>
.logo {
display: block;
max-width: 100%;
height: auto;
}
.container {
font-family: sans-serif;
max-width: 600px;
padding: 1rem;
margin: 0 auto;
}
.text-center {
text-align: center;
}
.center {
margin-left: auto;
margin-right: auto;
}
</style>