smallWaiting1.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <popup ref="Message" v-if="display">
  3. <div class="ui-waiting">
  4. <div class="txt">{{lodingtxt}}</div>
  5. <div class="spinner">
  6. <div class="bounce1"></div>
  7. <div class="bounce2"></div>
  8. <div class="bounce3"></div>
  9. </div>
  10. <!-- <div>请稍等...</div> -->
  11. </div>
  12. </popup>
  13. </template>
  14. <script>
  15. import Popup from "../popup";
  16. import { i18n } from "@/lang"
  17. export default {
  18. name: "ui-waiting",
  19. components: {
  20. Popup
  21. },
  22. data() {
  23. return {
  24. display: false,
  25. duration: 0,
  26. };
  27. },
  28. computed:{
  29. lodingtxt(){
  30. return i18n.t(`gather.loading`)
  31. }
  32. },
  33. methods: {
  34. show() {
  35. this.$nextTick(() => (this.display = true));
  36. },
  37. hide() {
  38. this.$nextTick(() => (this.display = false));
  39. }
  40. }
  41. };
  42. </script>
  43. <style lang="less" scoped>
  44. .ui-waiting {
  45. color: #fff;
  46. text-align: center;
  47. letter-spacing: 2px;
  48. .txt{
  49. font-size: 14px;
  50. }
  51. .spinner {
  52. width: 100%;
  53. text-align: center;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. margin-top: 5px;
  58. > div {
  59. width: 5px;
  60. height: 5px;
  61. background-color: #fff;
  62. margin: 5px;
  63. border-radius: 100%;
  64. display: inline-block;
  65. animation: bouncedelay 1.4s infinite ease-in-out;
  66. animation-fill-mode: both;
  67. }
  68. .bounce1 {
  69. animation-delay: -0.32s;
  70. }
  71. .bounce2 {
  72. animation-delay: -0.16s;
  73. }
  74. }
  75. }
  76. </style>