/**
 * 
 * 1. 开发borderLayout
 * 
 * @author xiufu.wang
 */
import BorderLayout from './borderLayout/layout'
import omit from 'mars-pro/src/pro/omit';

export default {
    name: 'ProLayoutContentBorder',
    componentName: 'ProLayoutContentBorder',
    inheritAttrs: false,
    components: { BorderLayout },
    created() {
    },
    methods: {
        renderSlots() {
            const slots = omit(this.$slots || {}, ['default'])
            return Object.keys(slots).map(item => (
                <template slot={item}>{slots[item]}</template>
            ))
        }
    },
    render() {
        const _datas = {
            props: {
                ...this.$attrs
            },
            attrs: this.$attrs
        }
        return (
            <div class="pro-layout-content-border">
                <BorderLayout {..._datas}>
                    {/* <template slot="top">
                        <div style="height: 80px;">top</div>
                    </template>
                    <template slot="bottom">
                        <div style="height: 80px;">bottom</div>
                    </template>
                    <template slot="left">
                        <div style="width: 80px;">left</div>
                    </template>
                    <template slot="right">
                        <div style="width: 80px;">right</div>
                    </template> */}
                    {this.renderSlots()}
                    {this.$slots.default}
                </BorderLayout>
            </div>
        )
    }
}