2022-12-14 16:57:57 +08:00
|
|
|
export default {
|
2022-12-15 17:30:55 +08:00
|
|
|
"list-type": (conf, key) => {
|
|
|
|
const list = [];
|
|
|
|
const config = conf.__config__;
|
|
|
|
if (conf["list-type"] === "picture-card") {
|
|
|
|
list.push(<i class="el-icon-plus"></i>);
|
2022-12-14 16:57:57 +08:00
|
|
|
} else {
|
2022-12-15 17:30:55 +08:00
|
|
|
list.push(
|
|
|
|
<el-button size="small" type="primary" icon="el-icon-upload">
|
|
|
|
{config.buttonText}
|
|
|
|
</el-button>
|
|
|
|
);
|
2022-12-14 16:57:57 +08:00
|
|
|
}
|
|
|
|
if (config.showTip) {
|
|
|
|
list.push(
|
2022-12-15 17:30:55 +08:00
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
只能上传不超过 {config.fileSize}
|
|
|
|
{config.sizeUnit} 的{conf.accept}文件
|
|
|
|
</div>
|
|
|
|
);
|
2022-12-14 16:57:57 +08:00
|
|
|
}
|
2022-12-15 17:30:55 +08:00
|
|
|
return list;
|
|
|
|
},
|
|
|
|
};
|