m-functional-module.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="flex_c row">
  3. <view class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
  4. <view class="text" :class="isMy ? 'text_r' : 'text_l'">
  5. <view class="flex_c_c article">
  6. <view class="flex_r fa_c article-info">
  7. <view class="article-img">
  8. <image class="img" :src="value.payload.image" mode="aspectFill"></image>
  9. </view>
  10. <view class="flex1">
  11. <view class="text_32 article-title">{{ value.payload.title }}</view>
  12. <view class="text_26 color__ article-title">{{ value.payload.text }}</view>
  13. </view>
  14. </view>
  15. <view class="m-line">
  16. <m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
  17. </view>
  18. <view class="flex_r fa_c article-b">
  19. <!-- <view class="article-b-icon"></view> -->
  20. <view class="text_20 color__ article-b-text">功能分享</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. props: {
  30. isMy: {
  31. type: [Boolean, Number],
  32. default: false
  33. },
  34. value: {
  35. type: Object,
  36. default: {}
  37. }
  38. },
  39. data() {
  40. return {};
  41. },
  42. computed: {},
  43. methods: {
  44. onClick() {
  45. this.$emit('onClick');
  46. }
  47. }
  48. };
  49. </script>
  50. <style scoped lang="scss">
  51. .row {
  52. }
  53. .row_ {
  54. flex-direction: row-reverse;
  55. }
  56. .text_box {
  57. flex-direction: row-reverse;
  58. }
  59. .text {
  60. position: relative;
  61. z-index: 99;
  62. box-sizing: border-box;
  63. }
  64. .text_r {
  65. position: relative;
  66. }
  67. .text_l {
  68. position: relative;
  69. }
  70. .text_r::after {
  71. position: absolute;
  72. z-index: -1;
  73. content: '';
  74. top: 26rpx;
  75. right: -8rpx;
  76. width: 18rpx;
  77. height: 18rpx;
  78. border-radius: 2px;
  79. transform: rotate(45deg);
  80. background-color: #fff;
  81. }
  82. .text_l::after {
  83. position: absolute;
  84. z-index: -1;
  85. content: '';
  86. top: 26rpx;
  87. left: -8rpx;
  88. width: 18rpx;
  89. height: 18rpx;
  90. border-radius: 2px;
  91. transform: rotate(45deg);
  92. background-color: #fff;
  93. }
  94. .article {
  95. box-sizing: border-box;
  96. padding: 14rpx 20rpx 4rpx 20rpx;
  97. width: 490rpx;
  98. border-radius: 10rpx;
  99. overflow: hidden;
  100. background-color: #fff;
  101. border: 0.5px solid #fff;
  102. .article-info {
  103. width: 100%;
  104. .article-img {
  105. width: 100rpx;
  106. height: 100rpx;
  107. margin-right: 20rpx;
  108. border-radius: 10rpx;
  109. overflow: hidden;
  110. }
  111. .article-title {
  112. box-sizing: border-box;
  113. margin-bottom: 14rpx;
  114. }
  115. }
  116. .m-line {
  117. width: 100%;
  118. height: 1px;
  119. margin-top: 20rpx;
  120. }
  121. .article-b {
  122. width: 100%;
  123. margin-top: 4rpx;
  124. .article-b-icon {
  125. width: 26rpx;
  126. height: 26rpx;
  127. background-color: #f1f1f1;
  128. border-radius: 50%;
  129. overflow: hidden;
  130. margin-right: 10rpx;
  131. }
  132. .article-b-text {
  133. }
  134. }
  135. }
  136. </style>