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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## addBlock('類型', '標題', '列表') 側欄構建器內置了四種不同類型的區塊,分別是recent、online、switch、html。 ### recent 一般用于展示最近事項,列表數據是一個數組,每個元素可以定義4個參數:title、link、tips、icon。 | 參數 | 含義 | | --- | --- | | title | 標題 | | link | 鏈接 | | tips | 提示 | | icon | 字體圖標 | ~~~ $recent_list = [ [ 'title' => '最近編輯文件', 'link' => [ 'title' => '<i class="fa fa-file-text-o"></i> Documentation.doc', 'url' => url('index') ], 'tips' => '15 分鐘前', 'icon' => 'si si-pencil text-info' ], [ 'title' => '最近刪除文件', 'link' => [ 'title' => '<i class="fa fa-file-text-o"></i> Documentation2.doc', 'url' => url('index') ], 'tips' => '4 小時前', 'icon' => 'si si-close text-danger' ] ]; // 使用ZBuilder快速側欄 ZBuilder::make('aside')->addBlock('recent', '最近事項', $recent_list); ~~~ ![](https://box.kancloud.cn/19d280fff6ba67af5d3a5bf768ef7ace_326x295.png) ### online 一般用于展示在線用戶,每個元素可以定義5個參數:name、link、tips、online、avatar。 | 參數 | 含義 | | --- | --- | | name | 用戶名 | | link | 鏈接 | | tips | 提示 | | online | 在線狀態:1或0 | | avatar | 頭像 | ~~~ $online_list = [ [ 'name' => '張三', 'link' => url('index'), 'avatar' => '/static/admin/img/avatar.jpg', 'online' => 1, 'tips' => '村支書' ], [ 'name' => '李四', 'link' => url('index'), 'avatar' => '/static/admin/img/avatar.jpg', 'online' => 1, 'tips' => '主任' ], [ 'name' => '王五', 'link' => url('index'), 'avatar' => '/static/admin/img/avatar.jpg', 'online' => 0, 'tips' => '小職員' ] ]; // 使用ZBuilder快速側欄 ZBuilder::make('aside')->addBlock('online', '在線用戶', $online_list); ~~~ ![](https://box.kancloud.cn/2349f6c69323c4eb78c3ce4f4aa712d1_328x373.png) ### switch 一般用于某些參數狀態的設置,每個元素有6個參數:title、tips、checked、table、id、field。 | 參數 | 含義 | | --- | --- | | title | 標題 | | tips | 提示 | | checked | 開關狀態:1或0 | | table | 數據表名 | | id | 主鍵值 | | field | 字段名 | ~~~ $settings = [ [ 'title' => '站點開關', 'tips' => '站點關閉后將不能訪問', 'checked' => Db::name('admin_config')->where('id', 1)->value('value'), 'table' => 'admin_config', 'id' => 1, 'field' => 'value' ] ]; // 使用ZBuilder快速側欄 ZBuilder::make('aside')->addBlock('switch', '系統設置', $settings); ~~~ ![](https://box.kancloud.cn/c0012a167d9157e4bdfe0e942eb2593a_331x225.png) ### html 也可以直接輸入html代碼 ~~~ $html = '<h1>自定義代碼</h1>'; // 使用ZBuilder快速側欄 ZBuilder::make('aside')->addBlock('html', $html); ~~~ ![](https://box.kancloud.cn/4132e907ca8821b5e2e73363d3419ca1_327x134.png) 支持傳入變量 ~~~ $html = '<h1>{$title}</h1>'; // 使用ZBuilder快速側欄 ZBuilder::make('aside')->addBlock('html', $html, ['title' => '自定義代碼']); ~~~ 以上4種類型可以一起使用 ~~~ ZBuilder::make('aside') ->addBlock('html', $html, ['title' => '自定義代碼']) ->addBlock('online', '在線用戶', $online_list) ->addBlock('recent', '最近事項', $recent_list) ->addBlock('switch', '系統設置', $settings); ~~~ ![](https://box.kancloud.cn/ed10a03c9f5e6a1b2c248544be06970e_336x771.png)
                  <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>

                              哎呀哎呀视频在线观看