💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
>[danger] 友情提示:构建器目前只支持HisiPHP Pro版本([我要升级](https://www.hisiphp.com/authorize.html)) ## 开关(switch) | 参数 | 类型 | 必须 | 默认 | 说明 | --- | --- | --- | --- | --- | | type | string | Y | | 固定值:switch | | name | string | Y | | 字段名称 | | title | string | Y | | 标题 | | value | int | N | 0 | 默认值,0关闭、1开启 | | grid | Array | N | [12, 12, 12, 12] | [栅格布局](栅格布局.md)| | tips | string | N | | 提示说明 | | disabled | bool | N | | disabled属性 | | text | string | N | ON`|`OFF | 状态文本 | >[info]![](https://box.kancloud.cn/bc700c6b8eab53aff301836117ec9f84_1146x94.jpg) >[]示例代码: ``` $assign['buildForm']['items'] = [ [ 'type' => 'switch', 'title' => '开关', 'name' => 'switch', 'text' => '开|关', 'value' => '1', 'tips' => '这是一个开关', ], // 更多表单项.... ]; $this->assign($assign); ```