iep-ui
Version:
An enterprise-class UI design language and Vue-based implementation
57 lines (52 loc) • 1.42 kB
JavaScript
import PropTypes from '../_util/vue-types';
import { ConfigConsumerProps } from '../config-provider/configConsumerProps';
export default {
name: 'IepBusinessBlock',
props: {
title: PropTypes.string,
customClassName: PropTypes.string,
customStyle: PropTypes.string
},
inject: {
configProvider: { 'default': function _default() {
return ConfigConsumerProps;
} }
},
methods: {},
render: function render() {
var h = arguments[0];
var customizePrefixCls = this.prefixCls,
$slots = this.$slots,
$props = this.$props;
var getPrefixCls = this.configProvider.getPrefixCls;
var prefixCls = getPrefixCls('iep-business-block', customizePrefixCls);
var customClassName = $props.customClassName,
customStyle = $props.customStyle,
title = $props.title;
var blockProps = {
'class': [prefixCls, customClassName],
style: customStyle
};
return h(
'div',
blockProps,
[h(
'div',
{ 'class': prefixCls + '-header' },
[h(
'div',
{ 'class': prefixCls + '-header-left' },
[h('span', [title])]
), $slots.more ? h(
'div',
{ 'class': prefixCls + '-header-right' },
[$slots.more]
) : null]
), h(
'div',
{ 'class': prefixCls + '-footer' },
[$slots['default']]
)]
);
}
};