I wanna display the numerical data od Vue.js data-table sorted in descending order from the initial state. I wanna make below picture from the initial state.
In descending order is the data on the number of cases people in the middle of picture. I'm having a hard time not knowing what part of the code to modify. Would you please tell me?
<template>
<v-data-table
:headers="headers"
:items="covidList"
:items-per-page="5"
class="elevation-1"
></v-data-table>
</template>
<script>
import $axios from 'axios';
export default {
data(){
return{
headers:[
{
text:'area',
align:'start',
sortable:'false',
value:'name_ja',
},
{text:'cases',value:'cases'},
{text:'deaths',value:'deaths'},
],
}
},
async asyncData({ $axios }){
const response = await $axios.get('https://covid19-japan-web-api.now.sh/api/v1/prefectures')
return{
covidList:response.data
}
}
}
</script>
v-data-table?