parent
30f0632216
commit
ae6286852f
@ -0,0 +1,34 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
categories:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'categories').then((response)=>{
|
||||||
|
this.categories = response.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<h2>Show Category</h2>
|
||||||
|
<select>
|
||||||
|
<option v-for="category in categories" v-bind:value="category.id">
|
||||||
|
{{category.instrument}}
|
||||||
|
:
|
||||||
|
{{category.category}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
td {
|
||||||
|
border:1px solid black;
|
||||||
|
padding:1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in new issue