@@ -147,7 +147,24 @@ export default defineComponent<BodyRowProps<unknown>>({
147
147
if ( column . customCell ) {
148
148
additionalCellProps = column . customCell ( record , index , column ) ;
149
149
}
150
-
150
+ // not use slot to fix https://github.com/vueComponent/ant-design-vue/issues/5295
151
+ const appendNode =
152
+ colIndex === ( expandIconColumnIndex || 0 ) && nestExpandable . value ? (
153
+ < >
154
+ < span
155
+ data-test = { colIndex }
156
+ style = { { paddingLeft : `${ indentSize * indent } px` } }
157
+ class = { `${ prefixCls } -row-indent indent-level-${ indent } ` }
158
+ />
159
+ { expandIcon ( {
160
+ prefixCls,
161
+ expanded : expanded . value ,
162
+ expandable : hasNestChildren . value ,
163
+ record,
164
+ onExpand : onInternalTriggerExpand ,
165
+ } ) }
166
+ </ >
167
+ ) : null ;
151
168
return (
152
169
< Cell
153
170
cellType = "body"
@@ -165,29 +182,7 @@ export default defineComponent<BodyRowProps<unknown>>({
165
182
additionalProps = { additionalCellProps }
166
183
column = { column }
167
184
transformCellText = { transformCellText }
168
- v-slots = { {
169
- // ============= Used for nest expandable =============
170
- appendNode :
171
- colIndex === ( expandIconColumnIndex || 0 ) && nestExpandable . value
172
- ? ( ) => {
173
- return (
174
- < >
175
- < span
176
- style = { { paddingLeft : `${ indentSize * indent } px` } }
177
- class = { `${ prefixCls } -row-indent indent-level-${ indent } ` }
178
- />
179
- { expandIcon ( {
180
- prefixCls,
181
- expanded : expanded . value ,
182
- expandable : hasNestChildren . value ,
183
- record,
184
- onExpand : onInternalTriggerExpand ,
185
- } ) }
186
- </ >
187
- ) ;
188
- }
189
- : undefined ,
190
- } }
185
+ appendNode = { appendNode }
191
186
/>
192
187
) ;
193
188
} ) }
0 commit comments