新增加文件上传

This commit is contained in:
不做码农
2021-12-09 22:21:44 +08:00
parent 6f11bae15c
commit 944967afa3
6 changed files with 214 additions and 6 deletions

View File

@@ -89,6 +89,15 @@ namespace ZR.CodeGenerator
sb.AppendLine(" </el-form-item>");
sb.AppendLine(" </el-col>");
}
else if (dbFieldInfo.HtmlType == GenConstants.HTML_FILE_UPLOAD)
{
//文件
sb.AppendLine(" <el-col :span=\"24\">");
sb.AppendLine($" <el-form-item label=\"{labelName}\" :label-width=\"labelWidth\" prop=\"{columnName}\">");
sb.AppendLine($@" <UploadFile v-model=""form.{columnName}"" column=""{columnName}"" @input=""handleUploadSuccess"" />");
sb.AppendLine(" </el-form-item>");
sb.AppendLine(" </el-col>");
}
else if (dbFieldInfo.HtmlType == GenConstants.HTML_RADIO && !string.IsNullOrEmpty(dbFieldInfo.DictType))
{
sb.AppendLine(" <el-col :span=\"12\">");