<template>
    <div>
        <el-tabs v-model="activeName">
            <el-tab-pane label="推广来源" name="source">
                <sourceComponent v-if="activeName == 'source' && hasPermission('list-promote-source')"></sourceComponent>
            </el-tab-pane>
            <el-tab-pane label="推广形式" name="shape">
                <shape v-if="activeName == 'shape' && hasPermission('list-promote-type')"></shape>
            </el-tab-pane>
            <el-tab-pane label="渠道负责人" name="principal">
                <principal v-if="activeName == 'principal' && hasPermission('list-promote-admin')"></principal>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import sourceComponent from './source/index'
import shape from './shape/index'
import principal from './principal/index'
// import submit from './submit';
export default {
    components: {
        sourceComponent,
        shape,
        principal,
        // record
    },
    data() {
        return {
            activeName: this.$route.query.tab || 'source'
        }
    },
}
</script>

<style lang="scss" scoped>

</style>