* 创建窗口 * @returns BrowserWindow | null
()
| 24 | * @returns BrowserWindow | null |
| 25 | */ |
| 26 | create(): BrowserWindow | null { |
| 27 | this.win = createWindow({ |
| 28 | width: 800, |
| 29 | height: 560, |
| 30 | maxWidth: 800, |
| 31 | maxHeight: 560, |
| 32 | resizable: false, |
| 33 | alwaysOnTop: true, |
| 34 | // 不在任务栏显示 |
| 35 | skipTaskbar: true, |
| 36 | // 窗口不能最小化 |
| 37 | minimizable: false, |
| 38 | // 窗口不能最大化 |
| 39 | maximizable: false, |
| 40 | // 窗口不能进入全屏状态 |
| 41 | fullscreenable: false, |
| 42 | show: false, |
| 43 | }); |
| 44 | if (!this.win) return null; |
| 45 | // 加载地址 |
| 46 | this.win.loadURL(this.winURL); |
| 47 | // 窗口事件 |
| 48 | this.event(); |
| 49 | return this.win; |
| 50 | } |
| 51 | /** |
| 52 | * 获取窗口 |
| 53 | * @returns BrowserWindow | null |
no test coverage detected