<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 操作欄 > 圖片示例: ![](https://img.kancloud.cn/92/82/9282f509b92a6f2569f3af35474a7ebd_1920x903.png) > 配置項 | key | 類型 | 是否必須 | 說明 | | --- | --- | --- | --- | | templet | string | 是 | 固定值:`action` | | 通用配置... | | title | string | 否 | 表頭標題,默認`操作` | | align | string | 否 | 排列方式,可選值`left`、`center`、`right`,默認`center` | | fixed | bool或string | 否 | 列固定,可選值`left`、`right`、`(bool)false`,默認`right` | | options | array | 是 | 操作項,詳見下面`操作項配置` | > 操作項配置 | key | 類型 | 是否必須 | 說明 | | --- | --- | --- | --- | | type | string | 是 | 觸發事件類型,可選值:<br>`open_tab`打開子頁面、<br>`open_popup`打開彈出層頁面、<br>`async_event`異步事件 | | title | string | 否 | 標題 | | event | string | 否 | 觸發事件名,主要用于type=async_event的異步請求。默認為當前設置項的`key`值 | | icon | string | 否 | 顯示圖標的`class` | | url | string | 否 | 觸發事件執行的url,默認當前表格地址 | | confirm_text | string | 否 | 觸發事件前,彈出確認彈窗,確認時間執行的提示 | | dropdown | bool | 否 | 是否下拉操作,默認`false` | > 代碼示例: ~~~ $builder=YT('general_example')->state(DbRowState::state()) ->cols(function($state){ $cols=[ 'id'=>['type'=>'checkbox'], // 字段name_cn,對應中文姓名表頭 'name_cn'=>['title'=>'中文姓名'], // 操作欄 'action'=>[ 'title'=>'操作', 'templet'=>'action', // 避免和系統action函數名沖突 'options'=>[ 'edit'=>['type'=>'open_popup','title'=>'詳情','icon'=>'layui-icon layui-icon-survey','url'=>url('edit')] ] ], ]; switch ($state){ case DbRowState::ACTIVE: $cols['action']['options']+=[ DbRowState::TRASH=>['type'=>'async_event','title'=>'移入回收站','dropdown'=>true], ]; break; case DbRowState::TRASH: $cols['action']['options']+=[ DbRowState::ACTIVE=>['type'=>'async_event','title'=>'還原','dropdown'=>true], DbRowState::REMOVED=>['type'=>'async_event','title'=>'永久刪除','dropdown'=>true] ]; break; } return $cols; }) ->event(function ($event,$ids){ switch ($event){ case DbRowState::ACTIVE: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',DbRowState::TRASH], ])->update(['update_time'=>time(),'state'=>DbRowState::ACTIVE]); } return success_json(); case DbRowState::TRASH: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',DbRowState::ACTIVE], ])->update(['update_time'=>time(),'state'=>DbRowState::TRASH]); } return success_json(); case DbRowState::REMOVED: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',DbRowState::TRASH], ])->update(['update_time'=>time(),'state'=>DbRowState::REMOVED]); } return success_json(); default: return error_json(); } }) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看