Electron Vue前端開發準備

2021-10-19 13:55:08 字數 1048 閱讀 6676

1、安裝node.js

2、安裝yarn:

npm install -g yarn
3、配置yarn使用**映象:

yarn config set registry
4、安裝vue cli:

yarn global add @vue/cli
1、建立vue專案:

vue create [專案名]
2、新增electron-builder:

vue add electron-builder
3、去掉載入vue.js開發工具

載入過程很慢,一般不會成功(牆的原因)。開啟background.js,把以下**注釋:

if (isdevelopment && !process.env.is_test)  catch (e) 

}

4、加入主程序的除錯**

新增.vscode資料夾,然後加入tasks.json和launch.json兩個檔案。

tasks.json:

,

"isbackground": true,

"args": ["electron:serve","--debug"],

"problemmatcher":,

"background": }}

]}

launch.json:

/node_modules/.bin/electron",

"windows": /node_modules/.bin/electron.cmd"

},"args": [

"--remote-debugging-port=9223",

"./dist_electron"

],"outfiles": [

"$/dist_electron/**/*.js"]}

]}

Electron vue客戶端開發總結

最近做了electron vue相關的客戶端開發 做出了如下總結 利用new browserwindow 方法建立視窗物件 能滿足開發專案的視窗屬性有 win new browserwindow 如果想把客戶端視窗頂部選單去掉 在webpreferences同級節點加上 frame false,去除...

初嚐electron vue專案搭建

以前只見過,但是一直沒時間來玩玩,最近公司有需求重構某個應用做桌面程式,便開始了探索之路 文件 我的環境 node 14.7 yarn 1.22.4 windows10專業版 安裝 vue cli 和 腳手架樣板 npm install g vue cli vue init simulatedgre...

electron vue專案打包踩坑記錄

配置 build nsis publish files dist electron dmg mac win linux 一 路徑中有中文 建議不要用中文 1 設定映象 在build裡面加下面一段 一般情況下解決這些問題的思路就是,缺什麼拿什麼?三 node sass問題 四 static 下資源無法...