zoukankan      html  css  js  c++  java
  • laravel-admin 关闭(新增,删除,批量操作,导入导出,修改)按钮

    
    
    $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(); });
     
  • 相关阅读:
    Linux虚拟内存管理(glibc)
    linux kernel内存回收机制
    Linux的Cache Memory(缓存内存)机制
    imx6用文件io操作gpio
    imx6中iomux IO复用
    start with git
    Linux进程的虚拟内存区域划分
    关于函数返回值为指针类型的分析
    对LCD接口的认识
    LCD屏背光驱动调试心得---血的教训
  • 原文地址:https://www.cnblogs.com/zhumengyang/p/13595836.html
Copyright © 2011-2022 走看看