🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
>[danger] 友情提示:构建器目前只支持HisiPHP Pro版本([我要升级](https://www.hisiphp.com/authorize.html)) ## 单图上传(image) | 参数 | 类型 | 必须 | 默认 | 说明 | --- | --- | --- | --- | --- | | type | string | Y | | 固定值:image | | name | string | Y | | 字段名称 | | title | string | Y | | 标题 | | value | string | N | | 默认图片 | | grid | Array | N | [12, 12, 12, 12] | [栅格布局](栅格布局.md)| | url | string | N | url('upload') | 文件上传接口 | | exts | string | N | | 允许上传的文件后缀,多个后缀用`|`隔开 | | tips | string | N | | 提示说明 | | disabled | bool | N | | 定义disabled属性 | | verify | string | N | | layui表单验证规则,[规则文档](https://www.layui.com/doc/modules/form.html#verify) | >[info] ![](https://img.kancloud.cn/f1/9f/f19ffcbc4d3d03b0478ce53f6c6f9358_735x47.png) >[]示例代码: ``` $assign['buildForm']['items'] = [ [ 'type' => 'image', 'title' => '单图上传', 'name' => 'image', 'verify' => 'required', 'exts' => 'jpg|png|gif', 'url' => url('upload'), 'tips' => '允许上传的后缀:jpg,png,gif', ], // 更多表单项.... ]; $this->assign($assign); ```