2019-01-12 03:33:27 +00:00
|
|
|
import PropTypes from '../_util/vue-types';
|
|
|
|
import LazyRenderBox from './LazyRenderBox';
|
2020-01-19 08:58:38 +00:00
|
|
|
import { getListeners } from '../_util/props-util';
|
2017-12-22 10:43:28 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
hiddenClassName: PropTypes.string.def(''),
|
|
|
|
prefixCls: PropTypes.string,
|
2017-12-25 10:08:36 +00:00
|
|
|
visible: PropTypes.bool,
|
2017-12-22 10:43:28 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
render() {
|
|
|
|
const { prefixCls, visible, hiddenClassName } = this.$props;
|
2018-01-12 08:10:41 +00:00
|
|
|
const divProps = {
|
2020-01-19 08:58:38 +00:00
|
|
|
on: getListeners(this),
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-01-15 09:33:34 +00:00
|
|
|
|
2017-12-22 10:43:28 +00:00
|
|
|
return (
|
2018-01-15 09:33:34 +00:00
|
|
|
<div {...divProps} class={!visible ? hiddenClassName : ''}>
|
2017-12-22 10:43:28 +00:00
|
|
|
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
|
|
|
|
{this.$slots.default}
|
|
|
|
</LazyRenderBox>
|
|
|
|
</div>
|
2019-01-12 03:33:27 +00:00
|
|
|
);
|
2017-12-22 10:43:28 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|