fix: change NCC record config

This commit is contained in:
gx-mac 2021-03-11 20:18:01 +08:00
parent f1c585a850
commit ffd42b97e6
3 changed files with 3 additions and 3 deletions

View File

@ -992,7 +992,7 @@ var Table = function (_Component) {
var record = data[i];
var key = this.getRowKey(record, i);
// 兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
record['_isLeaf'] = typeof record['isleaf'] === 'boolean' ? record['isleaf'] : record['_isLeaf'];
typeof record['isleaf'] === 'boolean' && (record['_isLeaf'] = record['isleaf']);
// _isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
// _isLeaf 有三种取值情况true / false / null。Table内部字段
var _isLeaf = typeof record['_isLeaf'] === 'boolean' ? record['_isLeaf'] : null;

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "2.3.15-beta.7",
"version": "2.3.15-beta.8",
"description": "Table ui component for react",
"keywords": [
"react",

View File

@ -791,7 +791,7 @@ class Table extends Component {
const record = data[i];
const key = this.getRowKey(record, i);
// 兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
record['_isLeaf'] = typeof record['isleaf'] === 'boolean' ? record['isleaf'] : record['_isLeaf'];
typeof record['isleaf'] === 'boolean' && (record['_isLeaf'] = record['isleaf']);
// _isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
// _isLeaf 有三种取值情况true / false / null。Table内部字段
const _isLeaf = typeof record['_isLeaf'] === 'boolean' ? record['_isLeaf'] : null;