<template>
    <ele-data-table
        ref="tableRef"
        class="flex-1"
        row-key="id"
        :columns="columns"
        :data="dataList"
        height="450px"
    />
</template>

<script setup>
    const props = defineProps({
        dataList: {
            type: Array,
            default: () => []
        }
    });

    const columns = reactive([
        { label: '排名', type: 'index', align: 'center', width: 70 },
        { label: '地区', prop: 'provinceName', align: 'center' },
        { label: '单量', prop: 'orderNum', align: 'center' },
        { label: '本数', prop: 'bookNum', align: 'center' },
        {
            label: '涨幅',
            prop: 'comparisonStr',
            align: 'center'
        }
    ]);
</script>
