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.
28 lines
549 B
28 lines
549 B
|
|
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]
|
|
},
|
|
}
|
|
|