表单 · form-files 多文件上传
input[data-type="files"] 多文件上传:与 file 同构,但可多选追加多项(a.upload multiple:true),value 存 JSON 数组。
data-url 必填;data-uptype 同 file。每项渲染为文件卡片,可下载 / 删除,删除即回写 value。
表单家族
索引
base
input
textarea
select
number
search
checkbox
radio
switch
choose
multipled
labels
inpselect
button
label
file
files
upload
video
image
images
imgurls
date
datetime
color
price
sms
sign
listing
json
arrays
infinite
location
latlng
editor
richtext
line
modifier
data
关键属性
| 属性 | 说明 |
|---|---|
data-type | files(必填) |
data-url | 上传接口地址(必填) |
data-uptype | auto / complete / slice |
value | 已存文件 JSON 数组 [{name,url}] |
多文件上传
<div class="form-item">
<label class="label label-text pd-none">活动附件</label>
<input type="hidden" data-type="files" name="attachs" data-url="/admin/uploads" value='[{"name":"活动方案.docx","url":"../assets/welcome-top.png"},{"name":"报名名单.xlsx","url":"../assets/welcome-top.png"}]'>
</div>
KuoqiUI v2.00 · 离线静态文档 · 界面基于 KuoqiUI ·
返回首页