Skip to content

Commit

Permalink
feat: fixed empty window
Browse files Browse the repository at this point in the history
  • Loading branch information
guancaiwang authored and ivyhaswell committed Dec 4, 2020
1 parent c5dfd25 commit edcb56d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions playground/page/browser/window-type/markdown/part1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// @@code-props: { hideRight: true, height:'100px' }
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ width: 800, height: 600, frame: false })
win.show()
win.loadURL('https://www.github.com')
```
`macOS`下,还有不同的实现方式,[完整文档](https://www.electronjs.org/docs/api/frameless-window#macos-%E4%B8%8A%E7%9A%84%E5%85%B6%E4%BB%96%E6%96%B9%E6%A1%88)

Expand All @@ -28,7 +28,7 @@ win.show()
// 创建一个无边框的窗口
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ titleBarStyle: 'hidden' })
win.show()
win.loadURL('https://www.github.com')
```
效果如下:
<img src="../../resources/markdown/window-type-frame.gif" alt="window-type-frame">
Expand All @@ -42,7 +42,7 @@ win.show()
// 创建一个无边框的窗口
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ titleBarStyle: 'hiddenInset' })
win.show()
win.loadURL('https://www.github.com')
```
效果如下:
<img src="../../resources/markdown/window-type-frame2.gif" alt="window-type-frame2">
Expand Down
6 changes: 3 additions & 3 deletions playground/page/browser/window-type/markdown/windowType.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// @@code-props: { hideRight: true, height:'100px' }
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ width: 800, height: 600, frame: false })
win.show()
win.loadURL('https://github.com')
```
`macOS`下,还有不同的实现方式,[完整文档](https://www.electronjs.org/docs/api/frameless-window#macos-%E4%B8%8A%E7%9A%84%E5%85%B6%E4%BB%96%E6%96%B9%E6%A1%88)

Expand All @@ -28,7 +28,7 @@ win.show()
// 创建一个无边框的窗口
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ titleBarStyle: 'hidden' })
win.show()
win.loadURL('https://github.com')
```
效果如下:
<img src="../../resources/markdown/window-type-frame.gif" alt="window-type-frame">
Expand All @@ -42,7 +42,7 @@ win.show()
// 创建一个无边框的窗口
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ titleBarStyle: 'hiddenInset' })
win.show()
win.loadURL('https://github.com')
```
效果如下:
<img src="../../resources/markdown/window-type-frame2.gif" alt="window-type-frame2">
Expand Down

0 comments on commit edcb56d

Please sign in to comment.