parent
c69544e5bf
commit
69fd271aec
@ -0,0 +1,41 @@
|
||||
<script lang="ts">
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
songs:[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'songs').then((response)=>{
|
||||
this.songs = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<details>
|
||||
<summary><h2>Songs</h2></summary>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>title</th>
|
||||
<th>notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="song in songs">
|
||||
<td>{{song.id}}</td>
|
||||
<td>{{song.title}}</td>
|
||||
<td>{{song.notes}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</details>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
Loading…
Reference in new issue