<template>
   <div class="table_div">
              <div class="table_cur">
                <table style="width:100%;display:block">
                  <tr>
                    <th style="width: 50px;">
                      序号
                      </th>
                    <th style="width: 200px">时间</th>
                    <th style="width: 150px;">
                      小时雨量(mm)
                      </th>
                  </tr>
                  <!-- style="max-height: 320px; overflow-y: auto" -->
                  <div style="max-height: 250px; overflow-y: auto">
                  <tr v-for="(item, index) in tableData" :key="index">
                      <td style="width: 50px">{{ index + 1 }}</td>
                      <td style="width: 200px;">{{ item.time }}</td>
                      <td style="width: 150px">{{ item.sumDrp }}</td>
                    </tr>
                    <div style="height:155px"></div>
                  </div>
                </table>
              </div>
            </div>

</template>

<script>
   export default {
     props:{
       tableData:{
         type:Array,
         default:[],
       }
     },
     methods:{
       
     }
   }
</script>

<style lang="scss" scoped>
  .table_div {
    height: 100%;
    max-width: calc(100% - 0px);
    max-height: calc(100vh);
    flex: 1;
    padding-top: 0px;
    overflow-x: scroll;
  }
  /*table样式*/
  .table_cur {
    width: 100%;
    empty-cells: show;
    border-collapse: collapse;
    font-size: 14px;
  }
  .table_cur tr {
    display: flex;
    line-height: 65rpx;
  }
  .table_cur th {
    height: 65rpx;
    color: #3399ef;
    background: #e1f3ff;
    font-size: 14px;
    // font-weight: bold;
    padding: 0px 10px;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: center !important;
  }
   .scroll-table{
    height: calc(100vh - 145px);
    overflow-y: auto;
    width:'100%'
  }
  
  .table_cur td {
    height: 65rpx;
    // border-bottom: 1px solid #d8ddeb;
    font-size: 14px;
    color: #2f4056;
    padding: 0 10px;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: center !important;
  }
  /*table样式 end*/
</style>