2017-12-22 18:43:28 +08:00
|
|
|
<script>
|
2017-12-26 19:04:28 +08:00
|
|
|
import PropTypes from '../_util/vue-types'
|
2017-12-22 18:43:28 +08:00
|
|
|
import LazyRenderBox from './LazyRenderBox'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
hiddenClassName: PropTypes.string.def(''),
|
|
|
|
prefixCls: PropTypes.string,
|
2017-12-25 18:08:36 +08:00
|
|
|
visible: PropTypes.bool,
|
2017-12-22 18:43:28 +08:00
|
|
|
},
|
|
|
|
render () {
|
2018-01-15 17:33:34 +08:00
|
|
|
const { prefixCls, visible, hiddenClassName } = this.$props
|
2018-01-12 16:10:41 +08:00
|
|
|
const { $listeners } = this
|
|
|
|
const divProps = {
|
|
|
|
on: $listeners,
|
|
|
|
}
|
2018-01-15 17:33:34 +08:00
|
|
|
|
2017-12-22 18:43:28 +08:00
|
|
|
return (
|
2018-01-15 17:33:34 +08:00
|
|
|
<div {...divProps} class={!visible ? hiddenClassName : ''}>
|
2017-12-22 18:43:28 +08:00
|
|
|
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
|
|
|
|
{this.$slots.default}
|
|
|
|
</LazyRenderBox>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|