随笔分类 -  electron

electron,electron-vue开发相关的笔记
摘要:"electron-builder" 版本 "electron-builder": "^20.41.0", 解决办法:更新版本,我换这个版本有效 "electron-builder": "21.2.0", 阅读全文
posted @ 2021-09-29 17:27 山村码农 阅读(717) 评论(0) 推荐(0)
摘要:参考这两偏文章 https://blog.csdn.net/u010982507/article/details/101236913 工具安装,这是另一个报错问题了,我个人是通过这个解决的 https://blog.csdn.net/zw521cx/article/details/117368970 阅读全文
posted @ 2021-09-18 16:33 山村码农 阅读(501) 评论(0) 推荐(0)
摘要:用这个库 https://github.com/cristiammercado/node-disk-info // 直接抄的DEMO const nodeDiskInfo = require('./dist/index'); // async way nodeDiskInfo.getDiskInfo 阅读全文
posted @ 2021-07-30 16:23 山村码农 阅读(1216) 评论(0) 推荐(0)
摘要:原文参考: https://blog.csdn.net/sinat_35538827/article/details/99672544 一开始用 uglifyjs-webpack-plugin 是不可以,后面看着文章改为用 terser-webpack-plugin 代替,实现生产去除 consol 阅读全文
posted @ 2020-12-14 12:18 山村码农 阅读(1032) 评论(0) 推荐(0)
摘要:进入指定设备的 shell 重启指定设备的应用 阅读全文
posted @ 2020-04-29 17:22 山村码农 阅读(892) 评论(0) 推荐(0)
摘要:electron-builder打包后,运行的程序左上角图标不显示,桌面和状态栏的显示正常,是什么情况。 原因:在线生成的ico图片问题, 解决办法: https://segmentfault.com/q/1010000019780156 生成ico图片方法: https://jingyan.bai 阅读全文
posted @ 2020-03-16 17:02 山村码农 阅读(3912) 评论(0) 推荐(0)
摘要:原因之一:网络原因,可能被墙了,代理的原因 ![https://segmentfault.com/q/1010000009782296] 阅读全文
posted @ 2020-02-24 11:41 山村码农 阅读(777) 评论(0) 推荐(0)
摘要:如图: 目录找到的原因:electron版本问题,我目前用的是7.1.1版本,就报这个错,降级为6.1.1这个错就没有了 参考:![https://www.jianshu.com/p/15bde714e198] 自动更新,就是点下载完后,没有点确定更新,关闭应用后还是自动更新 更新方式参考:[htt 阅读全文
posted @ 2020-02-20 23:32 山村码农 阅读(18397) 评论(0) 推荐(0)
摘要:原文:https://www.jianshu.com/p/36cc5042ef12 调用 downloadFile(download_url, savaFilePath + , (state, pro, currPro, total) = { if (state == 'data') { // 下载 阅读全文
posted @ 2020-02-11 18:34 山村码农 阅读(4588) 评论(0) 推荐(0)
摘要:参考1:[https://github.com/nodejs/node gyp installation] 参考2:[https://github.com/Microsoft/nodejs guidelines/blob/master/windows environment.md compiling 阅读全文
posted @ 2020-02-10 23:30 山村码农 阅读(3051) 评论(0) 推荐(0)
摘要:原文地址:https://www.jianshu.com/p/61c93bbe6014 最近在项目中,有需求是程序加载本地图片显示,但是在实际开发过程中发现,由于electron窗口的同源策略的问题不允许加载本地文件,后来反复查看API,找到方法禁用窗口同源策略: 使用new BrowserWind 阅读全文
posted @ 2020-02-08 16:52 山村码农 阅读(6444) 评论(0) 推荐(0)
摘要:electron vue加载了地图 openLayer后,打包就包内存溢出 解决办法: 直接在 node 后面写上 max_old_space_size=4096 就好了,我这里设置的内存大小是4G,这个具体的大小可以根据自己的项目情况来设置就好了。然后再重新运行 npm run build 就可以 阅读全文
posted @ 2019-09-06 00:37 山村码农 阅读(51717) 评论(1) 推荐(0)
摘要:electron vue 引入OpenLayer 报错 Unexpected token export 解决办法: 在 .electron vue/webpack.renderer.config.js 添加 ol let whiteListedModules = ['vue','ant design 阅读全文
posted @ 2019-09-05 18:34 山村码农 阅读(1739) 评论(0) 推荐(0)
摘要:来源链接: "https://www.jianshu.com/p/837e6b7d0ce0" 阅读全文
posted @ 2019-08-25 16:07 山村码农 阅读(859) 评论(0) 推荐(0)
摘要:electron vue引入ant desigin vue使用ant自定义指令 v decorator报销 解决办法 在 .electron vue/webpack.renderer.config.js 添加 ant design vue let whiteListedModules = ['vue 阅读全文
posted @ 2019-08-25 14:39 山村码农 阅读(2255) 评论(0) 推荐(0)
摘要:Module parse failed: Export 'instance' is not defined (35:19) 使用npm出现的这错误,用yarn就可以了 这种情况rm node_modules 重新yarn install就可以了 阅读全文
posted @ 2019-08-01 22:59 山村码农 阅读(1059) 评论(0) 推荐(0)
摘要:转 "https://www.cnblogs.com/jiebba/p/9618930.html" 阅读全文
posted @ 2019-08-01 22:15 山村码农 阅读(2023) 评论(0) 推荐(0)
摘要:解决办法: "https://github.com/ant design/ant motion/issues/44" 刚开始可能还没有安装less 和 loader less,node less需要自己安装 有可能是less的问题, "less": "^2.7.3", "less loader": 阅读全文
posted @ 2019-07-31 11:36 山村码农 阅读(3614) 评论(0) 推荐(0)
摘要:electron限制只启动一个应用 阅读全文
posted @ 2019-07-11 11:41 山村码农 阅读(6344) 评论(1) 推荐(1)
摘要:子窗口 2.x modal为true 4.x后 modal要设置为 false 阅读全文
posted @ 2019-07-11 11:19 山村码农 阅读(1930) 评论(0) 推荐(0)