0
点赞
收藏
分享

微信扫一扫

前端工作总结125-数据在表格横坐标动态显示

皮皮球场 2022-09-17 阅读 79

1数据格式

前端工作总结125-数据在表格横坐标动态显示_数据

 2对数据进行处理

created() {
getAction("/task/arrange").then(res=>{
console.log(res)
this.tableData=res.data.items
this.time=res.data.time
console.log(this.time)
res.data.time.map((value,index)=>{
console.log(value)
let arr= {
prop:'',
label:value.toString()
}
this.columns.push(arr)
})
/* console.log(this.tableData)*/
/* console.log(this.tableData.task)*/
/* res.data.items.map((value,index)=>{
console.log(value)
})*/
})

3传值

data() {
return {
menus:[],
status:[],
/*表头*/
columns: [
{ type: "ID", width: "50" },
/*任务名称id*/
{ prop: "id", label: "ID", width: "100", sortable: true },
/*订单名称 name*/
{ prop: "name", label: "账号名称", sortable: true },
],
query:{},
/*绑定的taskTableData里面的数据*/
tableData: [

],

};

前端工作总结125-数据在表格横坐标动态显示_数据_02



举报

相关推荐

0 条评论