ant-design-vue/components/vc-trigger/PopupInner.jsx

22 lines
559 B
Vue
Raw Normal View History

2019-01-12 11:33:27 +08:00
import PropTypes from '../_util/vue-types';
import LazyRenderBox from './LazyRenderBox';
2017-12-22 18:43:28 +08:00
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
},
2019-01-12 11:33:27 +08:00
render() {
const { prefixCls, visible, hiddenClassName } = this.$props;
2018-01-15 17:33:34 +08:00
2017-12-22 18:43:28 +08:00
return (
2020-06-09 18:30:18 +08:00
<div class={!visible ? hiddenClassName : ''}>
2017-12-22 18:43:28 +08:00
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
2020-06-09 18:30:18 +08:00
{this.$slots.default && this.$slots.default()}
2017-12-22 18:43:28 +08:00
</LazyRenderBox>
</div>
2019-01-12 11:33:27 +08:00
);
2017-12-22 18:43:28 +08:00
},
2019-01-12 11:33:27 +08:00
};