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
7 years ago
|
|
||
7 years ago
|
import PropTypes from '../_util/vue-types'
|
||
7 years ago
|
|
||
|
export default {
|
||
|
props: {
|
||
|
visible: PropTypes.bool,
|
||
|
hiddenClassName: PropTypes.string,
|
||
|
},
|
||
|
render () {
|
||
7 years ago
|
const { hiddenClassName, visible } = this.$props
|
||
7 years ago
|
|
||
7 years ago
|
if (hiddenClassName || !this.$slots.default || this.$slots.default.length > 1) {
|
||
7 years ago
|
let cls = ''
|
||
|
if (!visible && hiddenClassName) {
|
||
|
cls += ` ${hiddenClassName}`
|
||
|
}
|
||
|
return (
|
||
|
<div class={cls}>
|
||
|
{this.$slots.default}
|
||
|
</div>
|
||
|
)
|
||
|
}
|
||
|
|
||
|
return this.$slots.default[0]
|
||
|
},
|
||
|
}
|
||
|
|