<template>
  <div>
    <el-table stripe border :data="list" :header-cell-style="{ fontWeight: 'bold' }">
      <table-column :label="'统计项'" prop="name" />
      <table-column label="数量" prop="value" :formatter="formatColumn" />
    </el-table>
  </div>
</template>
<script>
export default {
  props: ['list'],
  methods: {
    formatColumn (row, column) {
      return row[column.property] || 0
    }
  }
}
</script>
