feat: 引入prettier

This commit is contained in:
2025-06-29 08:32:17 +08:00
parent dfc817e3e3
commit cae0fe371b
29 changed files with 447 additions and 316 deletions

View File

@@ -1,15 +1,15 @@
/** 直接当前页面跳转到指定url */
export const jump = (url: string) => {
window.location.href = url
}
window.location.href = url;
};
/** 在新标签页中跳转到指定url */
export const jumpBlank = (url: string) => {
window.open(url, "_blank")
}
window.open(url, "_blank");
};
/** 将对象转换为url查询字符串 */
export const queryFormat = (query: Record<string, any>) => {
const params = new URLSearchParams(query)
return params.toString() ? `?${params}` : ""
}
const params = new URLSearchParams(query);
return params.toString() ? `?${params}` : "";
};