mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
fix: 修复1:: 形式的ipv6校验失败的bug
This commit is contained in:
@@ -167,7 +167,6 @@ function useMixedMenu() {
|
||||
* @param path 路由路径
|
||||
*/
|
||||
function calcSideMenus(path: string = route.path) {
|
||||
debugger;
|
||||
let { rootMenu } = findRootMenuByPath(menus.value, path);
|
||||
if (!rootMenu) {
|
||||
rootMenu = menus.value.find((item: any) => item.path === path);
|
||||
|
||||
@@ -27,8 +27,12 @@ function openWindow(url: string, options: OpenWindowOptions = {}): void {
|
||||
*/
|
||||
function openRouteInNewWindow(path: string) {
|
||||
const { hash, origin } = location;
|
||||
let pathname = location.pathname;
|
||||
if (pathname.endsWith("/")) {
|
||||
pathname = pathname.slice(0, -1);
|
||||
}
|
||||
const fullPath = path.startsWith("/") ? path : `/${path}`;
|
||||
const url = `${origin}${hash ? "/#" : ""}${fullPath}`;
|
||||
const url = `${origin}${pathname}${hash ? "/#" : ""}${fullPath}`;
|
||||
openWindow(url, { target: "_blank" });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user