node_modules/ant-design-vue/es/vc-table/hooks/useFlattenRecords.js
// recursion (flat tree structure)
recursion (flat tree structure)
recursion ( flat tree structure )
function flatRecord(record, indent, childrenColumnName, expandedKeys, getRowKey, index) {
  var arr = [];
  arr.push({
    record: record,
    indent: indent,
    index: index
  });
  var key = getRowKey(record);
  var expanded = expandedKeys === null || expandedKeys === void 0 ? void 0 : expandedKeys.has(key);
  if (record && Array.isArray(record[childrenColumnName]) && expanded) {
    for (var i = 0; i < record[childrenColumnName].length; i += 1) {
      var tempArr = flatRecord(record[childrenColumnName][i], indent + 1, childrenColumnName, expandedKeys, getRowKey, i);
      arr.push.apply(arr, _toConsumableArray(tempArr));
    }
  }
  return arr;
}
function flatRecord ( record , indent , childrenColumnName , expandedKeys , getRowKey , index ) { var arr = [ ] ; arr . push ( { record : record , indent : indent , index : index } ) ; var key = getRowKey ( record ) ; var expanded = expandedKeys === null || expandedKeys === void 0 ? void 0 : expandedKeys . has ( key ) ; if ( record && Array . isArray ( record [ childrenColumnName ] ) && expanded ) { for ( var i = 0 ; i < record [ childrenColumnName ] . length ; i += 1 ) { var tempArr = flatRecord ( record [ childrenColumnName ] [ i ] , indent + 1 , childrenColumnName , expandedKeys , getRowKey , i ) ; arr . push . apply ( arr , _toConsumableArray ( tempArr ) ) ; } } return arr ; }
recursion (flat tree structure)
recursion ( flat tree structure )
// expanded state, flat record