fix:兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
This commit is contained in:
parent
0f6834dba3
commit
0efad91481
|
@ -874,8 +874,10 @@ var Table = function (_Component) {
|
||||||
var isHiddenExpandIcon = void 0;
|
var isHiddenExpandIcon = void 0;
|
||||||
var record = data[i];
|
var record = data[i];
|
||||||
var key = this.getRowKey(record, i);
|
var key = this.getRowKey(record, i);
|
||||||
|
// 兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
|
||||||
|
record['isLeaf'] = typeof record['isleaf'] === 'boolean' ? record['isleaf'] : record['isLeaf'];
|
||||||
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
||||||
// isLeaf 有三种取值情况:true / false / null
|
// isLeaf 有三种取值情况:true / false / null。(Table内部字段)
|
||||||
var isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
var isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
||||||
var childrenColumn = isLeaf ? false : record[childrenColumnName];
|
var childrenColumn = isLeaf ? false : record[childrenColumnName];
|
||||||
var isRowExpanded = this.isRowExpanded(record, i);
|
var isRowExpanded = this.isRowExpanded(record, i);
|
||||||
|
|
|
@ -37911,8 +37911,10 @@
|
||||||
var isHiddenExpandIcon = void 0;
|
var isHiddenExpandIcon = void 0;
|
||||||
var record = data[i];
|
var record = data[i];
|
||||||
var key = this.getRowKey(record, i);
|
var key = this.getRowKey(record, i);
|
||||||
|
// 兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
|
||||||
|
record['isLeaf'] = typeof record['isleaf'] === 'boolean' ? record['isleaf'] : record['isLeaf'];
|
||||||
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
||||||
// isLeaf 有三种取值情况:true / false / null
|
// isLeaf 有三种取值情况:true / false / null。(Table内部字段)
|
||||||
var isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
var isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
||||||
var childrenColumn = isLeaf ? false : record[childrenColumnName];
|
var childrenColumn = isLeaf ? false : record[childrenColumnName];
|
||||||
var isRowExpanded = this.isRowExpanded(record, i);
|
var isRowExpanded = this.isRowExpanded(record, i);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -715,8 +715,10 @@ class Table extends Component {
|
||||||
let isHiddenExpandIcon;
|
let isHiddenExpandIcon;
|
||||||
const record = data[i];
|
const record = data[i];
|
||||||
const key = this.getRowKey(record, i);
|
const key = this.getRowKey(record, i);
|
||||||
|
// 兼容 NCC 以前的业务逻辑,支持外部通过 record 中的 isleaf 字段,判断是否为叶子节点
|
||||||
|
record['isLeaf'] = typeof record['isleaf'] === 'boolean' ? record['isleaf'] : record['isLeaf'];
|
||||||
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
// isLeaf 字段是在 bigData 里添加的,只有层级树大数据场景需要该字段
|
||||||
// isLeaf 有三种取值情况:true / false / null
|
// isLeaf 有三种取值情况:true / false / null。(Table内部字段)
|
||||||
const isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
const isLeaf = typeof record['isLeaf'] === 'boolean' ? record['isLeaf'] : null;
|
||||||
const childrenColumn = isLeaf ? false : record[childrenColumnName];
|
const childrenColumn = isLeaf ? false : record[childrenColumnName];
|
||||||
const isRowExpanded = this.isRowExpanded(record, i);
|
const isRowExpanded = this.isRowExpanded(record, i);
|
||||||
|
|
Loading…
Reference in New Issue