feat: support loading

This commit is contained in:
草鞋没号 committed 2021-11-02 10:19:50 +08:00
1 parent ad9e8a4937
commit 62531ae987
5 files changed
+104 -2

No files matched your search

+25 -1
View File
@@ -1 +1,25 @@
console.log('index.main.ts')
import fs from 'fs'
import path from 'path'
import { contextBridge, ipcRenderer } from 'electron'
import { domReady } from './utils'
import { useLoading } from './loading'
const { appendLoading, removeLoading } = useLoading()
; (async () => {
await domReady()
appendLoading()
})();
// ---------------------------------------------------
contextBridge.exposeInMainWorld('bridge', {
__dirname,
__filename,
fs,
path,
ipcRenderer,
removeLoading,
})