更新记录

1.0.0(2021-04-07) 下载此版本

发布项目


平台兼容性

桌面端跨平台开发框架Electron(v12.0),集成vue(v2.6.11)框架uni-app

Electron: http://www.electronjs.org/

Electron: v12.0

node: v12.21

vue: v2.6.11


1、打开webstorm导入项目,在terminal中运行

    yarn

important:为了避免npm install失败,请使用yarn(不用另外配置镜像,项目中已配置源.yarnrc)

2、安装后,执行命令即可运行:

    "serve:uni": "npm run dev:h5",
    "electron:build-mac": "vue-cli-service electron:build -p never -m",
    "electron:build-win": "vue-cli-service electron:build -p never -w",
    "electron:build-linux": "vue-cli-service electron:build -p never -l",
    "electron:serve": "vue-cli-service electron:serve",

3、在src目录写你的代码、或直接将现有项目文件复制、覆盖

需保留/src/background.js、src/electron


本人使用webstorm,hbuilderx请自行测试

Image text

Image text

项目目录

Image text

打包输出目录

Image text

配置文件中的一些变量名看明白了再改,不然可能运行不起来

package.json中的dependencies去除了小程序兼容的包,有需要的请自行添加:

  "dependencies": {
    "@dcloudio/uni-app-plus": "^2.0.0-31420210305001",
    "@dcloudio/uni-h5": "^2.0.0-31420210305001",
    "@dcloudio/uni-helper-json": "*",
    "@dcloudio/uni-mp-alipay": "^2.0.0-31420210305001",
    "@dcloudio/uni-mp-baidu": "^2.0.0-31420210305001",
    "@dcloudio/uni-mp-qq": "^2.0.0-31420210305001",
    "@dcloudio/uni-mp-toutiao": "^2.0.0-31420210305001",
    "@dcloudio/uni-mp-weixin": "^2.0.0-31420210305001",
    "@dcloudio/uni-stat": "^2.0.0-31420210305001",
        ... 略
    }

"devDependencies": {
    "@dcloudio/uni-cli-shared": "^2.0.0-31420210305001",
    "@dcloudio/uni-migration": "^2.0.0-31420210305001",
    "@dcloudio/uni-template-compiler": "^2.0.0-31420210305001",
    "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-31420210305001",
    "@dcloudio/vue-cli-plugin-uni": "^2.0.0-31420210305001",
    "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-31420210305001",
    "@dcloudio/webpack-uni-mp-loader": "^2.0.0-31420210305001",
    "@dcloudio/webpack-uni-pages-loader": "^2.0.0-31420210305001",
    "@types/html5plus": "^1.0.1",
    "@types/uni-app": "^1.4.3",
    ... 略
    }

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问