You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/_util/Clone.vue

20 lines
421 B

<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>