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.
29 lines
533 B
29 lines
533 B
7 years ago
|
<script>
|
||
|
import PropTypes from 'vue-types'
|
||
|
|
||
|
export default {
|
||
|
props: {
|
||
|
visible: PropTypes.bool,
|
||
|
hiddenClassName: PropTypes.string,
|
||
|
},
|
||
|
render () {
|
||
|
const { hiddenClassName, visible } = this.props
|
||
|
|
||
|
if (hiddenClassName || 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]
|
||
|
},
|
||
|
}
|
||
|
|
||
|
</script>
|