ColumnCard.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <el-card class="column-card" @click.native="checkColumnDetail" shadow="hover" :body-style="bodyStyle">
  3. <img :src="picture" class="column-card__picture"/>
  4. <div class="column-card__header">
  5. <h4 class="column-card__title">{{title}}</h4>
  6. </div>
  7. <div class="column-card__description">{{description}}</div>
  8. </el-card>
  9. </template>
  10. <script>
  11. export default {
  12. name: "ColumnCard",
  13. props: {
  14. title: {
  15. type: String,
  16. require: true,
  17. default: "课程xxxxxxx"
  18. },
  19. // origin: {
  20. // type: String,
  21. // require: true,
  22. // default:"课程提供者xxx"
  23. // },
  24. picture: {
  25. type: String,
  26. require: true,
  27. default: "/image/seec_logo.png"
  28. },
  29. url: {
  30. type: String,
  31. require: true,
  32. default: "/"
  33. },
  34. description: {
  35. type: String,
  36. default: ""
  37. }
  38. },
  39. data(){
  40. return{
  41. bodyStyle: {padding : '0'}
  42. }
  43. },
  44. methods: {
  45. checkColumnDetail(){
  46. if(this.title !== 'JVM简要入门'){
  47. this.$message({
  48. showClose: true,
  49. message: '即将上线,敬请期待'
  50. });
  51. }else{
  52. this.$router.push('/pay');
  53. }
  54. }
  55. }
  56. };
  57. </script>
  58. <style lang="scss" scoped>
  59. @import '~/assets/css/column-card.scss';
  60. </style>