Loading.vue 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="loading_page">
  3. <img src="../img/loading.gif" />
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. props: {
  9. isLoading: {
  10. type: Boolean,
  11. default: true,
  12. },
  13. isManufacturer: {
  14. type: String,
  15. default: "",
  16. },
  17. },
  18. computed: {},
  19. watch: {
  20. isLoading: {
  21. handler(newValue) {
  22. if (!newValue) {
  23. if (this.isManufacturer === "manufacturer") {
  24. this.$router.replace({ path: "/uploadInfor" });
  25. } else {
  26. this.$router.replace({ path: "/inforList" });
  27. }
  28. }
  29. },
  30. immediate: true,
  31. },
  32. },
  33. };
  34. </script>
  35. <style scoped lang="less">
  36. .loading_page {
  37. display: flex;
  38. justify-content: center;
  39. align-items: center;
  40. img {
  41. transform: translateY(8rem);
  42. }
  43. }
  44. </style>