<template>
  <el-card class="test-card">
    <div slot="header" class="clearfix test-card-header">
      <span>众测资源和工具</span>
      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
    </div>
    <div>
      <el-row>
        <el-col :span="8" v-for="item in resourceList" :key="item.code" style=" margin-bottom: 10px;">
          <span style="cursor: pointer; font-size: 18px;" @click="goToDetail(item.code)">{{item.name}}</span>
        </el-col>
      </el-row>
    </div>
  </el-card>
</template>

<script>
  export default {
    name: "ResourceAndTool",
    props:['resourceList'],
    methods:{
        getMore(){
            this.$router.push({
                name: 'ResourceList',
            });
        },
        goToDetail(code) {
            this.$router.push({
                name: 'ResourceDetail',
                path:'/resource/detail',
                query: {id: code}
            })
        },
    }
  }
</script>

<style lang="less">

</style>
