message.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <transition>
  3. <div class="message-wrap">
  4. <p class="message-text">{{messageText}}</p>
  5. </div>
  6. </transition>
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. messageText: {
  12. type: String,
  13. default: ''
  14. }
  15. }
  16. }
  17. </script>
  18. <style lang="scss" type="text/scss" scoped>
  19. @import '../common/style/mixin';
  20. .message-wrap{
  21. position: fixed;
  22. left: 0;
  23. top: 0;
  24. width: 100%;
  25. height: 100%;
  26. z-index: 999999;
  27. .message-text{
  28. position: absolute;
  29. left: 50%;
  30. top: 40%;
  31. width: 80%;
  32. padding: 20px 0;
  33. text-align: center;
  34. transform: translate(-50%,-50%);
  35. font-size: 28px;
  36. color: #666;
  37. @include borderRadius(40px);
  38. /*background: #EDF2FC;*/
  39. background:rgba(255,255,255,1);
  40. box-shadow:1px 1px 15px rgba(65,148,168,0.3);
  41. opacity:1;
  42. }
  43. }
  44. .fade-enter-active, .fade-leave-active {
  45. transition: opacity .5s;
  46. }
  47. .fade-enter, .fade-leave-to {
  48. opacity: 0;
  49. }
  50. </style>