准备工作:需要之前配置好vue-cli脚架构,安装好cordova环境。下面开始对vue.js项目进行打包,打包环境为Android。
可以看下我的github:https://github.com/padipata ,里面有我自己写的vue项目,喜欢的给个关注呗。
1.添加cordova项目
$ cordova create myApp1 org.apache.cordova.myApp myApp2
其中:
- myApp1:cordova目录名
- org.apache.cordova.myApp: 包名
- myApp2: 项目名(在config.xml的
中查看)
2.在vue中添加cordova的配置
myApp1/www/index.html----->vue/index.html
- 将myApp1/www/index.html中所有的拷贝到vue/index.html中
- 将myApp1/www/index.html中


