|
|
@@ -3,7 +3,7 @@
|
|
|
<component :is="pageComponent"></component>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
- import { Component, ref, watch } from 'vue';
|
|
|
+ import { ref, watch } from 'vue';
|
|
|
import { useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
import LeafPage from './components/LeafPage.vue';
|
|
|
import RootPage from './components/RootPage.vue';
|
|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
const mineStore = useMineDepartmentStore();
|
|
|
|
|
|
- const pageComponent = ref<Component>(Empty);
|
|
|
+ const pageComponent = ref<any>(Empty);
|
|
|
|
|
|
watch(
|
|
|
() => mineStore.getDepart,
|
|
|
@@ -23,6 +23,9 @@
|
|
|
} else {
|
|
|
pageComponent.value = RootPage;
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ immediate: true,
|
|
|
}
|
|
|
);
|
|
|
</script>
|