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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                > addButton('字段名稱', '字段別名'[, '按鈕屬性' , '按鈕類型']) 標識符:`button` | 參數 | 含義 | 類型 | 必填 | | --- | --- | --- | --- | | name | 字段名稱(英文) | string | 是 | | title | 字段別名(中文)| string | 是 | | attr | 按鈕屬性 | array | 否 | | elemtype | 按鈕類型 | string | 否 | ## button 按鈕 默認為`button`類型的按鈕,如下所示代碼會生成一個`id`為`test`的`button`。實際應用中往往需要**額外JS代碼**來配合使用。 ~~~ return FormBuilder::getInstance() ->addButton('test', '自定義') ->fetch(); ~~~ ![](https://img.kancloud.cn/69/be/69be9d405c92096e238bf66555369d14_109x55.png) ## a標簽按鈕 `a`標簽按鈕通常需要配合自定義屬性的`href`來使用,如下所示代碼會生成一個點擊后跳轉新頁面的按鈕(`target`和`href`屬性僅適用于a標簽按鈕) ~~~ // 定義按鈕屬性 $btn = [ 'target' => '_blank', 'href' => url('add') ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn, 'a') ->fetch(); ~~~ ## 添加圖標 `button `和 `a` 按鈕都可以通過 `icon `來定義一個圖標 ~~~ // 定義按鈕屬性 $btn = [ 'target' => '_blank', 'href' => url('add'), 'icon' => 'fa fa-plus-circle', ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn, 'a') ->fetch(); ~~~ ### 按鈕顏色 `button `和 `a` 按鈕都可以通過 `class`來改變按鈕的顏色。常用的樣式為 `btn-success` , `btn-primary` , `btn-info` , `btn-danger` , `btn-warning`, `btn-default` ~~~ // 定義按鈕屬性 $btn = [ 'target' => '_blank', 'href' => url('add'), 'class' => 'btn-success', ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn, 'a') ->fetch(); ~~~ ![](https://img.kancloud.cn/8d/61/8d615f1256dbf92353926d3c5b29ac3d_98x58.png) ![](https://img.kancloud.cn/50/00/5000c475e1ec579c95bc92567c6a9d22_260x465.png) ## 禁用按鈕 `button `和 `a` 按鈕都可以通過 `disabled`來禁用按鈕 ~~~ // 定義按鈕屬性 $btn = [ 'icon' => 'fa fa-plus-circle', 'class' => 'btn-success', 'disabled' => '', ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn) ->fetch(); ~~~ ## 修改按鈕id 默認情況下,按鈕的`id`值是`name`參數的值,如果需要修改按鈕的`id`,可以直接給`id`另外賦值。 ~~~ // 定義按鈕屬性 $btn = [ 'icon' => 'fa fa-plus-circle', 'class' => 'btn-success', 'id' => 'newid', ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn) ->fetch(); ~~~ ## 添加自定義屬性 還可以給按鈕添加一些自定義屬性,但僅限于“data-”開頭。 ~~~ // 定義按鈕屬性 $btn = [ 'icon' => 'fa fa-plus-circle', 'class' => 'btn-success', 'data-url' => 'http://siyucms.com' ]; return FormBuilder::getInstance() ->addButton('test', '自定義', $btn) ->fetch(); ~~~
                  <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>

                              哎呀哎呀视频在线观看