Files
xl-root/src/App.vue

31 lines
820 B
Vue
Raw Normal View History

2025-05-27 19:01:22 +08:00
<script setup>
import {onMounted} from "vue";
import {useSystemStore} from "./pinia/SystemStore/index.js";
2025-06-25 20:25:40 +08:00
import {useRoute} from "vue-router";
2025-06-17 21:34:59 +08:00
import {toPath} from "./utils/index.js";
2025-05-27 19:01:22 +08:00
const SystemStore = useSystemStore();
2025-06-25 20:25:40 +08:00
const route = useRoute();
2025-05-27 19:01:22 +08:00
onMounted(() => {
2025-06-17 21:34:59 +08:00
const isRoot = SystemStore.isRoot;
2025-06-25 20:25:40 +08:00
if (window.location.href.indexOf('/manage-materials') < 0) {
SystemStore.clearRouter().then(() => {
SystemStore.setRouter(isRoot).then(() => {
toPath(SystemStore.NOW_ROUTER, SystemStore.NOW_ROUTER_QUERY);
});
2025-06-17 21:34:59 +08:00
});
2025-06-25 20:25:40 +08:00
} else {
toPath('/manage-materials', SystemStore.NOW_ROUTER_QUERY, true);
}
2025-05-27 19:01:22 +08:00
});
</script>
2025-02-27 13:46:35 +08:00
<template>
2025-03-10 19:01:21 +08:00
<a-config-provider>
2025-02-28 09:56:01 +08:00
<router-view></router-view>
</a-config-provider>
2025-02-27 13:46:35 +08:00
</template>
2025-02-27 14:38:47 +08:00
<style scoped></style>