pop.vue 769 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div
  3. class=" w-screen h-screen fixed left-0 top-0 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. <a-spin
  11. :spinning="loading"
  12. size="large"
  13. class="w-full h-full flex justify-center items-center"
  14. >
  15. <div class="w-full h-full flex justify-center items-center">
  16. <slot/>
  17. </div>
  18. </a-spin>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: "pop",
  24. props:{
  25. mask:{
  26. default: true
  27. },
  28. loading:{
  29. default: false
  30. },
  31. show:{
  32. default: false
  33. }
  34. },
  35. data(){
  36. return {
  37. }
  38. }
  39. }
  40. </script>
  41. <style scoped>
  42. .mask{
  43. background-color: #000;
  44. opacity: 0.3;
  45. }
  46. </style>