index.vue 592 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <!-- 弹出层 -->
  3. <div
  4. class="ext-el-mask"
  5. style="width: calc(100vw); height: calc(100vh); z-index: 11001"
  6. :style="{display:display}"
  7. ></div>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. display:'none'
  14. };
  15. },
  16. mounted(){
  17. this.$bus.on("openMask",this.openMask)
  18. this.$bus.on("closeMask",this.closeMask)
  19. },
  20. methods:{
  21. // 打开弹出层
  22. openMask(){
  23. this.display = 'block'
  24. },
  25. // 关闭弹出层
  26. closeMask(){
  27. this.display = 'none'
  28. }
  29. },
  30. components: {},
  31. name: "Mask",
  32. };
  33. </script>