[fix] 修复了$type-$value的形式没有读取bean在表格添加的sep符号的bug。 (#30)

Co-authored-by: 宝鱼 <kteong1012@outlook.com>
main
Carson - 宝鱼 2022-11-18 12:26:13 +08:00 committed by GitHub
parent bcc7bc8b37
commit 410fdd3618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -429,7 +429,6 @@ namespace Luban.Job.Cfg.DataCreators
public DType Accept(TBean type, RowColumnSheet sheet, TitleRow row)
{
string sep = row.SelfTitle.Sep;// type.GetBeanAs<DefBean>().Sep;
if (row.Row != null)
{
var s = row.AsStream(sep);
@ -460,6 +459,8 @@ namespace Luban.Job.Cfg.DataCreators
throw new Exception($"type:'{originBean.FullName}' 是多态类型,需要定义'{DefBean.EXCEL_TYPE_NAME_KEY}'列来指定具体子类型");
}
TitleRow valueTitle = row.GetSubTitleNamedRow(DefBean.EXCEL_VALUE_NAME_KEY);
sep += valueTitle.SelfTitle.Sep;
sep += type.GetTag("sep");
string subType = typeTitle.Current?.ToString()?.Trim();
if (subType == null || subType == DefBean.BEAN_NULL_STR)
{