fix: 初始化空的electron项目
This commit is contained in:
parent
a8e1e167ff
commit
88cebf0643
|
@ -1,17 +1,14 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
dist
|
||||
out
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
*.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
|
|
|
@ -44,7 +44,13 @@ function createWindow(): void {
|
|||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
// Set app user model id for windows
|
||||
electronApp.setAppUserModelId('com.electron')
|
||||
// 这里一般设置为 AppUserModelID 是 Windows 系统中用于识别应用程序的唯一标识符,主要用于以下几个方面:
|
||||
// 任务栏分组 - 确保相同应用程序的多个窗口在任务栏中被正确地组合在一起
|
||||
// 通知 - 将通知与特定应用程序关联
|
||||
// 跳转列表 - 为应用程序提供自定义的跳转列表
|
||||
// 'com.electron' 是一个示例值,这是 Electron 应用程序模板提供的默认值。在实际应用中,你应该将其修改为你自己应用的唯一标识符,通常使用反向域名格式,例如:'com.你的公司名称.你的应用名称'。
|
||||
// electronApp.setAppUserModelId('com.yourcompany.yourapp')
|
||||
electronApp.setAppUserModelId('com.electron.tp')
|
||||
|
||||
// Default open or close DevTools by F12 in development
|
||||
// and ignore CommandOrControl + R in production.
|
||||
|
|
Loading…
Reference in New Issue