m-map.vue 2.3 KB

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