common-mask.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view>
  3. <view v-if="item.id == maskId" class="p-absolute left0 right0 top0 bottom0 d-flex a-center px3 j-around " style="background: rgba(0,0,0,.2);"
  4. @click.stop="hideMask">
  5. <view @click.stop="handleDel(item.id)" class="border-radius d-flex j-center a-center mask-red" style="width: 120rpx;height: 120rpx;">删除</view>
  6. <view v-if='isEdit' @click.stop="handleEdit(item.id)" class="border-radius d-flex j-center a-center mask-blue" style="width: 120rpx;height: 120rpx;">修改</view>
  7. <view v-if='isSum' @click.stop="handleSum(item.id)" class="border-radius d-flex j-center a-center mask-gray" style="width: 120rpx;height: 120rpx;">提交</view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. };
  16. },
  17. props:{
  18. item:{
  19. type:Object,
  20. default:()=>{}
  21. },
  22. maskId:{
  23. type:[String,Number],
  24. default:0
  25. },
  26. isEdit:{
  27. type:Boolean,
  28. default:false
  29. },
  30. isSum:{
  31. type:Boolean,
  32. default:false
  33. }
  34. },
  35. methods:{
  36. hideMask(){
  37. this.$emit('hide')
  38. },
  39. handleDel(){
  40. this.$emit('del')
  41. },
  42. handleEdit(){
  43. this.$emit('edit')
  44. },
  45. handleSum(){
  46. this.$emit('sum')
  47. }
  48. }
  49. }
  50. </script>
  51. <style>
  52. </style>