<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## 操作欄 > 圖片示例: ![](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>`openTab`打開子頁面、<br>`openPopup`打開彈出層頁面<br>其他情況默認為`asyncEvent`異步事件 | | title | string | 否 | 標題 | | class | string | 否 | 額外的class,可含圖標的`class` | | url | string | 否 | 觸發事件執行的url,默認當前地址。<br>當`type=openTab或openPopup`時,會自動攜帶上id參數。 | | confirmText | string | 否 | 觸發事件前,彈出確認彈窗,確認時間執行的提示 | | dropdown | bool | 否 | 是否下拉操作,默認`false` | > 提示:觸發事件名為配置項key,主要用于type=asyncEvent的異步請求。 > 代碼示例: ~~~ $builder=YT('general_example')->state([...]) ->cols(function($state){ $cols=[ 'id'=>['type'=>'checkbox'], // 字段name_cn,對應中文姓名表頭 'name_cn'=>['title'=>'中文姓名'], // 操作欄 'action'=>[ 'title'=>'操作', 'templet'=>'action', // 避免和系統action函數名沖突 'options'=>[ 'edit'=>['type'=>'openPopup','title'=>'詳情','icon'=>'layui-icon layui-icon-survey','url'=>url('edit')] ] ], ]; switch ($state){ case 11: $cols['action']['options']+=[ 22=>['type'=>'asyncEvent','title'=>'移入回收站','dropdown'=>true], ]; break; case 22: $cols['action']['options']+=[ 11=>['type'=>'asyncEvent','title'=>'還原','dropdown'=>true], 99=>['type'=>'asyncEvent','title'=>'永久刪除','dropdown'=>true] ]; break; } return $cols; }) ->event(function ($event,$ids){ switch ($event){ case 11: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',22], ])->update(['update_time'=>time(),'state'=>11]); } return success_json(); case 22: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',11], ])->update(['update_time'=>time(),'state'=>22]); } return success_json(); case 99: foreach ($ids as $id){ Db::name('example')->where([ ['id','eq',$id], ['state','eq',22], ])->update(['update_time'=>time(),'state'=>99]); } 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>

                              哎呀哎呀视频在线观看