通用组件-getValue函数的0值bug

This commit is contained in:
禾几海
2020-07-01 14:17:54 +08:00
parent 6bd15f3cc0
commit 845752b432

View File

@@ -71,7 +71,7 @@ export class CommonTableComponent<T> implements OnInit, OnChanges {
str = str.replace(regexp, '');
// tslint:disable-next-line:no-eval
const value = eval(str);
return value ? value : '暂无数据';
return value !== undefined ? value : '暂无数据';
}
getContext = (fieldValue: string, index: number) => {