news-item.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="news-item" @click="onClickDetail(item)">
  3. <view class="news-title">组装自动化与测试测量深度融合,赋能电子制造业高质量发展2024</view>
  4. <view class="news-time">2024年6月28日</view>
  5. <view class="news-summary">
  6. <view class="text">在人类历史长河中,工业生产一直是社会进步的重要驱动力,而自动化技术的飞速发展,使其正在经历前所未有的变革。特别是在电子生产制造领域,传统的人工操作由于易疲劳、品质不稳定以及</view>
  7. <view class="to-detail"><view>了解详情</view> <view class="arrow iconfont icon-right-s"></view></view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. components: {
  14. },
  15. props: {
  16. type: String,
  17. item: Object
  18. },
  19. data() {
  20. return {
  21. }
  22. },
  23. created() {
  24. },
  25. methods: {
  26. onClickDetail(item) {
  27. this.navigateTo('https://mp-test-onlinecatelogue.matchexpo.cn/mini-pro-news')
  28. if (this.type === 'exhibitor') {
  29. // this.navigateTo('')
  30. } else {
  31. }
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. .news-item{
  38. display: flex;
  39. flex-direction: column;
  40. height: 210rpx;
  41. background-color: #F6F6F6;
  42. border-radius: 10rpx;
  43. padding: 24rpx 30rpx;
  44. }
  45. .news-summary{
  46. display: flex;
  47. align-items: center;
  48. }
  49. .news-title{
  50. @include text-ellipsis-line;
  51. font-family: Arial, Arial;
  52. font-weight: bold;
  53. font-size: $fontSize3;
  54. line-height: 35rpx;
  55. }
  56. .news-time{
  57. font-size: $fontSize0;
  58. color: #555555;
  59. margin: 12rpx 0;
  60. }
  61. .news-summary{
  62. font-size: $fontSize1;
  63. line-height: 25rpx;
  64. .text{
  65. padding-right: 30rpx;
  66. color: #555555;
  67. @include text-ellipsis-line;
  68. -webkit-line-clamp: 2;
  69. }
  70. .to-detail{
  71. display: flex;
  72. align-items: center;
  73. flex-shrink: 0;
  74. color: $buttonPrimaryColor;
  75. font-size: 16rpx;
  76. font-weight: bold;
  77. padding: 0 24rpx;
  78. }
  79. .arrow{
  80. margin-left: 12rpx;
  81. font-size: $fontSize0;
  82. }
  83. }
  84. </style>