优化代码生成查询列表
This commit is contained in:
parent
b2abc465cf
commit
54a8c7f783
@ -229,7 +229,7 @@ namespace ZR.CodeGenerator
|
|||||||
//有排序字段
|
//有排序字段
|
||||||
if (!string.IsNullOrEmpty(genTable?.SortField.ToString()) && genTable?.SortField.ToString() == dbFieldInfo.CsharpField)
|
if (!string.IsNullOrEmpty(genTable?.SortField.ToString()) && genTable?.SortField.ToString() == dbFieldInfo.CsharpField)
|
||||||
{
|
{
|
||||||
sb.AppendLine($@" <el-table-column prop=""{columnName}"" label=""排序"" width=""90"" sortable align=""center"">");
|
sb.AppendLine($@" <el-table-column prop=""{columnName}"" label=""{label}"" width=""90"" sortable align=""center"">");
|
||||||
sb.AppendLine(@" <template slot-scope=""scope"">");
|
sb.AppendLine(@" <template slot-scope=""scope"">");
|
||||||
sb.AppendLine($@" <el-input size=""mini"" style=""width:50px"" controls-position=""no"" v-model.number=""scope.row.{columnName}"" @blur=""handleChangeSort(scope.row, scope.row.{columnName})"" v-if=""showEditSort"" />");
|
sb.AppendLine($@" <el-input size=""mini"" style=""width:50px"" controls-position=""no"" v-model.number=""scope.row.{columnName}"" @blur=""handleChangeSort(scope.row, scope.row.{columnName})"" v-if=""showEditSort"" />");
|
||||||
sb.AppendLine($" <span v-else>{{{{scope.row.{columnName}}}}}</span>");
|
sb.AppendLine($" <span v-else>{{{{scope.row.{columnName}}}}}</span>");
|
||||||
@ -238,7 +238,7 @@ namespace ZR.CodeGenerator
|
|||||||
}
|
}
|
||||||
else if (dbFieldInfo.IsList && dbFieldInfo.HtmlType.Equals(GenConstants.HTML_IMAGE_UPLOAD))
|
else if (dbFieldInfo.IsList && dbFieldInfo.HtmlType.Equals(GenConstants.HTML_IMAGE_UPLOAD))
|
||||||
{
|
{
|
||||||
sb.AppendLine($" <el-table-column prop=\"{columnName}\" label=\"图片\">");
|
sb.AppendLine($" <el-table-column prop=\"{columnName}\" label=\"{label}\">");
|
||||||
sb.AppendLine(" <template slot-scope=\"scope\">");
|
sb.AppendLine(" <template slot-scope=\"scope\">");
|
||||||
sb.AppendLine($" <el-image class=\"table-td-thumb\" :src=\"scope.row.{columnName}\" :preview-src-list=\"[scope.row.{columnName}]\"></el-image>");
|
sb.AppendLine($" <el-image class=\"table-td-thumb\" :src=\"scope.row.{columnName}\" :preview-src-list=\"[scope.row.{columnName}]\"></el-image>");
|
||||||
sb.AppendLine(" </template>");
|
sb.AppendLine(" </template>");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user