index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="mask_layer" @click="destroyedFunc">
  3. <view class="A" @click.stop="active(1)">记录</view>
  4. <view class="B" @click.stop="active(2)">暂停</view>
  5. <view class="C" @click.stop="active(3)">编辑</view>
  6. <view class="D" @click.stop="active(4)">删除</view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {};
  13. },
  14. methods: {
  15. active(int) {
  16. //返回操作事件
  17. this.$emit("moreShowActive", int)
  18. },
  19. destroyedFunc() {
  20. this.$emit("moreShowActive")
  21. },
  22. },
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .mask_layer {
  27. position: absolute;
  28. background-color: rgba(0, 0, 0, .5);
  29. top: 0;
  30. left: 0;
  31. right: 0;
  32. bottom: 0;
  33. display: flex;
  34. align-items: center;
  35. justify-content: space-around;
  36. &>.A {
  37. background-color: #27AE60;
  38. }
  39. &>.B {
  40. background-color: #363C4F;
  41. }
  42. &>.C {
  43. background-color: #F57737;
  44. }
  45. &>.D {
  46. background-color: #EB5757;
  47. }
  48. &>view {
  49. width: 104rpx;
  50. height: 104rpx;
  51. line-height: 104rpx;
  52. text-align: center;
  53. border-radius: 50%;
  54. overflow: hidden;
  55. color: #fff;
  56. font-weight: 500;
  57. font-size: 28rpx;
  58. }
  59. }
  60. </style>