<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智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ### 方法 動態下拉選擇控件實例: ```php $select2= $formControl->selectDynamic(); ``` select2配置項: 1. 選擇后,不關閉選項內容 ```php $select2->unCloseOnSelect(); ``` 2. 其他配置項設置 ~~~ $select2->uiConfig($key, $value); // 示例 1 $select2->uiConfig('allowClear', false); // 是否允許清除選中 // 示例 2 $select2->uiConfig('width', '120px'); // 控件寬 // 示例 3 $select2->uiConfig('selectedInOrder', false); // 多選時,是否按選擇順序排序 // 示例 4 $select2->uiConfig('selectedHideOption', false); // 多選時,是否隱藏已選擇過的選項 ~~~ 設置刷新按鈕: ```php $select2->refreshBtn() ``` 設置新增按鈕位置:`left|right` ```php $select2->additionBtnPosition('left'); ``` 設置刷新按鈕位置:`left|right` ```php $select2->refreshBtnPosition('right'); ``` 設置動態數據選項: ```php $select2->dataUrl('admin/link') ``` > 動態數據選項格式 ```php public function actionLink() { $res = [ '中國' => [ ['value' => 'D', 'text' => '鄭州市', 'disabled' => true], ['value' => 'E', 'text' => '東莞市'], ['value' => 'F', 'text' => '北京市'], ], '美國' => [ ['value' => 'G', 'text' => '西安市', 'disabled' => true], ['value' => 'H', 'text' => '新鄉市'], ['value' => 'I', 'text' => '洛陽市'], ], ]; $res2 = [ ['value' => 'D', 'text' => '鄭州市', 'disabled' => false], ['value' => 'E', 'text' => '東莞市'], ['value' => 'F', 'text' => '北京市'], ['value' => 'G', 'text' => '新鄉市'], ['value' => 'H', 'text' => '洛陽市'], ['value' => 'I', 'text' => '開封市'], ['value' => 'IE', 'text' => '開封市2222'], ]; return $this->asOk('success', $res2); } ``` 動態新增 1. 依賴注入 ```php $select->additionBtn(function(DselectModal $model) { return $modal->route('form/addition')->title('新增')->height(230); }) ``` 2. DsType ```php $dselectModel = new DselectModal; $select->additionBtn($dselectModel->route('form/addition')->title('新增')->height(230)) ``` 3. array數組 ```php // modal模態框 $select->additionBtn([ 'type' => 'modal', 'route' => Url::to('admin/get-all', ''), 'width' => '620px', // 指定modal的寬; 'height' => '750px',// 指定modal的高; 'title' => '',//指定modal標題 'closeBtn' => 0,//是否顯示底部關閉按鈕 ]) // page單頁 $select->additionBtn([ 'type' => 'page', 'route' => Url::to('admin/get-all', ''), 'target' => '_blank', //支持有效的JS窗口對象 'window' => 'top', ]) ``` 設置多選分組選項: ```php $select2->options([ // 分組名稱 '會員列表' => [ 'A' => '數字1', // 選擇項 'B' => '數字2', 'C' => '數字3', ], '日志列表' => [ 'D' => '日志1', 'E' => '日志2', 'F' => '日志3', ], ]); ``` 設置禁用項: ```php $select->disabled([ 'A', 'D', ]); ``` 設置多選: ```php $select->multiple(); ``` 設置控件標簽: ```php $select2->label('下拉選擇'); ``` 設置占位提示: ```php $select2->placeholder('請選擇'); ``` 設置默認值: ```php $select2->defaultValue('B'); ``` 設置為必填: ```php $select2->required(true); ``` 設置注釋文本: ```php $select2->comment('這里是一個注釋文本'); ``` 設置柵欄布局 (默認:12`): ```php $select2->layout(6); ``` 設置ui類: ```php $select2->uiClass(['f13']); ``` 設置style樣式: ```php $select2->style(); ``` 設置html屬性: ```php $select2->attribute(); ``` ### 鏈式調用 ~~~ $formBuilder->setFormControl([ 'a' => $this->formControl->text()->label('普通文本'), 'b' => $this->formControl->selectDynamic() ->label('動態下拉1') ->layout(12) ->required() ->placeholder('請填寫一下') ->defaultValue(['F']) ->unCloseOnSelect() ->multiple() //->refreshBtn() //->refreshBtnPosition() ->additionBtn(function (DselectModal $modal) { return $modal->route('form/addition')->title('新增')->height(230); }) //->additionBtnPosition() ->dataUrl('form/link') ->comment(''), ]); ~~~ ### 代碼示例 ~~~ /** * @return string * @throws \ReflectionException * @throws \builder\base\UndefinedParamsException * @throws \yii\base\InvalidConfigException */ public function actionDynamicSelect() { if ($this->isPost) { return $this->asOk('提交成功'); } else { $formBuilder = FormBuilder::instance(); $formBuilder->setTitle('動態下拉框') ->setRequiredStyle() ->setFormControl([ 'a' => $this->formControl->text()->label('普通文本'), 'b' => $this->formControl->selectDynamic() ->label('動態下拉1') ->layout(12) ->required() ->placeholder('請填寫一下') ->defaultValue(['F']) ->unCloseOnSelect() ->multiple() //->refreshBtn() //->refreshBtnPosition() ->additionBtn(function (DselectModal $modal) { return $modal->route('form/addition')->title('新增')->height(230); }) //->additionBtnPosition() ->dataUrl('form/link') ->comment(''), ]) ->setResetBtn() ->setSubmitBtn(); return $formBuilder->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>

                              哎呀哎呀视频在线观看