index.vue 408 B

1234567891011121314151617181920
  1. <template>
  2. <transition name="fade">
  3. <div class="toast" v-show="show">{{text}}</div>
  4. </transition>
  5. </template>
  6. <style lang="scss" scoped>
  7. .toast{
  8. position: fixed;
  9. z-index: 999;
  10. left: 50%;
  11. top: 50%;
  12. transform: translate(-50%, -50%);
  13. font-size: 14px;
  14. height: 44px;
  15. line-height: 44px;
  16. color: #ffffff;
  17. background-color: rgba($color: #000000, $alpha: .7);
  18. padding: 0 52px;
  19. }
  20. </style>