Lv110版本源码上传

This commit is contained in:
西瓜°
2024-11-04 15:00:40 +08:00
parent a6dbccdead
commit e029da72e4
6642 changed files with 131203 additions and 136087 deletions
+28
View File
@@ -0,0 +1,28 @@
import { ipcRenderer } from "electron"
import { useLoading } from "./loading"
const { appendLoading, removeLoading } = useLoading()
window.removeLoading = removeLoading
window.pywebview = {
api: ipcRenderer
}
// window.sharedObject = {
// storage: "test"
// }
/** docoment ready */
function domReady(condition: DocumentReadyState[] = ["complete", "interactive"]) {
return new Promise(resolve => {
if (condition.includes(document.readyState)) {
resolve(true)
} else {
document.addEventListener("readystatechange", () => {
if (condition.includes(document.readyState)) {
resolve(true)
}
})
}
})
}
domReady().then(appendLoading)