[opt] 优化错误为int之类的字段使用子列名时的报错信息
parent
f7814a0612
commit
d9a2e0f83b
|
|
@ -15,6 +15,8 @@ namespace Luban.Job.Cfg.DataSources.Excel
|
||||||
public object Current
|
public object Current
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
{
|
||||||
|
if (Row != null)
|
||||||
{
|
{
|
||||||
var v = Row[SelfTitle.FromIndex].Value;
|
var v = Row[SelfTitle.FromIndex].Value;
|
||||||
if (v == null || (v is string s && string.IsNullOrEmpty(s) && !string.IsNullOrEmpty(SelfTitle.Default)))
|
if (v == null || (v is string s && string.IsNullOrEmpty(s) && !string.IsNullOrEmpty(SelfTitle.Default)))
|
||||||
|
|
@ -26,6 +28,11 @@ namespace Luban.Job.Cfg.DataSources.Excel
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception($"简单数据类型字段 不支持子列名或者多行");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Cell> Row { get; }
|
public List<Cell> Row { get; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue