'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

require('./index.less');

var Empty = {
    name: 'SnEmpty',
    props: {
        image: {
            type: String,
            'default': ''
        },
        imageStyle: {
            type: Object
        },
        desc: {
            type: String,
            'default': '暂无数据'
        }
    },
    methods: {},
    render: function render() {
        var h = arguments[0];
        var image = this.image,
            imageStyle = this.imageStyle,
            desc = this.desc,
            $slots = this.$slots;

        return h(
            'section',
            { 'class': 'sn-empty' },
            [h(
                'div',
                { 'class': 'sn-empty-wrap' },
                [h(
                    'div',
                    { 'class': 'sn-empty-img', style: imageStyle },
                    [h('img', {
                        attrs: { src: image }
                    })]
                ), $slots['default'] ? $slots['default'] : h(
                    'div',
                    { 'class': 'sn-empty-tip' },
                    [desc]
                )]
            )]
        );
    }
};

Empty.install = function (Vue) {
    Vue.component(Empty.name, Empty);
};

exports['default'] = Empty;
module.exports = exports.default;