mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 05:29:01 +08:00
20 lines
421 B
Vue
20 lines
421 B
Vue
<script>
|
|
import { cloneElement } from './vnode'
|
|
import PropTypes from './vue-types'
|
|
export default {
|
|
props: {
|
|
childProps: PropTypes.object.def({}),
|
|
},
|
|
render () {
|
|
const { $attrs, $listeners, childProps, $slots } = this
|
|
let children = $slots.default[0]
|
|
children = cloneElement(children, {
|
|
attr: $attrs,
|
|
on: $listeners,
|
|
props: childProps,
|
|
})
|
|
return children
|
|
},
|
|
}
|
|
</script>
|