mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
19 lines
480 B
Vue
19 lines
480 B
Vue
<script>
|
|
export default {
|
|
name: 'ComponentDemos',
|
|
render (h) {
|
|
const defaultSlot = this.$slots.default || []
|
|
const leftColumn = defaultSlot.filter((value, index) => index % 2 === 0)
|
|
const rightColumn = defaultSlot.filter((value, index) => index % 2 === 1)
|
|
return h('n-row', {
|
|
props: {
|
|
gutter: 16
|
|
}
|
|
}, [
|
|
h('n-col', { props: { span: 12 } }, leftColumn),
|
|
h('n-col', { props: { span: 12 } }, rightColumn)
|
|
])
|
|
}
|
|
}
|
|
</script>
|