$grid->actions(function ($actions) {
// 去掉查看
$actions->disableView();
});
//去掉复选框
$grid->disableRowSelector();
//禁用行操作
$grid->disableActions();
//禁用新增按钮
$grid->disableCreation();
$grid->actions(function ($actions) {
//关闭行操作 删除
$actions->disableDelete();
});
//关闭批量操作
$grid->tools(function ($tools) {
$tools->batch(function ($batch) {
$batch->disableDelete();
});
});
$form //表单bottom $form->disableReset(); $form->disableEditingCheck(); $form->disableViewCheck(); //表单右上角 $form->tools(function (FormTools $tools) { $tools->disableDelete(); $tools->disableView(); }); $grid // 表单右上角 $grid->disableExport(); $grid->disableCreation(); // 操作按钮 $grid->actions(function (GridDisplayersActions $actions) { $actions->disableDelete(); $actions->disableEdit(); $resDemand = Demand::find($actions->getKey()); $edit_html=''; //通过 if($resDemand->status==1){ $edit_html.="<span class='mb-5'><a class='grid-row-pass' title='通过' data-id='{$actions->getKey()}'><i class='glyphicon glyphicon-ok'></i></a></span>"; $actions->append($edit_html); }); // 批量操作 $grid->tools(function (GridTools $tools) { $tools->batch(function (GridToolsBatchActions $actions) { $actions->disableDelete(); }); }); $show //表单右上角 $show->panel()->tools(function ($tools){ $tools->disableDelete(); $tools->disableEdit(); });