ResourceAndTool.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <el-card class="test-card">
  3. <div slot="header" class="clearfix test-card-header">
  4. <span>众测资源和工具</span>
  5. <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="getMore()">more>></el-button>
  6. </div>
  7. <div>
  8. <el-row>
  9. <el-col :span="8" v-for="item in resourceList" :key="item.code" style=" margin-bottom: 10px;">
  10. <span style="cursor: pointer; font-size: 18px;" @click="goToDetail(item.code)">{{item.name}}</span>
  11. </el-col>
  12. </el-row>
  13. </div>
  14. </el-card>
  15. </template>
  16. <script>
  17. export default {
  18. name: "ResourceAndTool",
  19. props:['resourceList'],
  20. methods:{
  21. getMore(){
  22. this.$router.push({
  23. name: 'ResourceList',
  24. });
  25. },
  26. goToDetail(code) {
  27. this.$router.push({
  28. name: 'ResourceDetail',
  29. path:'/resource/detail',
  30. query: {id: code}
  31. })
  32. },
  33. }
  34. }
  35. </script>
  36. <style lang="less">
  37. </style>