I am new to the vuetify and having a headache with displaying table. I searched others and tried them on mine but its not showing...
I can see my data with dev tool but it wont show on the table ;~;
Here are my codes
Vuetify Table Code
BoardList.vue
<template>
<v-container>
<v-data-table
:headers="headers"
:items="boards"
class="elevation-1"
:search="search"
>
<template v-slot:item="props">
<td class="text-xs-right">{{ props.item.articleno }}</td>
<td class="text-xs-right">{{ props.item.data.articleno }}</td>
</template>
</v-data-table>
<v-col><v-col md="8" /></v-col>
<v-container>
<v-row>
<v-col md="6" />
<v-btn @click="goodbye"> 게시글 삭제</v-btn>
</v-row>
</v-container>
</v-container>
</template>
script part
<script>
import { listArticle } from "@/api/board";
export default {
name: "MemberList",
methods: {
goodbye() {
alert("remove?");
},
},
data() {
return {
search: "",
headers: [
{
text: "article number",
align: "start",
sortable: true,
value: "articleno",
},
{ text: "Subject", value: "subject" },
],
boards: [],
};
},
created() {
listArticle(
(response) => {
this.boards = response.data;
},
(error) => {
console.log(error);
}
);
},
};
</script>
api/board.js
function listArticle(param, success, fail) {
api.get(`/board`, { params: param }).then(success).catch(fail);
}
I tried props.item.articleno, props.item.data.articleno, item.articleno , item.data.articleno and none of them are working... and my vue version is 2.6.11 What am I doing wrong