exhibit-recommend.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="exhibit-recommend">
  3. <view class="exhibit-list">
  4. <template v-for="(item, index) in [1, 2, 3, 4]">
  5. <view class="exhibit-item" hover-class="active" :key="index" @click="onClickExhibit(item)">
  6. <view class="exhibit-image">
  7. <image src="https://oss.starify.cn/prod/starify/up/0001000075/20241113/67343f1c494de.png?x-oss-process=image/resize,w_400" mode="aspectFit"/>
  8. </view>
  9. <view class="exhibit-name">汽车连接器 86W MLK 1,2 SD-HOLDER</view>
  10. <view class="exhibit-tag">常规产品</view>
  11. </view>
  12. </template>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. options: {
  19. styleIsolation: 'shared'
  20. },
  21. components: {
  22. },
  23. data() {
  24. return {
  25. }
  26. },
  27. created() {
  28. },
  29. methods: {
  30. onClickExhibit() {
  31. this.navigateTo('/pages/exhibitor/exhibit-detail')
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. .exhibit-recommend{
  38. .exhibit-list{
  39. display: grid;
  40. grid-template-columns: 1fr 1fr;
  41. grid-column-gap: 18rpx;
  42. grid-row-gap: 30rpx;
  43. .exhibit-item{
  44. position: relative;
  45. &.active{
  46. .exhibit-tag{
  47. background-color: #FCEDE1;
  48. color: #E57519;
  49. }
  50. .exhibit-name{
  51. color: #E57519;
  52. }
  53. .exhibit-image{
  54. border: 1rpx solid #E57519;
  55. }
  56. }
  57. }
  58. .exhibit-image{
  59. width: 100%;
  60. height: 178rpx;
  61. border: 1rpx solid #D9D9D9;
  62. image{
  63. width: 100%;
  64. height: 100%;
  65. }
  66. }
  67. .exhibit-name {
  68. font-family: Poppins, Poppins;
  69. font-size: $fontSize0;
  70. color: #333333;
  71. margin-top: 12rpx;
  72. }
  73. .exhibit-tag{
  74. position: absolute;
  75. top: 20rpx;
  76. left: 31rpx;
  77. font-size: 10rpx;
  78. color: #333333;
  79. background-color: #E2E8F0;
  80. border-radius: 4rpx;
  81. padding: 5rpx 8rpx;
  82. }
  83. }
  84. }
  85. </style>