<template>
  <div class="service_tab-comments">
    <comments-score :data="data.baseInfo"></comments-score>
    <comments-list :data="data.ffpjxxList"></comments-list>

    <div class="comments_pages">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :total="data.baseInfo.total"
        :page-sizes="[10, 50, 100]"
        :current-page="1"
        :page-size="10"
        layout="total, sizes, prev, pager, next, jumper"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
import commentsScore from "@/components/comments-score";
import commentsList from "@/components/comments-list";

export default {
  components: {
    commentsScore,
    commentsList,
  },
  props: {
    data: {
      type: Object,
      required: true,
    },
  },
  data: () => ({}),
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
  created() {},
};
</script>

<style scoped>
.comments_pages {
  text-align: center;
  margin-top: 20px;
}
</style>
