pop.vue 637 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div
  3. class=" w-screen h-screen fixed left-0 top-0 z-50 flex overflow-hidden justify-center items-center"
  4. v-if="show"
  5. >
  6. <div
  7. class="mask absolute left-0 top-0 w-full h-full"
  8. v-if="mask"
  9. ></div>
  10. <div class="w-full h-full flex justify-center items-center">
  11. <slot/>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: "pop",
  18. props:{
  19. mask:{
  20. default: true
  21. },
  22. loading:{
  23. default: false
  24. },
  25. show:{
  26. default: false
  27. }
  28. },
  29. data(){
  30. return {
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped>
  36. .mask{
  37. background-color: #000;
  38. opacity: 0.3;
  39. }
  40. </style>