2021年6月20日
摘要: 1. BrowserWindow.addDevToolsExtension(path) 在 Electron 13 版本已移除,采用 session.defaultSession.loadExtension(path) 方式加载 2. 配置 import { session } from 'elec 阅读全文
posted @ 2021-06-20 13:25 W1N9s 阅读(2197) 评论(0) 推荐(0) 编辑
  2021年6月14日
摘要: 1. 方式一:在路由里配置 - router.js module.exports = (app) => { const { router, controller, io } = app; const userAuth = app.middleware.userauth(app); router.ge 阅读全文
posted @ 2021-06-14 16:57 W1N9s 阅读(344) 评论(0) 推荐(0) 编辑
  2021年6月5日
摘要: 1. win+r 输入 cmd,回车 2. 输入:for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P 回车 3. C:\Win 阅读全文
posted @ 2021-06-05 12:19 W1N9s 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 1. 创建 function // 刷新页面时恢复 vuex state 数据 export function recoverStoreState(store) { // 刷新页面时存储 state window.addEventListener('beforeunload', () => { lo 阅读全文
posted @ 2021-06-05 11:52 W1N9s 阅读(239) 评论(0) 推荐(0) 编辑
  2021年6月3日
摘要: 1. chrome 打开 chrome://flags/ 2. 在搜索框输入 Reading List,回车 3. 在 Reading List 的下拉选择中选择 Disabled 4. 重启浏览器 Relaunch 阅读全文
posted @ 2021-06-03 11:54 W1N9s 阅读(98) 评论(0) 推荐(0) 编辑
  2021年5月6日
摘要: 检查是否移除了所有监听,比如: ipcRenderer.removeAllListeners(); 会造成 click 事件失效。 相关链接: 1. https://github.com/electron/remote 阅读全文
posted @ 2021-05-06 21:31 W1N9s 阅读(353) 评论(0) 推荐(0) 编辑
  2021年5月5日
摘要: 看源码 在 vue.config.js 里增加配置 module.exports = { pluginOptions: { electronBuilder: { mainProcessFile: 'src/mainProcess/entry.js', } } }; 重启应用。 注意: 1. pack 阅读全文
posted @ 2021-05-05 13:05 W1N9s 阅读(786) 评论(0) 推荐(1) 编辑
  2021年5月4日
摘要: 在 vue.config.js 里增加配置: module.exports = { pluginOptions: { electronBuilder: { nodeIntegration: true } } } 参考链接: https://nklayman.github.io/vue-cli-plu 阅读全文
posted @ 2021-05-04 15:20 W1N9s 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 报错步骤:Making for target: squirrel - On platform: win32 - For arch: x64 解决方法:填写 package.json 里的 description 和 author Authors is required.Description is 阅读全文
posted @ 2021-05-04 12:13 W1N9s 阅读(1904) 评论(0) 推荐(1) 编辑
  2021年4月20日
摘要: 操作系统:Ubuntu 20.04 64位 1. 在云服务器管理控制台 → 实例 → 重置实例密码 2. 用 Xshell 连接服务器 3. 安装 nodejs:apt install nodejs 报错:unable to locate package nodejs 解决:sudo apt-get 阅读全文
posted @ 2021-04-20 14:11 W1N9s 阅读(92) 评论(0) 推荐(0) 编辑