jquery - 未捕获的类型错误:无法使用 laravel 读取未定义的属性“mData”
问题描述
我有下表:
<div class="row">
<div class="col-12 mb-4 data-table-rows data-tables-hide-filter">
<table id="datatableRows" class="data-table responsive nowrap"
data-order="[[ 1, "desc" ]]">
<thead>
<tr>
<th>Name</th>
<th>Sales</th>
<th>Stock</th>
<th>Category</th>
<th>test</th>
<th>test2</th>
<!-- <th class="empty"> </th> -->
</tr>
</thead>
<tbody>
@foreach($castings as $cast)
<tr>
<td>
<p class="list-item-heading">{{ $cast->casting_name }}</p>
</td>
<td>
<p class="text-muted">{{ $cast->casting_cin }}</p>
</td>
<td>
<p class="text-muted">{{ $cast->casting_email }}</p>
</td>
<td>
<p class="text-muted">{{ $cast->casting_phone }}</p>
</td>
<td>
<p class="text-muted">{{ $cast->casting_city }}</p>
</td>
<td>
<p class="text-muted">{{ $cast->casting_address}}</p>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
但是当我执行我的代码时出现这个错误:
datatables.min.js:101 Uncaught TypeError: Cannot read property 'mData' of undefined
at HTMLTableCellElement.<anonymous> (datatables.min.js:101)
它包含<thead>
和<tbody>
标签,
列数也相等
我看不出问题出在哪里
如果你有任何想法请帮助我
解决方案
推荐阅读
- php - preg_replace 与回调不替换?
- javascript - 在滚动时将 div 捕捉到页面顶部时出现问题
- sql - 在 SQL 中复制 VBA 解决方案
- azure - 允许从托管服务标识到 Azure 功能的无密钥授权
- excel - 当我尝试根据组合框选择填充文本框时出现错误
- c++ - 如何摆脱 C++ 中的空行?
- angular - 从 NPM 包中的 SCSS 文件导入的样式不适用于我的角度组件
- android - 如何在屏幕旋转时存储大量数据?
- spring-integration - 处理具有相同消息的连续 HTTP 调用
- python - Docker swarm 服务到服务调用