This commit is contained in:
oneao committed 2025-08-14 17:28:32 +08:00
1 parent d1b1aafc57
commit 0f1604c709
58 files changed
+15476 -25

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { defineStore } from "pinia";
import { useRoute } from "vue-router";
import { useRouter } from "vue-router";
export const useRouterStore = defineStore("router", () => {
const route = useRoute();
const router = useRouter();
const getCurrentPath = () => {
return route.path;
};
const toPath = (path: string) => {
router.push(path);
};
return {
getCurrentPath,
toPath,
};
});