Vue.js 如何将Electron webview与vuejs一起使用?
有没有人有幸创建了一个利用Electron WebView的vue应用程序?我有以下设置,但当我运行时,窗口为空Vue.js 如何将Electron webview与vuejs一起使用?,vue.js,electron,Vue.js,Electron,有没有人有幸创建了一个利用Electron WebView的vue应用程序?我有以下设置,但当我运行时,窗口为空 function createWindow() { // Create the browser window. win = new BrowserWindow({ webviewTag: true, width: 1276, height: 800, frame: false, titleBarStyle: 'hiddenInse
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
webviewTag: true,
width: 1276,
height: 800,
frame: false,
titleBarStyle: 'hiddenInset',
center: true,
movable: true,
webPreferences: {
nodeIntegration: true
}
})
}
Then in my component.
Move webviewTag:true,至webPreferencesDevTools中的控制台显示什么?控制台为空,呈现为,但为空框。此浏览器窗口加载的url是哪个?也许index.html?组件包括这个webview标签吗?正在加载app://./index.html 除webview外,它可以加载所有其他组件,webview也是一张空白卡。
<webview id="foo" src="https://www.youtube.com/" style="display:inline-flex; width:640px; height:480px"></webview>