美文网首页H5教程集合Electron
electron-vue———在Electron 中使用Vue

electron-vue———在Electron 中使用Vue

作者: 余生社会 | 来源:发表于2018-08-15 21:09 被阅读0次

在Electron 中使用Vue Devtools
·首先在Chrome中安装Vue Devtools;
·在Chrome中打开扩展程序,并且开启开发者模式,这样就可以获取扩展程序的ID,记住这个ID
·在Electron应用中添加如下代码:
if (process.env.NODE_ENV !== 'development') {
global.__static = require('path').join(__dirname, '/static').replace(/\/g, '\\')
BrowserWindow.addDevToolsExtension("/Users/zhang/Library/Application Support/Google/Chrome/Default/Extensions/上边的ID");
}
重点是BrowserWindow这一句,这样就在Electron 中添加了Vue Devtools 就能愉快的开发了

相关文章

网友评论

    本文标题:electron-vue———在Electron 中使用Vue

    本文链接:https://www.haomeiwen.com/subject/mvlgbftx.html