<template>
    <div>
        <LineLabel v-if = "label" :label="label"></LineLabel>
        <div class="mt-20">
            <el-table :data="dataSource">
                <el-table-column v-for="(item) in columns" :prop="item.prop" :key="item.prop" :label="$t(item.label)">
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import LineLabel from "./LineLabel.vue";

export default {
    components: {
        LineLabel,
    },
    props: {
        //[{label:"名称",prop:"name"}]
        columns: {
            type: Array,
            default: [],
        },
        dataSource: {
            type: Array,
            default: [],
        },
        label: {
            type: String,
            default: "",
        }
    }

}
</script>

<style lang="scss" scoped>
.mt-20 {
    margin-top: 20px;
}
</style>