企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
**图片上传(image)** | 参数 | 类型 | 必须 | 默认 | 说明 | |----|--------|-----|------|------| | type| string | y | 空 | 固定值:image | | name| string | y | 空 | 字段名称 | | id | string | y | 空 | id属性 | | title | string | n | 空 | 字段标题 | | placeholder | string | n | 空 | 输入预期提示 | | tips| string | n | 空 | 提示说明 | | value | string | n | 空 | 字段默认值 | | onSuccess | string | n | 空 | 上传成功回调 | | onError | string | n | 空 | 上传失败回调 | | onComplete | string | n | 空 | 全部上传完成 | | multiple | bool | n | false | 是否可选择多个值 | | autofocus | bool | n | false | 自动获得焦点属性 | | readonly | bool | n | false | 字段只读属性 | | disabled | bool | n | false | 字段禁用属性 | | required | bool | n | false | 必须输入值属性 | | class | string | n | row form-group | class属性<br>row<br/>form-row<br/>form-group<br/>form-check<br/>form-check-inline<br/>disabled<br/>d-block<br/>align-items-center<br/>custom-control<br/>custom-control-inline<br/>custom-select<br/>custom-checkbox<br/>custom-switch<br/>custom-radio<br/>custom-select-sm<br/>custom-select-lg | | class_left | string | n | col-md-2 | class属性<br>col<br>col-12<br>col-form-label-sm<br/>col-form-label-lg<br/>sr-only | | class_right| string | n | col-md-6 | class属性<br>col<br>col-12<br>col-auto | | class_right_control | string | n | form-control form-control-sm | class属性<br>form-control<br>form-control-sm<br>form-control-lg<br>is-valid | | class_tips | string | n | form-text text-muted | class属性<br>form-text | **示例代码** ``` {:DcBuildForm([ 'items'=>[ [ 'type'=>'image', 'name'=>'dc_image', 'id'=>'dc_image', 'title'=>'image', 'placeholder'=>lang('image'), 'tips'=>'', 'value'=>'18/8573067dd9950dfee1d462012bc8416998a1e2.png', 'onSuccess'=>'daicuo.form.upSuccess', 'onError'=>'daicuo.form.upError', 'onComplete'=>'daicuo.form.upComplete', 'multiple'=>true, 'autofocus'=>false, 'readonly'=>false, 'disabled'=>false, 'required'=>false, 'class'=>'row form-group', 'class_left'=>'col-12', 'class_right'=>'col-12', 'class_right_control'=>'', 'class_tips'=>'', ], ] ])} ```