美文网首页
在electron中使用vue-devtools

在electron中使用vue-devtools

作者: stevenjobs | 来源:发表于2017-12-21 21:06 被阅读37次

在electron中使用开发者扩展,官方文档已经有了详细说明。如果觉得步骤繁琐,可以使用工具electron-devtools-installer

方法很简单,以vue-devtools为例:

1、声明

const { default: installExtension, VUEJS_DEVTOOLS } = require('electron-devtools-installer');

2、安装

// 在ready事件发出之后调用
installExtension(VUEJS_DEVTOOLS )
    .then((name) => console.log(`Added Extension:  ${name}`))
    .catch((err) => console.log('An error occurred: ', err));

相关文章

网友评论

      本文标题:在electron中使用vue-devtools

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