跳转到内容

Attachment

附件展示

API

编辑态

IAttachmentEditableProps

参数类型说明默认值
showInlineTipsboolean是否展示内联提示-
customFilePathstring自定义上传路径-
tipstring自定义提示文案,可支持模版字符串,例如tip=“最多支持${countLimit}个文件${allowedTypeString},单个文件不大于${maxSizeString}” countLimit:最大文件个数;allowedTypeString:支持的文件类型;maxSizeString: 文件最大Size-
removeConfirmTextstring自定义删除上传文件的文案,配置后在删除文件时会弹出二次确认框-
maxSizenumber指定文件最大体积-
allowedTypesstring[]限制上传文件类型-
countLimitnumber限制上传数量-
展示态

IAttachmentReadonlyProps

参数类型说明默认值
listType’text’ | ‘picture-card’展示方式-
isProgressiveUploadListboolean是否渐进式展示-

示例图

18

示例代码

<View title="Attachment" version="2">
<Form model="trantor_doc_Person">
<Fields>
<Field name="avatar">
<RenderType>
<Attachment showInlineTips="#{false}" />
</RenderType>
</Field>
</Form>
</View>

注意:当前例子为0.17.x 版本