数据库脚本修复

This commit is contained in:
biss committed 2026-08-23 09:11:18 +08:00
1 parent b7b7c25d78
commit 14af0910e7
7 files changed
+500 -1

No files matched your search

+3 -1
View File
@@ -4,7 +4,9 @@ import { ElMessageBox } from 'element-plus'
let updatePromptVisible = false
function serviceWorkerUrl() {
return new URL('sw.js', import.meta.env.BASE_URL).toString()
// Vite's BASE_URL is normally a path such as "/" rather than an absolute
// URL. The URL constructor requires an absolute base in browsers.
return new URL(`${import.meta.env.BASE_URL}sw.js`, window.location.origin).toString()
}
async function promptToRefresh(registration: ServiceWorkerRegistration) {