<template>
    <div class="v-tabs-pane" v-show="active">
        <slot></slot>
    </div>
</template>
<script>
    export default {
        name: 'v-tabs-pane',
        data() {
            return {
                index: null
            };
        },
        props: {
            label: String,
            name: String,
            dataBack:Object
        },
        computed: {
            active() {
                return this.$parent.tabList.length>0?true:(this.$parent.currentName === (this.name || this.index));
            }
        },
        mounted() {
            this.$parent.addPanes(this);
        },
    }

</script>