ant-design-vue/components/trigger/PopupInner.vue
tangjinzhou 63ff2f83aa trigger
2017-12-27 16:13:26 +08:00

36 lines
765 B
Vue

<script>
import PropTypes from '../_util/vue-types'
import LazyRenderBox from './LazyRenderBox'
export default {
props: {
hiddenClassName: PropTypes.string.def(''),
prefixCls: PropTypes.string,
visible: PropTypes.bool,
},
methods: {
onMouseEnter (e) {
this.$emit('mouseenter', e)
},
onMouseLeave (e) {
this.$emit('mouseleave', e)
},
},
render () {
const { prefixCls, visible } = this.$props
const { onMouseEnter, onMouseLeave } = this
return (
<div
onMouseenter={onMouseEnter}
onMouseleave={onMouseLeave}
>
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
{this.$slots.default}
</LazyRenderBox>
</div>
)
},
}
</script>