Cannot read property 'length' of undefined

除了网上说的column数量要和一样外,还有一个,dataTable只接受数组类型的数据.

Array of arrays

data: [  
                    [  
                        "name":    "Tiger Nixon1",  
                        "position":   "System Architect1",  
                        "phone": { "plain": 5552368, "filter": "5552368 555-2368", "display": "555-2368" ],  
                        "salary":    "$3,1201",  
                        "start_date": "2011/04/25",  
                        "office":    "Edinburgh1",  
                        "extn":    "54211"  
                    ],  
                    [  
                        "name":    "Tiger Nixon2",  
                        "position":   "System Architect2",  
                        "phone": { "plain": 5552368, "filter": "5552368 555-2368", "display": "555-2368" },  
                        "salary":    "$3,1202",  
                        "start_date": "2011/04/25",  
                        "office":    "Edinburgh2",  
                        "extn":    "54212"  
                    ],  
                    [  
                        "name":    "Tiger Nixon3",  
                        "position":   "System Architect3",  
                        "phone": { "plain": 5552368, "filter": "5552368 555-2368", "display": "555-2368" },  
                        "salary":    "$3,1203",  
                        "start_date": "2011/04/25",  
                        "office":    "Edinburgh3",  
                        "extn":    "54213"  
                    ] 

或者

Array of objects

"data":[
    {"":"",
    "":"",
     "":""
    },
    {"":"",
    "":"",
     "":""
    }
]

最后注意,返回值实体 Result.data = EntityList。 要放在名为data的字段里。

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2021-09-16
  • 2021-10-11
  • 2021-09-11
  • 2021-11-22
  • 2021-07-09
  • 2021-12-02
猜你喜欢
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-05-03
  • 2021-04-10
相关资源
相似解决方案