<template>
  <div id="scroll-board" :style="`width:${ScrollWidth}`">
    <dv-scroll-board  :config="config" />
  </div>
</template>

<script>
export default {
  name: 'ScrollBoard',
  props: ['ScrollList','ScrollWidth'],
  data () {
    return {
      config: {
        rankName:'rank1',
        header: ['员工', '工序', '上报量'],
        data: [
        ],
        index: true,
        columnWidth: [100, 150, 200],
        align: ['center', 'center', 'center', 'center'],
        rowNum: 12,
        headerBGC: '#1981f6',
        headerHeight: 50,
        oddRowBGC: 'rgba(0, 44, 81, 0.8)',
        evenRowBGC: 'rgba(10, 29, 50, 0.8)'
      }
    }
  },
  created () {
    console.log(this.ScrollList)
    this.config.headerHeight = this.$fontSize(0.50);
    this.config.columnWidth = [this.$fontSize(0.75),this.$fontSize(1),this.$fontSize(2)];
    this.config.data = JSON.parse(JSON.stringify(this.ScrollList))
  },
  mounted(){
    // let arr = document.getElementsByClassName('dv-scroll-board');
    // console.log(arr)
  }
}
</script>

<style lang="less">
#scroll-board {
  //width:25%;
  box-sizing: border-box;
  margin-left: 0.2rem;
  height: 100%;
  overflow: hidden;
}

</style>
<style>
.dv-scroll-board .header{
  font-size: 0.2rem !important;
  font-weight: bold !important;
}
.dv-scroll-board .rows .row-item{
  font-size: 0.2rem !important;
}
</style>
