<template>
  <Table
    class="filingPersonTable"
    ref="tableRef"
    :columns="tableColumns"
    height="100%"
    :data="data"
    v-loading="loading"
    element-loading-text="加载中..."
  >
    <template #fee="slotProps">
      <div
        :style="{
          color: green.color || red.color,
        }"
      >
        {{ 11 }} 元 积分
      </div>
    </template>
  </Table>
</template>

<script setup lang="ts">
import Table from "@/components/Table/index.vue";
import { tableColumns } from "./table";
import { ref } from "vue";
import { eStatusOfCopyright } from "@/components/ApproveStatus/status";
import { useTableScrollListener } from "@/components/Table/hooks";
import { green, red } from "@/components/ApproveStatus/btnStyle";

// defineProps<{
//   //   data: any[];
//   //   loading: boolean;
// }>();

const data = [] as any[];
const loading = false;

const emit = defineEmits<{
  (e: "scrollToEnd"): void;
  (
    e: "clickOperate",
    payload: {
      type: Exclude<eStatusOfCopyright, eStatusOfCopyright.ALL>;
      raw: any;
    }
  ): void;
  (e: "clickStatusFilter", payload: eStatusOfCopyright): void;
}>();

const tableRef = ref<InstanceType<typeof Table>>();

useTableScrollListener(tableRef, () => {
  emit("scrollToEnd");
});
</script>

<style lang="scss">
.filingPersonTable {
  .el-table__cell {
    height: 50px;
  }
}
</style>
