讨论数量:
// 列表页
public function index(Content $content)
{
Admin::script(
// 点击行操作
<<<JS
$('tbody').on('click', 'tr td', function () {
var index = $(this).index();
if (index > 0) {
// 排除第一列的 checkbox
}
});
JS
);
return $content
->translation($this->translation())
->title($this->title())
->description($this->description()['index'] ?? trans('admin.list'))
->body($this->grid());
}
推荐文章: