<template>
    <basic-container>
        <el-tabs  v-model="Configuration" @tab-click="tabClick">
            <el-tab-pane label="表配置" name="table">
                <tableConfiguration v-if="flag.table"></tableConfiguration>
            </el-tab-pane>
            <el-tab-pane label="字段配置" name="field">
                <fieldConfiguration v-if="flag.field"></fieldConfiguration>
            </el-tab-pane>
            <el-tab-pane label="数据维护" name="data">
                <dataMaintain v-if="flag.data"></dataMaintain>
            </el-tab-pane>
        </el-tabs>
    </basic-container>
</template>

<script>
    import tableConfiguration from './tableConfiguration';
    import fieldConfiguration from './fieldConfiguration';
    import dataMaintain from './dataMaintain';
    export default {
        name: "configuration",
        components: {
            tableConfiguration,
            fieldConfiguration,
            dataMaintain
        },
        data(){
            return{
                Configuration:"table",
                flag:{
                    table:true,
                    field:false,
                    data:false
                },
            }
        },
        methods: {
            tabClick(tab){
                this.flag[tab.name]=false;
                this.$nextTick(() => (this.flag[tab.name] = true));
            }
        }
    }
</script>

<style scoped>

</style>