//文档模块
<template>
  <div class="box">
    <div  v-for="(item,index) in list" :key="index" @click="clickFile(item)">
      <img :src="require(`@/assets/icon/${item.src}`)" >
      <p>{{item.name}}</p>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      list: [
        {
          name: '小区档案',
          src: 'sect-icon.png',
          path: '/houseData/basicInfo'
        },
        {
          name: '物企档案',
          src: 'wuqi-icon.png',
          path: '/houseData/propertyInfo'

        },
        {
          name: '业委会档案',
          path: '/houseData/indCous',
          src: 'juwei-icon.png',
        },
      ]
    }
  },
  methods: {
    clickFile(item){
      // console.log(item)
      this.$router.push({path: item.path})

    },
  }
}
</script>

<style scoped>
  .box{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .box >div{
    padding: .5rem;
    background: #fff;
    width: 100%;
    height:30%;
    display: flex;
    align-items:center;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;

  }
  img{
    width: 2vw;
  }
  p{
    padding: 0;
    margin: 0;
  }

</style>