<script setup lang="ts">
import { IBasicAttribute, IColumns } from '@/model/System/net-interface';
import { PropType } from 'vue';

defineProps({
  tableData: {
    type: Array as PropType<IBasicAttribute[]>,
    default: () => [],
    required: true,
  },
  columns: {
    type: Array as PropType<IColumns[]>,
    default: () => [],
    required: true,
  },
});

</script>

<template>
  <el-table
    v-addId.table="'bridgeTeamPort'" 
    :data="tableData"
    border
    resizable
    class="special-table"
  >
    <el-table-column v-for="item in columns" :key="item.title" :label="$t(item.title)">
      <template #default="scope">
        <span :id="item.key + scope.$index">{{ scope.row[item.key] }}</span>
      </template>
    </el-table-column>
  </el-table>
</template>

<style lang="scss" scoped></style>
