Question: Required : Use one data table independant from tabs , then based on tab parameters update its data i do that but do not

Required : "Use one data table independant from tabs, then based on tab parameters update its data " i do that but do not working ! why? (java script file lang="ts" setup)>>>import { computed, ref } from "vue"
import { useI18n } from "vue-i18n"
//import { useRouter } from "vue-router/auto"
const active_tab = ref(1)
const changeTab =(tab: number)=>{
if (tab ===1){
//active_tab.value =1
const itemsClientsTable = computed(()=>[
{
sequence: "1",
agentCode: 1001563688,
agentName: "moon ",
agentType: "-",
agentPhone: "05999999999",
agentEmail: "hotmail@hotmail.com",
agentRegester: "1444/09/03-2023/03/2",
},
])
} else if (tab ===2){
const itemsClientsTable = computed(()=>[
{
sequence: "1",
agentCode: 1001563688,
agentName: "soon ",
agentType: "-",
agentPhone: "05999999999",
agentEmail: "hotmail@hotmail.com",
agentRegester: "1444/09/03-2023/03/2",
},
])
//active_tab.value = tab
} else if (tab ===3){
const itemsClientsTable = computed(()=>[
{
sequence: "1",
agentCode: 1001563688,
agentName: "foo ",
agentType: "-",
agentPhone: "05999999999",
agentEmail: "hotmail@hotmail.com",
agentRegester: "1444/09/03-2023/03/2",
},
])
//active_tab.value = tab
} else if (tab ===4){
const itemsClientsTable = computed(()=>[
{
sequence: "1",
agentCode: 1001563688,
agentName: "mood ",
agentType: "-",
agentPhone: "05999999999",
agentEmail: "hotmail@hotmail.com",
agentRegester: "1444/09/03-2023/03/2",
},
])
//active_tab.value =4
}
//active_tab.value = tab
}
const headersClientsTable = computed(()=>[
{
title: "sequence",
align: "start",
sortable: false,
key: "sequence",
},
{ title: "agent Code", key: "agentCode", sortable: true },
{ title: "agent Name", key: "agentName", sortable: true },
{ title: "agent Type", key: "agentType", sortable: true },
{ title: "agent Phone", key: "agentPhone", sortable: true },
{ title: "agent Email", key: "agentEmail", sortable: true },
{ title: "agent Regester", key: "agentRegester", sortable: true },
])
 Required : "Use one data table independant from tabs, then based

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!