File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,24 @@ export default defineComponent({
118118 if ( defaults . length === 1 && listTags . includes ( defaults [ 0 ] . type as string ) && Array . isArray ( defaults [ 0 ] . children ) )
119119 return h ( defaults [ 0 ] , { } , [ mapChildren ( defaults [ 0 ] . children ) [ 0 ] ] )
120120
121+ if ( defaults . length === 1 && defaults [ 0 ] . type as string === 'table' ) {
122+ const tableNode = defaults [ 0 ]
123+ if ( Array . isArray ( tableNode . children ) ) {
124+ return h ( tableNode , { } , tableNode . children . map ( ( i ) => {
125+ if ( ! isVNode ( i ) ) {
126+ return i
127+ }
128+ else {
129+ if ( i . type === 'tbody' && Array . isArray ( i . children ) )
130+ return h ( i , { } , [ mapChildren ( i . children ) [ 0 ] ] )
131+
132+ else
133+ return h ( i )
134+ }
135+ } ) )
136+ }
137+ }
138+
121139 return mapChildren ( defaults ) [ 0 ]
122140 } ,
123141} )
You can’t perform that action at this time.
0 commit comments