Skip to content

Commit ad54506

Browse files
author
M-Ray
committed
fix; update slot
1 parent defbbff commit ad54506

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/VirtualList/slot.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ export default {
66
mixins: [Wrapper],
77
props: SlotProps,
88

9-
render (h) {
9+
render () {
1010
const { tag, uniqueKey } = this
11+
const Wrapper = tag || 'div'
1112

12-
return h(tag, {
13-
key: uniqueKey,
14-
attrs: {
15-
role: uniqueKey
16-
}
17-
}, this.$slots.default)
13+
14+
return <Wrapper key={uniqueKey} role={uniqueKey} >
15+
{this.$slots.default}
16+
</Wrapper>
1817
}
1918
}

0 commit comments

Comments
 (0)