App.vue 809 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div id="app">
  3. <router-view />
  4. <loading v-show="isLoading" />
  5. </div>
  6. </template>
  7. <script>
  8. import loading from "@/components/loading";
  9. export default {
  10. components: { loading },
  11. name: "App",
  12. data() {
  13. return {
  14. isLoading: false, //全局进入加载动画
  15. };
  16. },
  17. created() {
  18. this.isLoading = true;
  19. },
  20. mounted() {
  21. this.isLoading = false;
  22. },
  23. };
  24. </script>
  25. <style lang="less">
  26. @import "./assets/style/initPage.less";
  27. #app {
  28. font-family: Microsoft YaHei, 微软雅黑, MicrosoftJhengHei, 华文细黑, STHeiti,
  29. MingLiu;
  30. -webkit-font-smoothing: antialiased;
  31. -moz-osx-font-smoothing: grayscale;
  32. height: 100%;
  33. width: 100%;
  34. }
  35. input {
  36. font-family: Microsoft YaHei, 微软雅黑, MicrosoftJhengHei, 华文细黑, STHeiti,
  37. MingLiu;
  38. }
  39. </style>