时间:2020-12-22 18:45:57 | 栏目:PHP代码 | 点击:次
如下所示:
$grid->actions(function (Grid\Displayers\Actions $actions) { if ($actions->getKey() == 1) { $actions->disableDelete(); } });
禁止 列表的删除操作
$grid->tools(function (Grid\Tools $tools) { $tools->batch(function (Grid\Tools\BatchActions $actions) { $actions->disableDelete(); }); });
或者:
$grid->actions(function ($actions) { //关闭行操作 删除 $actions->disableDelete(); });