activity-recommend.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="activity-recommend">
  3. <view v-if="recommendType === 'home'" class="activity-tab">
  4. <u-tabs :active.sync="tabActive" :tabs="tabs" tab-style="default" @change="tabChange"/>
  5. </view>
  6. <view class="activity-list">
  7. <template v-for="(item, index) in [1, 2, 3]">
  8. <view class="activity-item" :key="index">
  9. <view class="activity-title">KOSHINE 新品上线,解锁防脱生发新方式</view>
  10. <view class="activity-time">2024年03月20日 | E1馆二楼M16会议室</view>
  11. <view class="activity-summary">
  12. <view class="text">Kostal推出第四种机型的太阳能并网逆变器 2008年7月5日:KOSTAL公司原来只有PIKO系列太阳能并网逆变器10.1和5.5,中间没有其他功率段的产品。</view>
  13. <van-button class="btn-to-detail" type="primary">
  14. <template>
  15. <view>了解详情</view> <view class="arrow iconfont icon-right-s"></view>
  16. </template>
  17. </van-button>
  18. </view>
  19. </view>
  20. </template>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. options: {
  27. styleIsolation: 'shared'
  28. },
  29. components: {
  30. },
  31. props: {
  32. recommendType: {
  33. type: String,
  34. default: 'home'
  35. }
  36. },
  37. data() {
  38. return {
  39. tabActive: '1',
  40. tabs: [{
  41. label: '展会新闻',
  42. value: 1
  43. }, {
  44. label: '展商新闻',
  45. value: 2
  46. }]
  47. }
  48. },
  49. created() {
  50. },
  51. methods: {
  52. tabChange() {
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss">
  58. .activity-list{
  59. display: grid;
  60. grid-template-columns: 1fr;
  61. grid-row-gap: 18rpx;
  62. margin-top: 28rpx;
  63. }
  64. .activity-item{
  65. display: flex;
  66. flex-direction: column;
  67. height: 210rpx;
  68. background-color: #F6F6F6;
  69. border-radius: 10rpx;
  70. padding: 24rpx 30rpx;
  71. }
  72. .activity-title{
  73. @extend .text-ellipsis-line;
  74. font-family: Arial, Arial;
  75. font-weight: bold;
  76. font-size: $fontSize2;
  77. line-height: 35rpx;
  78. }
  79. .activity-time{
  80. font-size: $fontSize1;
  81. color: #333333;
  82. margin: 12rpx 0;
  83. }
  84. .activity-summary{
  85. display: flex;
  86. align-items: center;
  87. font-size: 18rpx;
  88. line-height: 25rpx;
  89. .btn-to-detail{
  90. flex-shrink: 0;
  91. .van-button__text{
  92. display: flex!important;
  93. align-items: center;
  94. font-size: 18rpx;
  95. }
  96. }
  97. .text{
  98. padding-right: 30rpx;
  99. color: #555555;
  100. @extend .text-ellipsis-line;
  101. -webkit-line-clamp: 2;
  102. }
  103. .arrow{
  104. margin-left: 12rpx;
  105. font-size: $fontSize0;
  106. }
  107. }
  108. .activity-tab{
  109. van-button{
  110. margin-right: 13rpx;
  111. }
  112. }
  113. </style>