0π
β
It should work like this:
data() {
return {
headersData: [
{ text: "Code", value: "document_control_code" },
{ text: "Request Type", value: "request_type"} ,
{ text: "Title", value: "document_title" },
{ text: "department", value: "department" },
{ text: "Request Date", value: "request_date" },
{ text: "Due Date", value: "due_date" },
]
}
},
and in mounted()
mounted() {
if(admin) {
this.headersData.push({ text: "Action", value: "action" });
}
}
Source:stackexchange.com