2017-12-22 10:43:28 +00:00
|
|
|
<script>
|
2017-12-26 11:04:28 +00:00
|
|
|
import PropTypes from '../_util/vue-types'
|
2017-12-22 10:43:28 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
visible: PropTypes.bool,
|
|
|
|
hiddenClassName: PropTypes.string,
|
|
|
|
},
|
|
|
|
render () {
|
2017-12-25 10:08:36 +00:00
|
|
|
const { hiddenClassName, visible } = this.$props
|
2017-12-22 10:43:28 +00:00
|
|
|
|
2017-12-27 08:13:26 +00:00
|
|
|
if (hiddenClassName || !this.$slots.default || this.$slots.default.length > 1) {
|
2017-12-22 10:43:28 +00:00
|
|
|
let cls = ''
|
|
|
|
if (!visible && hiddenClassName) {
|
|
|
|
cls += ` ${hiddenClassName}`
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<div class={cls}>
|
|
|
|
{this.$slots.default}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
return this.$slots.default[0]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|