feat: home page optimize
This commit is contained in:
13
src/utils/navigator.ts
Normal file
13
src/utils/navigator.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import router from "@/router";
|
||||
|
||||
export const navigateTo = (path: string, replace?: boolean = false) => {
|
||||
if (path.startsWith("http")) {
|
||||
if (replace) {
|
||||
window.open(path, "_self");
|
||||
} else {
|
||||
window.open(path, "_blank");
|
||||
}
|
||||
return;
|
||||
}
|
||||
router.push(path);
|
||||
};
|
||||
Reference in New Issue
Block a user