app.vue 573 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <div class="basic-content">
  3. <Header />
  4. <NuxtPage />
  5. <Footer />
  6. </div>
  7. </template>
  8. <script setup lang="ts">
  9. const route = useRoute();
  10. // const globalProperties = getCurrentInstance().appContext.config.globalProperties;
  11. const nuxtApp = useNuxtApp();
  12. // console.log("nuxtApp1");
  13. // if (nuxtApp.$myGlobal666) {
  14. // nuxtApp.$myGlobal666();
  15. // }
  16. watch(
  17. () => route.fullPath,
  18. (newValue: any) => {
  19. if (nuxtApp.$onAnimated) {
  20. console.log("tag", process.browser);
  21. nuxtApp.$onAnimated();
  22. }
  23. },
  24. { immediate: true }
  25. );
  26. </script>