<script lang="ts">
import { ref, defineComponent, reactive, toRefs, watch, onMounted } from "vue";
import useProjectStore from "@/store/useProjectStore";

export default defineComponent({
  setup() {
    const projectStore = useProjectStore();
    onMounted(() => {
      //这两个请求不能写在这里  因为router.beforeEach 发生在后面，获取不到projectId
      // projectStore.setWeather();
      // projectStore.setProjectObj();
    });
    // projectStore.$subscribe((mutation, state) => {
    //   console.log("projectStore--state222", mutation);
    //   // console.log("projectStore--state222", mutation,  JSON.stringify(state));
    // });
    // watch(projectStore.$state, (nstate, ostate) => {
    //   console.log('watch-state',JSON.stringify(nstate) , JSON.stringify(ostate));
    //    // debugger;
    // });
  },
});
</script>

<template>
    <router-view></router-view>
</template>

<style scoped lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  // background: #f3fdff;
  //   text-align: center;
  //   color: #2c3e50;
  //   margin-top: 60px;
}
</style>
