vxe-table 4.17.2 → 4.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -631,75 +631,6 @@ export function getLastChildColumn (column: VxeTableDefines.ColumnInfo): VxeTabl
631
631
  return column
632
632
  }
633
633
 
634
- const lineOffsetSizes = {
635
- mini: 3,
636
- small: 2,
637
- medium: 1,
638
- large: 0
639
- }
640
-
641
- function countTreeExpandSize (prevRow: any, params: VxeTableDefines.CellRenderBodyParams) {
642
- let count = 1
643
- if (!prevRow) {
644
- return count
645
- }
646
- const { $table } = params
647
- const reactData = $table.reactData
648
- const { treeExpandedFlag } = reactData
649
- const internalData = $table.internalData
650
- const { treeExpandedMaps } = internalData
651
- const { computeTreeOpts } = $table.getComputeMaps()
652
- const treeOpts = computeTreeOpts.value
653
- const { transform, mapChildrenField } = treeOpts
654
- const childrenField = treeOpts.children || treeOpts.childrenField
655
- const rowChildren = prevRow[transform ? mapChildrenField : childrenField]
656
- if (rowChildren && treeExpandedFlag && treeExpandedMaps[getRowid($table, prevRow)]) {
657
- for (let index = 0; index < rowChildren.length; index++) {
658
- count += countTreeExpandSize(rowChildren[index], params)
659
- }
660
- }
661
- return count
662
- }
663
-
664
- export function getOffsetSize ($xeTable: VxeTableConstructor) {
665
- const { computeSize } = $xeTable.getComputeMaps()
666
- const vSize = computeSize.value
667
- if (vSize) {
668
- return lineOffsetSizes[vSize] || 0
669
- }
670
- return 0
671
- }
672
-
673
- export function calcTreeLine (params: VxeTableDefines.CellRenderBodyParams, prevRow: any) {
674
- const { $table, row } = params
675
- const tableProps = $table.props
676
- const tableReactData = $table.reactData
677
- const tableInternalData = $table.internalData
678
-
679
- const { showOverflow } = tableProps
680
- const { scrollYLoad } = tableReactData
681
- const { fullAllDataRowIdData } = tableInternalData
682
- const { computeRowOpts, computeCellOpts, computeDefaultRowHeight } = $table.getComputeMaps()
683
- const rowOpts = computeRowOpts.value
684
- const cellOpts = computeCellOpts.value
685
- const defaultRowHeight = computeDefaultRowHeight.value
686
- const rowid = getRowid($table, row)
687
- const rowRest = fullAllDataRowIdData[rowid]
688
- const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
689
- let expandSize = 1
690
- if (prevRow) {
691
- expandSize = countTreeExpandSize(prevRow, params)
692
- }
693
- let cellHeight = currCellHeight
694
- const vnHeight = rowRest.height
695
- if (scrollYLoad) {
696
- if (!showOverflow) {
697
- cellHeight = vnHeight || currCellHeight
698
- }
699
- }
700
- return cellHeight * expandSize - (prevRow ? 1 : (12 - getOffsetSize($table)))
701
- }
702
-
703
634
  export function clearTableDefaultStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
704
635
  const { props, internalData } = $xeTable
705
636
 
@@ -178,7 +178,8 @@ VxeUI.setConfig({
178
178
  hasChildField: 'hasChild',
179
179
  mapChildrenField: '_X_ROW_CHILD',
180
180
  indent: 20,
181
- showIcon: true
181
+ showIcon: true,
182
+ showRootLine: true
182
183
  },
183
184
  expandConfig: {
184
185
  // trigger: 'default',