Modal.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <transition name="modal">
  3. <div
  4. v-show="modalShow"
  5. class="fixed top-0 bottom-0 left-0 right-0 z-1040 flex justify-center items-center duration-300"
  6. >
  7. <div class="fixed top-0 bottom-0 left-0 right-0 z-1050 opacity-30 bg-black" @click.self="doClose"></div>
  8. <div class="modal-dialog relative z-1060 max-w-460px w-full transition-opacity duration-150 ease-linear">
  9. <div class="modal-content relative py-65px px-35px text-center bg-white rounded-6px outline-0 transition-transform duration-300">
  10. <div class="modal-header">
  11. <span class="close absolute top-12px right-12px w-20px h-20px opacity-50 cursor-pointer hover:opacity-100" @click="doClose"></span>
  12. </div>
  13. <div>
  14. <img class="inline-block w-87px" src="/images/contact/success.png" alt="success">
  15. <div class="mt-16px mb-2px text-28px leading-44px font-bold text-brand-1">感谢您的联系!</div>
  16. <div class="text-sm text-brand-4">您的信息已成功发送给ComPDFKit团队,我们将在一个工作日内,以邮件或电话的方式与您取得联系。</div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </transition>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. modalShow: {
  27. type: Boolean,
  28. default: false,
  29. required: true
  30. }
  31. },
  32. methods: {
  33. doClose () {
  34. this.$emit('close', false)
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .modal-enter, .modal-leave-to {
  41. .modal-dialog {
  42. opacity: 0;
  43. .modal-content {
  44. transform: translate(0, -50px);
  45. }
  46. }
  47. }
  48. .modal-content {
  49. -webkit-box-shadow: 0 3px 9px rgba(0,0,0,0.5);
  50. box-shadow: 0 3px 9px rgba(0,0,0,0.5);
  51. .close {
  52. background: url('~/assets/images/icons/close.png') center no-repeat;
  53. background-size: 15px auto;
  54. }
  55. }
  56. </style>