一、安装node.js ,vue -cli
nodejs 去官网下载就行,不要用命令行下载最新版!!
传送门
vue -cli 这个自己找很简单!!
二、搭建electron-vue脚手架
cmd管理者模式进入你要安装的文件夹
输入vue init simulatedgreg/electron-vue my-project
vue init simulatedgreg/electron-vue my-project
? Application Name my-project
? Application Id com.example.yourapp
? Application Version 0.0.1
? Project description 桌面端应用描述信息
? Use Sass / Scss? Yes
? Select which Vue plugins to install axios, vue-electron, vue-router, vuex, vuex-electron
? Use linting with ESLint? No
? Set up unit testing with Karma + Mocha? No
? Set up end-to-end testing with Spectron + Mocha? No
? What build tool would you like to use? builder
? author qiuyukai <1009291692@qq.com>
vue-cli · Generated "my-project".
---
All set. Welcome to your new electron-vue project!
Make sure to check out the documentation for this boilerplate at
https://simulatedgreg.gitbooks.io/electron-vue/content/.
看到这些就说明成功了
下一步就是:只要你是按照我的方法做 这几步是不会出错的,(node必须不是最新版)
$ cd my-project
$ yarn (or `npm install`)
$ yarn run dev (or `npm run dev`)
最后成功,展示一下效果图:
大家关注我!!!!!!