鍍金池/ 問(wèn)答/HTML/ 前端怎樣設(shè)定帶表頭的數(shù)據(jù)model?

前端怎樣設(shè)定帶表頭的數(shù)據(jù)model?

clipboard.png
前端怎樣寫一個(gè)帶有表頭的數(shù)據(jù)model?,前端給后端定的model
"abc":[

           {
                "headerText": "營(yíng)收",
                "content": [
                    {
                        "text": "32145.9",
                        "preson": "人",
                        "time": "時(shí)間"
                    }
                ]
            },
            {
                "headerText": "EPS",
                "content": [
                    {
                        "text": "3.81",
                        "preson": "人"
                        "time": "時(shí)間"
                    }
                ]
            }
        ]
回答
編輯回答
遲月
[
        {
            company:'', //公司
            revenue:'', //營(yíng)收
            EPS:'',     //EPS
            Growth:''   //成長(zhǎng)值
        },
        {
            company:'', //公司
            revenue:'', //營(yíng)收
            EPS:'',     //EPS
            Growth:''   //成長(zhǎng)值
        }
    ]
ps:easyUI里渲染table就推薦這種數(shù)據(jù)格式
2018年1月9日 09:17
編輯回答
尋仙
{
  A公司: {營(yíng)收: 1, EPS: 2, 成長(zhǎng)率: 3},
  B公司: {營(yíng)收: a, EPS: b, 成長(zhǎng)率: c},
  ...
}
2017年7月12日 13:47