<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國際加速解決方案。 廣告
                ### 方法 單頁實例: ```php $page = $toolbarCustom->page(); ``` 按鈕class樣式: ```php $page->btnClass('layui-btn-primary layui-border'); ``` 工具欄居右: ```php $page->positionRight(); ``` 行操作按鈕和頁標題: ```php $page->title('詳情'); ``` 行操作按鈕`icon`: ```php $page->icon('bi bi-plus-lg f15'); ``` 頁面路由: ```php $page->route('user/detail'); ``` 路由參數: ```php // 直接指定query中的字段 $page->params(['id']); ``` ```php // key-value, 字段指定值 $page->params(['id' => 1]); ``` ```php // key-占位符, 字段+字段占位符 $page->params(['action' => ':status']); ``` 設置內部鏈接模式: ```php $page->targetSelf(); ``` 設置外部鏈接模式: ```php $page->targetBlank(); ``` ### 鏈式調用 ~~~ $tableBuilder->setRowOperation([ // 詳情 $this->rowOperation->modal()->title('詳情')->icon('bi bi-plus-lg f15')->route('admin/detail'), $this->rowOperation->page()->title('測試')->icon('bi bi-x')->route('admin/detail')->params(['id' => 1])->targetBlank(), $this->rowOperation->ajax()->title('刪除')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除1')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除2')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除3')->id('ro_delete3')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), ]) ~~~ ### 代碼示例 ~~~ /** * 列表 * @return string * @throws \Throwable * @throws \builder\base\InvalidInstanceException * @throws \builder\base\NotFoundParamsException */ public function actionIndex() { $viewBuilder = $this->viewBuilder; $table = $viewBuilder->table; $table->setId('_admin_list'); if ($this->isAjax) { // AJAX $table->setQuery(function () { $params = $this->filteredGet; $query = Admin::find(); $query->filterWhere([ 'like', 'username', isset($params['keyword']) ? $params['keyword'] : null, ]); return $query; }) ->setOrderBy(['id' => SORT_DESC]) ->setColumns([ 'id', 'username', 'password_hash' => function($row) { return $row['password_hash']; // return MediaList::widget([ // 'media' => [ // 'https://buerzz.damanzj.com/upload/image/goods_manager/G20230406163045884/album_images/20230411112406L0K9PC73oN.jpg', // 'https://buerzz.damanzj.com/upload/image/goods_manager/G20230720164108385/album_images/20230720164331DNcGzFHn7d.png', // 'https://buerzz.damanzj.com/upload/image/goods_manager/G20230331142909667/album_images/202303311628517pMZoWtdEd.jpg', // ], // 'mediaHeader' => '佳能g7x2微單入門相機美顏自拍旅游', // 'mediaBody' => [ // '姓名:' => '楊心怡', // '性別:' => '女', // ], // 'mediaList' => [ // '所在地:' => '河南新鄉', // '微信:' => 'wx+15032785', // 'QQ:' => '654874554452', // '年齡:' => '1歲半', // '大學:' => '清華大學', // '愛好:' => '睡覺', // '成績:' => '100分', // '班級:' => '九年級', // '理想:' => '讓這個世界因為我而變得不一樣!', // '信念:' => '計算機信息網絡技術研究中心', // ], // ]); }, 'email', 'mobile', 'status', 'group', 'created_at', 'updated_at', 'ro_delete3' => function ($row) { return $row['id'] % 2; }, ]) ->setExtraData(function (Query $query) { return [ 'tol' => $query->count(), 'a' => 100000, ]; }); $render = $viewBuilder->render(); //return $table->data; return $render; } else { // HTML $table->setTitle('管理員列表') ->setExtraDataTpl([ 'tol' => '當前總數量', 'a' => '所在院校', ]) //->registerPointcut(H5::alert('測試一下', 'success')) //->registerPointcut(H5::alert('測試一下'), TableBuilder::POS_END) ->setAjaxRoute('admin/index') // ->setLineStyle([ // 'height' => '350px', // ]) ->setTableHead([ $this->tableHead->checkbox()->style([]), $this->tableHead->field('password_hash')->title('密碼')->minWidth(300), $this->tableHead->field('username')->title('賬號')->editText('admin/edit'), $this->tableHead->field('email')->title('郵箱')->maxWidth(220), $this->tableHead->field('mobile')->title('手機號'), $this->tableHead->field('created_at')->title('添加時間'), $this->tableHead->field('updated_at')->title('更新時間'), $this->tableHead->toolbar()->title('操作項')->maxWidth(180), ]) ->setRowOperation([ // 詳情 $this->rowOperation->modal()->title('詳情')->icon('bi bi-plus-lg f15')->route('admin/detail'), $this->rowOperation->ajax()->title('刪除')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除1')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除2')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), $this->rowOperation->ajax()->title('我要刪除3')->id('ro_delete3')->icon('bi bi-x-lg')->route('admin/delete')->method('POST')->group(), ]) ->setToolbarCustom([ // 表單 $this->toolbarCustom->modal()->btnClass('layui-btn-primary layui-border')->title('表單')->icon('bi bi-plus-lg f15')->route('__upload/index')->width(916)->height(655), // 列表 $this->toolbarCustom->modal()->btnClass('layui-btn-primary layui-border-green')->title('列表')->icon('bi bi-plus-lg f15')->route('admin/detail')->closeBtn(), // 選項卡 $this->toolbarCustom->modal()->btnClass('layui-btn-primary layui-border-blue')->title('選項卡')->icon('bi bi-pencil-square f13')->route('admin/edit')->closeBtn(), // AJAX $this->toolbarCustom->page()->btnClass('layui-btn-primary layui-border-orange')->title('AJAX')->icon('bi bi-lock')->targetBlank()->params(['id'])->route('admin/add'), ]) ->setToolbarFilter([ 'keyword' => $this->toolbarFilter->text()->label('關鍵詞')->placeholder('請輸入賬號/姓名')->defaultValue()->attribute(['test' => 1])->uiClass('w-330 mr-3'), //'username' => $this->toolbarFilter->datetime()->style(['width' => '800px'])->label('注冊時間')->placeholder('請選擇注冊時間'), //'username' => $this->toolbarFilter->datetime()->label('注冊時間')->placeholder('請選擇注冊時間'), /*'status' => $this->toolbarFilter->select()->label('用戶狀態')->uiClass(['layui-col-sm12'])->placeholder('請選擇用戶狀態')->options([ '分組1' => [ 'normal' => '正常', 'deny' => '禁用', ], '分組2' => [ 'A' => '不可以', 'B' => '可以', ], ])->disabled(['deny'])->uiClass('w-330 mr-3'),*/ 'link1' => $this->toolbarFilter->selectLink()->label('聯動1')->placeholder('請選擇')->route('admin/link')->initOptions([ '測試1' => [ 'a' => 'A', 'b' => 'B' ], '測試2' => [ 'c' => 'C', 'd' => 'D' ], ])->disabled(['d'])->targetLink('link2')->start()->uiClass('w-330'), 'link2' => $this->toolbarFilter->selectLink()->label('')->placeholder('請選擇')->route('admin/link')->targetLink('link3')->through()->uiClass('w-330'), 'link3' => $this->toolbarFilter->selectLink()->label('')->placeholder('請選擇')->end()->uiClass('w-330'), ]) ->setAutoRequest(true); return $viewBuilder->render(); } } ~~~
                  <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>

                              哎呀哎呀视频在线观看