Skip to main content

窗口定制

¥Window Customization

BrowserWindow 模块是你的 Electron 应用的基础,它公开了许多 API,可让你自定义应用窗口的外观和行为。本节介绍如何在 macOS、Windows 和 Linux 上实现窗口自定义的各种用例。

¥The BrowserWindow module is the foundation of your Electron application, and it exposes many APIs that let you customize the look and behavior of your app’s windows. This section covers how to implement various use cases for window customization on macOS, Windows, and Linux.

信息

BrowserWindowBaseWindow 模块的子类。这两个模块都允许你在 Electron 中创建和管理应用窗口,主要区别在于 BrowserWindow 支持单个全尺寸 Web 视图,而 BaseWindow 支持组合多个 Web 视图。在本节文档的示例中,BaseWindow 可以与 BrowserWindow 互换使用。

¥BrowserWindow is a subclass of the BaseWindow module. Both modules allow you to create and manage application windows in Electron, with the main difference being that BrowserWindow supports a single, full size web view while BaseWindow supports composing many web views. BaseWindow can be used interchangeably with BrowserWindow in the examples of the documents in this section.