废话不多说了,直接上代码吧!
{
{item.status}}{
{countTotal}}
import Vue from 'vue'
import axios from 'axios'
export default {
data(){
return{
tableDataList:[],//定义列表数据信息
}
},
mounted(){
//获取列表数据信息
axios.get('url',{
withCredentials: true
})
.then((res) => {
// console.log(res);
let tableData = res.data.data;
this.tableDataList = tableData.table_list;
})
.catch((error) => {
console.log(error)
})
},
computed:{
//将状态数字转换为对应的文字解释
countTotal() {
for (let i = 0; i < this.tableDataList.length; i++) {
if (thi