初始化 form 动态表单的详情,暂未接入数据

This commit is contained in:
YunaiV
2022-01-02 09:59:47 +08:00
parent 430f1369be
commit dffd175ccf
17 changed files with 1032 additions and 26 deletions

View File

@ -0,0 +1,17 @@
export default {
'list-type': (h, conf, key) => {
const list = []
const config = conf.__config__
if (conf['list-type'] === 'picture-card') {
list.push(<i class="el-icon-plus"></i>)
} else {
list.push(<el-button size="small" type="primary" icon="el-icon-upload">{config.buttonText}</el-button>)
}
if (config.showTip) {
list.push(
<div slot="tip" class="el-upload__tip">只能上传不超过 {config.fileSize}{config.sizeUnit} {conf.accept}文件</div>
)
}
return list
}
}