| | |
| | | function buildElInputChild(conf) { |
| | | const children = [] |
| | | if (conf.prepend) { |
| | | children.push(`<template slot="prepend">${conf.prepend}</template>`) |
| | | children.push(`<template #prepend>${conf.prepend}</template>`) |
| | | } |
| | | if (conf.append) { |
| | | children.push(`<template slot="append">${conf.append}</template>`) |
| | | children.push(`<template #append>${conf.append}</template>`) |
| | | } |
| | | return children.join('\n') |
| | | } |
| | |
| | | const list = [] |
| | | 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">${conf.buttonText}</el-button>`) |
| | | if (conf.showTip) list.push(`<div slot="tip" class="el-upload__tip">只能上传不超过 ${conf.fileSize}${conf.sizeUnit} 的${conf.accept}文件</div>`) |
| | | if (conf.showTip) list.push(`<template #tip><div class="el-upload__tip">只能上传不超过 ${conf.fileSize}${conf.sizeUnit} 的${conf.accept}文件</div></template>`) |
| | | return list.join('\n') |
| | | } |
| | | |