teaching-case.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="teaching_case">
  3. <view class="img">
  4. <!-- <slot name="img"></slot> -->
  5. <image src="../../static/logo.png" mode="aspectFill"></image>
  6. </view>
  7. <view class="right">
  8. <view class="title">
  9. <view class="tag">类型</view>
  10. <text>这是教研标题这是教研标题这是教研标题</text>
  11. </view>
  12. <view class="introduce">
  13. 查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情
  14. </view>
  15. <view class="operate">
  16. <view class="left">
  17. <view class="">收藏</view>
  18. <view class="">订阅</view>
  19. </view>
  20. <button class="btn">立即参与</button>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. name:"teaching-case",
  28. data() {
  29. return {
  30. };
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. .teaching_case{
  36. display: flex;
  37. justify-content: space-between;
  38. margin-bottom: 20px;
  39. padding-right: 20px;
  40. .img{
  41. width: 180rpx;
  42. height: 180rpx;
  43. image{
  44. width: 100%;
  45. height:100%;
  46. }
  47. }
  48. .right{
  49. padding-left: 15px;
  50. flex: 1;
  51. width: 100rpx;
  52. display: flex;
  53. flex-direction: column;
  54. align-content: flex-end ;
  55. .title{
  56. display: flex;
  57. margin-bottom: 5px;
  58. .tag{
  59. border: 1px #00b2b6 solid;
  60. font-size: 12px;
  61. display: flex;
  62. white-space: nowrap;
  63. justify-content: center;
  64. align-items: center;
  65. padding: 2px 4px;
  66. border-radius: 3px;
  67. margin-right: 10rpx;
  68. color: #00b2b6;
  69. }
  70. text{
  71. overflow: hidden;
  72. text-overflow:ellipsis;
  73. white-space: nowrap;
  74. }
  75. }
  76. .introduce{
  77. font-size: 16px;
  78. color: #a7a7a7;
  79. // padding: 20rpx 0;
  80. overflow: hidden;
  81. text-overflow:ellipsis;
  82. white-space: nowrap;
  83. }
  84. .operate{
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: flex-end;
  88. .left{
  89. display: flex;
  90. justify-content: space-between;
  91. width: 200rpx;
  92. }
  93. .btn{
  94. width: 80px;
  95. font-size: 12px;
  96. background-color: #3081e8;
  97. color: #fff;
  98. border-radius: 30px;
  99. margin: 0;
  100. float: right;
  101. margin-top: 10px;
  102. }
  103. }
  104. }
  105. }
  106. </style>