# 文件上传框

# 组件名

FileBox

# 配置项

# 样例

{
  "name": "FileBox",
  "label": "文件上传框",
  "seats": [],
  "explain": "",
  "conf": {
    "action": "/file/upload?objectCode={objectCode}&fieldCode={fieldCode}",
    "drag": false,
    "tip": "上传文件限制不超过2M",
    "auto-upload": true,
    "show-file-list": true,
    "limit": 1,
    "multiple": false
  }
}

# 详细说明

配置项 数据类型 是否必须 备注
name String 在同一容器组件中,确保唯一!当容器组件为表单(FormView)时, name表示此表单项的prop。强烈推荐此值就使用默认的元字段名,即字段名
label String 一般为中文,表单项的label,表格表头的列名
seats Array 可直接参考ImgBox中的上传模式
explain String 当处于表单容器中时, 此值会作为表单项label后面的?补充提示,一般用于表单填写的说明
conf Object 这是ElementUI中el-upload (opens new window)组件的原生配置项。 内置list-type=text

WARNING

FileBoxImgBox唯一的区别,就是FileBox内置配置list-type=text, 而ImgBox内置配置list-type=picture-card。 因此其他内容都一样,请直接参考ImgBox

Last Updated: 4/26/2022, 2:40:15 PM