index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="activity-index">
  3. <nav-bar title="同期活动" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view :tabbar-conflict="true">
  5. <view class="main-container">
  6. <view class="activity-head">
  7. <view class="activity-head-title">同期活动</view>
  8. <view class="activity-head-desc">今年慕尼黑上海电子生产设备展将围绕四大行业主题开展共计9场同期论坛,论坛围绕工业机器人、柔性制造、储能与新能源、汽车线束、智能座舱、智能制造、TGV先进材料、封装、胶粘剂、新能源汽车等热门话题展开更多探讨与交流。</view>
  9. </view>
  10. <van-empty v-if="activityList.length === 0" description="暂无数据" />
  11. <view v-else class="activity-list">
  12. <template v-for="(item, index) in activityList">
  13. <activity-item :item="item" :key="index" />
  14. </template>
  15. </view>
  16. </view>
  17. </u-scroll-view>
  18. </view>
  19. </template>
  20. <script>
  21. import NavBar from '@/components/layout/nav-bar'
  22. import UScrollView from '@/components/common/u-scroll-view'
  23. import ActivityItem from '@/pages/activity/components/activity-item.vue'
  24. export default {
  25. options: {
  26. styleIsolation: 'shared'
  27. },
  28. components: {
  29. NavBar,
  30. UScrollView,
  31. ActivityItem
  32. },
  33. data() {
  34. return {
  35. activityList: [{ favourited: true }, {}, {}],
  36. }
  37. },
  38. created() {},
  39. methods: {
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .activity-head{
  45. color: #333333;
  46. .activity-head-title{
  47. font-weight: bold;
  48. font-size: $fontSize6;
  49. line-height: 49rpx;
  50. }
  51. .activity-head-desc{
  52. margin-top: 20rpx;
  53. font-size: $fontSize3;
  54. line-height: 40rpx;
  55. }
  56. .activity-favourites-text{
  57. white-space: nowrap;
  58. }
  59. }
  60. .activity-list{
  61. display: grid;
  62. grid-template-columns: 1fr;
  63. grid-row-gap: 30rpx;
  64. margin-top: 40rpx;
  65. color: #333333;
  66. }
  67. </style>