Loading.vue 849 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. },
  20. watch: {
  21. isLoading: function (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. },
  31. created() {
  32. console.log('1')
  33. },
  34. };
  35. </script>
  36. <style scoped lang="less">
  37. .loading_page {
  38. display: flex;
  39. justify-content: center;
  40. align-items: center;
  41. img {
  42. transform: translateY(8rem);
  43. }
  44. }
  45. </style>