no message

This commit is contained in:
A1300399510
2024-01-03 15:28:16 +08:00
parent e5e3d10123
commit 4665ee5043
64 changed files with 769 additions and 731 deletions

View File

@@ -38,3 +38,15 @@ export const timestampToDate = (timestamp) => {
var day = ("0" + date.getDate()).slice(-2); // Add leading 0.
return `${year}-${month}-${day}`;
}
// isblank 是否需要 新标签页 默认是新标签页
export const goToURL = (url, isblank = true) => {
if (typeof document !== "object") return
let aTab = document.createElement('a')
document.body.appendChild(aTab)
aTab.setAttribute('href', url)
if (isblank) aTab.setAttribute('target', "_blank")
aTab.click()
}