datatables 報錯 Uncaught TypeError: Cannot read property ‘DT_RowId‘ of null

使用 Datatables 時,頁面報錯 Uncaught TypeError: Cannot read property 'DT_RowId' of null 報錯如下圖   報錯原因:後臺沒有返回給前端每條數據的唯一標識,即主鍵 解決辦法:後臺把每條數據的唯一標識返回給前端即可   參考文檔:https://datatables.net/manual/tech-notes/14#Why-DT_
相關文章
相關標籤/搜索