File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,11 @@ export default defineComponent({
44
44
const computedFields = computed (() => itemHelper .normaliseFields (props .fields , props .items ))
45
45
46
46
return () => {
47
- let theadTop: VNode | null = null
48
- if (slots [' thead-top' ]) {
49
- theadTop = slots [' thead-top' ]() as unknown as VNode
50
- }
47
+ const theadTop = slots [' thead-top' ]?.()
51
48
52
- let theadSub: VNode | null
53
- theadSub = null
54
- if (slots [' thead-sub' ]) {
55
- const slotReference = slots [' thead-sub' ] as unknown as (arg : object ) => VNode
49
+ let theadSub: VNode | undefined
50
+ const slotReference = slots [' thead-sub' ]
51
+ if (slotReference ) {
56
52
theadSub = h (
57
53
' tr' ,
58
54
@@ -63,7 +59,7 @@ export default defineComponent({
63
59
scope: ' col' ,
64
60
class: [field .class , field .thClass , field .variant ? ` table-${field .variant } ` : ' ' ],
65
61
},
66
- slotReference ({items: computedFields .value , ... field }) as unknown as VNode
62
+ slotReference ({items: computedFields .value , ... field })
67
63
)
68
64
)
69
65
)
You can’t perform that action at this time.
0 commit comments