exhibit-recommend.vue 1.6 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">
  6. <view class="exhibit-image">
  7. <image src="/static/img/example/exhibit.png"/>
  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. tabChange() {
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. .exhibit-recommend{
  37. .exhibit-list{
  38. display: grid;
  39. grid-template-columns: 1fr 1fr;
  40. grid-column-gap: 18rpx;
  41. grid-row-gap: 30rpx;
  42. .exhibit-item{
  43. position: relative;
  44. &.active{
  45. .exhibit-tag{
  46. background-color: #FCEDE1;
  47. color: #E57519;
  48. }
  49. .exhibit-name{
  50. color: #E57519;
  51. }
  52. .exhibit-image{
  53. border: 1rpx solid #E57519;
  54. }
  55. }
  56. }
  57. .exhibit-image{
  58. width: 100%;
  59. height: 178rpx;
  60. border: 1rpx solid #D9D9D9;
  61. image{
  62. width: 100%;
  63. height: 100%;
  64. }
  65. }
  66. .exhibit-name {
  67. font-family: Poppins, Poppins;
  68. font-size: $fontSize0;
  69. color: #333333;
  70. margin-top: 12rpx;
  71. }
  72. .exhibit-tag{
  73. position: absolute;
  74. top: 20rpx;
  75. left: 31rpx;
  76. font-size: 10rpx;
  77. color: #333333;
  78. background-color: #E2E8F0;
  79. border-radius: 4rpx;
  80. padding: 5rpx 8rpx;
  81. }
  82. }
  83. }
  84. </style>