lightbox.vue 833 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class="dialog d-popup-center"
  3. v-if="rendered"
  4. v-show="visible"
  5. :transition="transition">
  6. <div class="dialog-content">
  7. <slot></slot>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import Popup from 'vue-popup';
  13. import 'vue-popup/lib/popup.css';
  14. export default {
  15. mixins: [Popup],
  16. props: {
  17. showClose: {
  18. type: Boolean,
  19. default: true
  20. },
  21. showModal: {
  22. type: Boolean,
  23. default: true
  24. },
  25. modal: {
  26. default: true
  27. },
  28. closeOnClickModal: {
  29. default: true
  30. }
  31. },
  32. methods: {
  33. willClose() {
  34. this.visible = false;
  35. }
  36. }
  37. };
  38. </script>
  39. <style lang="css">
  40. .dialog {
  41. position: fixed;
  42. img {
  43. width: 60vw;
  44. }
  45. }
  46. .app__main .d-modal {
  47. margin: 0;
  48. }
  49. </style>