@@ -101,7 +101,9 @@ export default defineComponent({
101
101
columns : VxeTableDefines . ColumnInfo [ ] ,
102
102
items : any [ ]
103
103
) => {
104
- const { fullAllDataRowIdData, visibleColumn } = tableInternalData
104
+ const $xeGrid = $xeTable . xeGrid
105
+
106
+ const { fullAllDataRowIdData, fullColumnIdData, visibleColumn } = tableInternalData
105
107
const { columnKey, resizable : allResizable , showOverflow : allShowOverflow , border, height, cellClassName : allCellClassName , cellStyle, align : allAlign , spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding : allPadding } = tableProps
106
108
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData
107
109
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData
@@ -125,15 +127,16 @@ export default defineComponent({
125
127
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column
126
128
const { verticalAlign : allVerticalAlign } = cellOpts
127
129
const { actived } = editStore
128
- const rowRest = fullAllDataRowIdData [ rowid ]
130
+ const rowRest = fullAllDataRowIdData [ rowid ] || { }
129
131
const colid = column . id
132
+ const colRest = fullColumnIdData [ colid ] || { }
130
133
const renderOpts = editRender || cellRender
131
134
const compConf = renderOpts ? renderer . get ( renderOpts . name ) : null
132
135
const compCellClassName = compConf ? ( compConf . tableCellClassName || compConf . cellClassName ) : null
133
136
const compCellStyle = compConf ? ( compConf . tableCellStyle || compConf . cellStyle ) : ''
134
137
const showAllTip = tooltipOpts . showAll
135
- const columnIndex = $xeTable . getColumnIndex ( column )
136
- const _columnIndex = $xeTable . getVTColumnIndex ( column )
138
+ const columnIndex = colRest . index
139
+ const _columnIndex = colRest . _index
137
140
const isEdit = isEnableConf ( editRender )
138
141
const resizeHeight = resizeHeightFlag ? rowRest . resizeHeight : 0
139
142
let fixedHiddenColumn = fixedType ? column . fixed !== fixedType : column . fixed && overflowX
@@ -157,7 +160,7 @@ export default defineComponent({
157
160
$table : VxeTableConstructor < any > & VxeTablePrivateMethods
158
161
} = {
159
162
$table : $xeTable ,
160
- $grid : $xeTable . xegrid ,
163
+ $grid : $xeGrid ,
161
164
isEdit : false ,
162
165
seq,
163
166
rowid,
@@ -482,7 +485,7 @@ export default defineComponent({
482
485
}
483
486
}
484
487
const rowid = handleGetRowId ( row )
485
- const rowRest = fullAllDataRowIdData [ rowid ]
488
+ const rowRest = fullAllDataRowIdData [ rowid ] || { }
486
489
let rowLevel = 0
487
490
let seq : string | number = - 1
488
491
let _rowIndex = 0
@@ -652,6 +655,7 @@ export default defineComponent({
652
655
653
656
const renderVN = ( ) => {
654
657
const { slots } = tableContext
658
+ const $xeGrid = $xeTable . xeGrid
655
659
656
660
const { fixedColumn, fixedType, tableColumn } = props
657
661
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
@@ -736,7 +740,7 @@ export default defineComponent({
736
740
let emptyContent : string | VxeComponentSlotType | VxeComponentSlotType [ ]
737
741
const emptySlot = slots ? slots . empty : null
738
742
if ( emptySlot ) {
739
- emptyContent = $xeTable . callSlot ( emptySlot , { $table : $xeTable , $grid : $xeTable . xegrid } )
743
+ emptyContent = $xeTable . callSlot ( emptySlot , { $table : $xeTable , $grid : $xeGrid } )
740
744
} else {
741
745
const compConf = emptyOpts . name ? renderer . get ( emptyOpts . name ) : null
742
746
const rtEmptyView = compConf ? ( compConf . renderTableEmpty || compConf . renderTableEmptyView || compConf . renderEmpty ) : null
@@ -789,7 +793,10 @@ export default defineComponent({
789
793
} , renderColumnList . map ( ( column , $columnIndex ) => {
790
794
return h ( 'col' , {
791
795
name : column . id ,
792
- key : $columnIndex
796
+ key : $columnIndex ,
797
+ style : {
798
+ width : `${ column . renderWidth } px`
799
+ }
793
800
} )
794
801
} ) ) ,
795
802
/**
0 commit comments