mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 13:08:48 +08:00
28 lines
549 B
JavaScript
28 lines
549 B
JavaScript
|
|
import PropTypes from '../_util/vue-types'
|
|
|
|
export default {
|
|
props: {
|
|
visible: PropTypes.bool,
|
|
hiddenClassName: PropTypes.string,
|
|
},
|
|
render () {
|
|
const { hiddenClassName, visible } = this.$props
|
|
|
|
if (hiddenClassName || !this.$slots.default || this.$slots.default.length > 1) {
|
|
let cls = ''
|
|
if (!visible && hiddenClassName) {
|
|
cls += ` ${hiddenClassName}`
|
|
}
|
|
return (
|
|
<div class={cls}>
|
|
{this.$slots.default}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
return this.$slots.default[0]
|
|
},
|
|
}
|
|
|