mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 11:52:07 +08:00
销毁视图
This commit is contained in:
@@ -38,10 +38,7 @@ class OsService extends Service {
|
|||||||
* removeBrowserView
|
* removeBrowserView
|
||||||
*/
|
*/
|
||||||
removeBrowserView() {
|
removeBrowserView() {
|
||||||
|
this.myBrowserView.webContents.destroy();
|
||||||
// removeBrowserView移除视图后,进程依然存在,估计是electron bug
|
|
||||||
const win = CoreWindow.getMainWindow();
|
|
||||||
win.removeBrowserView(this.myBrowserView);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user