msg-pop.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view v-show="isShowMsgPop">
  3. <view class="mask" @tap='clickMask' @touchmove.stop.prevent="moveHandle"></view>
  4. <view class="pop-menu">
  5. <view class="arrow">
  6. <image src="/static/message/pop_arrow.png" mode="widthFix"></image>
  7. </view>
  8. <view class="menu">
  9. <view class="u-f-ac" @tap='clickChat'>
  10. <image src="/static/message/talk36_2.png" mode="widthFix"></image>
  11. <text>发起聊天</text>
  12. </view>
  13. <view class="u-f-ac" @tap='clickScan'>
  14. <image src="/static/message/scan36.png" mode="widthFix"></image>
  15. <text>扫一扫</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default{
  23. props:{
  24. isShowMsgPop:{
  25. type:Boolean,
  26. default:false
  27. }
  28. },
  29. data(){
  30. return{
  31. }
  32. },
  33. methods:{
  34. //蒙层点击
  35. clickMask(){
  36. return this.$emit('clickMask');
  37. },
  38. //聊天点击
  39. clickChat(){
  40. return this.$emit('clickChat');
  41. },
  42. //扫一扫点击
  43. clickScan(){
  44. return this.$emit('clickScan');
  45. },
  46. moveHandle(){}
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .pop-menu {
  52. margin-top: -40rpx;
  53. width: 350rpx;
  54. height: 230rpx;
  55. position: absolute;
  56. z-index: 666;
  57. right: 20rpx;
  58. .arrow {
  59. text-align: right;
  60. padding-right: 25rpx;
  61. image {
  62. width: 30rpx;
  63. height: 15rpx;
  64. }
  65. }
  66. .menu {
  67. margin-top: -13rpx;
  68. background-color: #FFFFFF;
  69. border-radius: 10rpx;
  70. text-align: center;
  71. padding: 0 30rpx;
  72. view {
  73. width: 270rpx;
  74. height: calc(200rpx/2);
  75. }
  76. image {
  77. width: 36rpx;
  78. height: 36rpx;
  79. margin-right: 20rpx;
  80. }
  81. }
  82. }
  83. .mask {
  84. position: fixed;
  85. z-index: 600;
  86. top: 0;
  87. right: 0;
  88. bottom: 0;
  89. left: 0;
  90. background-color: rgba(0, 0, 0, 0.3);
  91. }
  92. </style>