ant-design-vue/components/vc-tooltip/Content.jsx
ajuner d221171e53
feat: tooltip support color (#3603)
* feat: tooltip support color

* update
2021-01-27 23:21:48 +08:00

26 lines
589 B
Vue

import PropTypes from '../_util/vue-types';
export default {
name: 'Content',
props: {
prefixCls: PropTypes.string,
overlay: PropTypes.any,
trigger: PropTypes.any,
overlayInnerStyle: PropTypes.any,
},
updated() {
const { trigger } = this;
if (trigger) {
trigger.forcePopupAlign();
}
},
render() {
const { overlay, prefixCls, overlayInnerStyle } = this;
return (
<div class={`${prefixCls}-inner`} role="tooltip" style={overlayInnerStyle}>
{typeof overlay === 'function' ? overlay() : overlay}
</div>
);
},
};