text: (window.webpackJsonp=window.webpackJsonp||[]).push([[74],{560:function(s,t,a){"use strict";a.r(t);var r=a(2),n=Object(r.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// cli和HXB创建项目的区别")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" cli创建的项目"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("编译器安装在项目下"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("并且不会跟随"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("升级"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如需升级编译器要执行npm update\n   "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("可视化界面创建的项目"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("编译器在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("的安装目录下的plugin的目录"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("随着"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("的升级会自动升级编译器\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 用cli创建的项目可以拖到"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("运行"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("全部目录拖进去"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("编译时走的是项目下的编译器"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如果只拖src目录\n   走得是"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("安装目录下plugin目录下的编译器\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" cli版本如果要安装less、scss、ts等编译器"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("需要手动npm安装"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("插件中安装无效"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("那只作用于用"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("创建的项目\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" 发布App时需要使用"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("中的路径"),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@'")]),s._v("表示根路径"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在cli中表示src目录\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("6.")]),s._v(" 使用"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("创建的项目没有"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("package")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("json文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("需要在npm时执行npm init"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("建议先从插件市场获取"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("npm下载库很容易只支持"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("中的目录相当于是用vuecli创建的目录的src"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("用vuecli创建的项目会多出node_modules和其他脚手架自带的文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("而用"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("则没有\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("8.")]),s._v(" 使用vuecli命令创建"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'vue create -p dcloudio/uni-preset-vue 项目名称'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("9.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX")]),s._v("运行的代码是开发环境"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("发行是生产环境"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在cli中用process"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("env"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("NODE_ENV")]),s._v("判断\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 静态资源的引入")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("static")]),s._v("目录下的js不会编译"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如果有es6代码"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("不经过转换直接运行"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在手机设备上会报错"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("css、less、scss等资源\n   同样不要放在"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("static")]),s._v("目录下"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("建议这些公用资源放在common目录下"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HBX1")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v(".9")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v(".0")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v("支持在根目录创建ext"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("json、sitemap"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("json文件\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 引入的静态资源在非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("均不转为base64"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台小于"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4")]),s._v("kb的资源会被转为base64"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其余不转\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" 微信、"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("QQ")]),s._v("、头条、appv2端css、图片等文件不允许引用本地文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("这些资源小于"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("40")]),s._v("kb"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("一定会转base64\n   "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台小于"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4")]),s._v("kb会转base64"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("超出"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4")]),s._v("kb不转"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其他平台不转\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" 小程序不支持本地文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("包括背景图片和字体文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("需要用base64方式或使用网络地址\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" 在使用本地路径的背景图片或字体文件时"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在大小小于"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("40")]),s._v("kb时"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app在不支持本地路径的平台会自动转成base64\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("6.")]),s._v(" 在图片或字体文件大于"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("40")]),s._v("kb时"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("会有性能问题"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如开发者需要使用要自己转成base64或使用网络地址\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7.")]),s._v(" 字体图标引入支持使用base64和网络地址"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("网络地址必须加https\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("8.")]),s._v(" 微信小程序不支持相对路径引入背景图片 "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 真机不支持,开发工具支持")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("9.")]),s._v(" 在模板内引入静态资源时可以使用绝对和相对路径"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("支付宝小程序组件的image不能用相对路径\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("10.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@'")]),s._v("开头的绝对路径以及相对路径会经过base64转换规则校验\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("11.")]),s._v(" 本地背景图片或字体文件引用路径推荐使用以"),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'~@'")]),s._v("开头的绝对路径\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("12.")]),s._v(" js文件引入不能使用"),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/'")]),s._v("开头的方式引入"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("只能用"),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@'")]),s._v("或相对路径\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("13.")]),s._v(" 样式导入 @"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'相对路径'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 跨平台注意事项")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" 在非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台上的"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("class")]),s._v("和style动态绑定不支持直接绑定一个对象名 "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 可以绑定{ flg: true }")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"(item, index) in 10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("item从"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v("开始"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其他平台从"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v("开始\n    在非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台循环对象不支持第三个参数 "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v('// v-for="(value, key, index) in obj", index不支持')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" 事件修饰符除了"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("stop各平台都支持"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其他只有"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("才支持\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" 只有App和"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("支持v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("html\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app只支持vue单文件组件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其他动态组件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("自定义render和字符串模板在非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台都不支持\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("6.")]),s._v(" 非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台不支持的列表"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n      slot "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// scoped")]),s._v("\n      动态组件\n      异步组件\n      inline"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("template\n      x"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("Templates\n      keep"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("alive\n      tarnsition\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台默认启用了scoped"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其他没有\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("8.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台联网可以使用localhot或"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("127.0")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v(".0")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v(".1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在手机App则无法访问"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("要使用手机可访问的"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("IP")]),s._v("进行联网\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("9.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("中刷新了页面会导致回不去上一级页面"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("页面丢失情况\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("10.")]),s._v(" 小程序要求连接的网址都要配置白名单\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("11.")]),s._v(" 支付宝和百度小程序开发有其他问题"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("具体看uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app跨端开发注意事项下的小程序开发注意\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 右上角胶囊和固定值")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" 在使用自定义导航栏时"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("和小程序有一个状态栏的区别"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("可使用uni"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("getSystemInfoSync")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("方法获取状态栏的高度\n   因为设备不同高度也不同"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("从而设置的自定义状态栏的高度\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 微信、"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("QQ")]),s._v("、百度小程序导航栏有胶囊"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("使用uni"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("getMenuButtonBoundingClientRect")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("方法获得胶囊位置信息"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("需要条件编译\n   导航栏内容高度 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("胶囊底部高度 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v(" 状态栏的高度"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("胶囊顶部高度 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v(" 状态栏的高度"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n   需要动态的改变导航栏内容的高度和宽度来显示胶囊\n   导航栏内容的宽度 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" 胶囊位置的left值\n   一般状态栏为"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("20")]),s._v("px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("导航栏为"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("45")]),s._v("px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("有差异"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("所以要动态的改变\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app内置的css变量"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n   "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("status"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("bar"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("height "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 系统状态栏高度")]),s._v("\n   "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("window"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("top "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 内容区域距离顶部的距离,只有H5有NavigationBar的高度,其他都是0")]),s._v("\n   "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("window"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("bottom "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 内容区域距离底部的距离,只有H5有Tabbar的高度,其他都是0")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" 固定值"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n   "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("NavigationBar "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("导航栏在App中是"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("44")]),s._v("px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("中是"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("44")]),s._v("px\n   "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("TabBar "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("底部选项卡在App中是"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("50")]),s._v("px且可以改"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("中是"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("50")]),s._v("px\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// css注意事项")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" after和before伪类选择器仅微信小程序和App生效\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 在uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app中非"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("平台不能用"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("选择器"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("page相当于body节点\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" 在App"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue引入的样式作用于全局\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" 在不修改公用样式库时可以不加scope\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 开发必备")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" 在uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app中支持easycom组件模式"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("即在components目录下"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("并符合components"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("组件名称"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("组件名称"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue的目录结构\n   就可以不用引用注册"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("直接在页面使用实现的是局部引入"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("优先级低于手动引入"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("打包后自动剔除没有使用的组件\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" 使用字体图标可以使用iconfot或在插件市场下载icons图标使用\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" 支持使用小程序组件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("但是要放在指定文件夹内 "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// wxcomponents、mycomponents、swancomponents")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" uni"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("scss是一个特殊的文件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在代码中无需"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v("即可在scss代码中使用"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如果要用less、stylus要在vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("config"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("js中配置webpack策略\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" 在uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app中通过uni"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("$emit")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'change'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("方法去触发一个全局的事件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("通过uni"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("$on")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'change'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("方法监听"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在回调中拿到传递的参数 "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 在任何页面都可以")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("6.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("获取上个页面传递的数据在页面的生命周期函数onLoad")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("e"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("中获取\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7.")]),s._v(" 可以在App"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("vue上使用onError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("err"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("来捕获app的error\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("8.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("template "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("和"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("block "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("用于列表渲染和条件渲染"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("这两个不是组件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("只是一个包装元素"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("不会在页面中进行渲染"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("只接受控制属性\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("9.")]),s._v(" 全局组件需要在main"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("js里使用vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("components进行全局注册\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("10.")]),s._v(" 在main"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("js中使用vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("use引用插件"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("prototype添加全局变量"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("使用vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("component注册全局组件\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("11.")]),s._v(" 全局变量在App"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue中的globalData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("在其他页面可以通过getApp")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("globalData获取引用"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("也可赋值\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("12.")]),s._v(" ref只能绑定在自定义组件上"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("原生组件绑定不了\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("13.")]),s._v(" 不要在引入的组件上使用style属性修改样式"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("要在组件内部写样式\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("14.")]),s._v(" 富文本解析组件可使用官方提供的rich"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("text或在插件市场中找u"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("parse\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("15.")]),s._v(" popup弹出层中嵌套"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("textarea"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("组件需要给组件加上fixed"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("因为"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("textarea"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("在position"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" fixed的区域中"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("需要指定属性fixed为"),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("true")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("16.")]),s._v(" 全局变量的几种方式"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n      公用模块"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("哪个页面要使用都要引入\n      挂载 vue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("prototype\n      globalDate\n      vuex\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("17.")]),s._v(" 在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("中刷新页面会丢失调用页面栈\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 名词解释")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" App端的nvue可以使用weex的组件和"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("也可以使用uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app的组件"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" nvue后缀的文件内置了weex渲染引擎"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("weex为App提供了原生的渲染能力\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HTML5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v("提供了原生App的插件、方法等\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" weex"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("nvue使用html做App"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("HTML5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v("引擎让js可以调用丰富的原生App能力"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("小程序和"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("没有这个扩展\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" HTML5Plus "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("===")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("===")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v("App "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("===")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("SDK")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("===")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("+")]),s._v("Runtime\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("--")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 补充知识")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1.")]),s._v(" jscore是一个标准js引擎"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("标准js是可以正常运行的"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("比如"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("if")]),s._v("、"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v("、各种字符串、日期处理等\n    所谓浏览器的js引擎"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("就是在jscore或v8的基础上新增了一批浏览器专用的"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("比如"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("DOM")]),s._v("\n    nodejs引擎则是在v8基础上补充了一些电脑专用的"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("如本地"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("IP")]),s._v("\n    uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app的App端和小程序端的js引擎"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("其实是在jscore的基础上补充了一批手机端常用的"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("比如扫码\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("2.")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("SDK")]),s._v("相当于开发集成工具环境"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),s._v("就是数据接口"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("SDK")]),s._v("的环境下调用"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),s._v("数据\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3.")]),s._v(" uni小程序"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("SDK")]),s._v("是一个用于原生App中集成的"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("SDK")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("它可以帮助原生App快速实现小程序的能力\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.")]),s._v(" uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app有uniPush同一推送服务"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("内建了苹果、华为、小米、oppo、魅族等手机厂商的系统级推送、第三方推送和个推等\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5.")]),s._v(" uni统计是自带免费的统计平台"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("可以在一张报表里看到所有端")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("IOS")]),s._v("、Android、"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("H5")]),s._v("及各家小程序"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("的运营数据\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("6.")]),s._v(" uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("app支持接入uni"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("AD")]),s._v("广告联盟"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("可以实现一次开发"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("多端变现\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7.")]),s._v(" vue页面在App端渲染引擎是系统webview不是手机自带的浏览器"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("是rom的webview"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("在较老的手机上\n    如安卓"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("4.4")]),s._v("、"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("IOS8")]),s._v("不支持一些新出的css"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("小程序不存在浏览器兼容问题"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("它内置了自己定制的webview\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("8.")]),s._v(" 使用罗盘、地理位置、加速计等相关接口需要使用https协议"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("本地预览可以使用http\n"),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("9.")]),s._v(" pc端chrome浏览器模拟器设备测试时"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("获取位置"),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("API")]),s._v("需要连接谷歌服务器\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br"),a("span",{staticClass:"line-number"},[s._v("22")]),a("br"),a("span",{staticClass:"line-number"},[s._v("23")]),a("br"),a("span",{staticClass:"line-number"},[s._v("24")]),a("br"),a("span",{staticClass:"line-number"},[s._v("25")]),a("br"),a("span",{staticClass:"line-number"},[s._v("26")]),a("br"),a("span",{staticClass:"line-number"},[s._v("27")]),a("br"),a("span",{staticClass:"line-number"},[s._v("28")]),a("br"),a("span",{staticClass:"line-number"},[s._v("29")]),a("br"),a("span",{staticClass:"line-number"},[s._v("30")]),a("br"),a("span",{staticClass:"line-number"},[s._v("31")]),a("br"),a("span",{staticClass:"line-number"},[s._v("32")]),a("br"),a("span",{staticClass:"line-number"},[s._v("33")]),a("br"),a("span",{staticClass:"line-number"},[s._v("34")]),a("br"),a("span",{staticClass:"line-number"},[s._v("35")]),a("br"),a("span",{staticClass:"line-number"},[s._v("36")]),a("br"),a("span",{staticClass:"line-number"},[s._v("37")]),a("br"),a("span",{staticClass:"line-number"},[s._v("38")]),a("br"),a("span",{staticClass:"line-number"},[s._v("39")]),a("br"),a("span",{staticClass:"line-number"},[s._v("40")]),a("br"),a("span",{staticClass:"line-number"},[s._v("41")]),a("br"),a("span",{staticClass:"line-number"},[s._v("42")]),a("br"),a("span",{staticClass:"line-number"},[s._v("43")]),a("br"),a("span",{staticClass:"line-number"},[s._v("44")]),a("br"),a("span",{staticClass:"line-number"},[s._v("45")]),a("br"),a("span",{staticClass:"line-number"},[s._v("46")]),a("br"),a("span",{staticClass:"line-number"},[s._v("47")]),a("br"),a("span",{staticClass:"line-number"},[s._v("48")]),a("br"),a("span",{staticClass:"line-number"},[s._v("49")]),a("br"),a("span",{staticClass:"line-number"},[s._v("50")]),a("br"),a("span",{staticClass:"line-number"},[s._v("51")]),a("br"),a("span",{staticClass:"line-number"},[s._v("52")]),a("br"),a("span",{staticClass:"line-number"},[s._v("53")]),a("br"),a("span",{staticClass:"line-number"},[s._v("54")]),a("br"),a("span",{staticClass:"line-number"},[s._v("55")]),a("br"),a("span",{staticClass:"line-number"},[s._v("56")]),a("br"),a("span",{staticClass:"line-number"},[s._v("57")]),a("br"),a("span",{staticClass:"line-number"},[s._v("58")]),a("br"),a("span",{staticClass:"line-number"},[s._v("59")]),a("br"),a("span",{staticClass:"line-number"},[s._v("60")]),a("br"),a("span",{staticClass:"line-number"},[s._v("61")]),a("br"),a("span",{staticClass:"line-number"},[s._v("62")]),a("br"),a("span",{staticClass:"line-number"},[s._v("63")]),a("br"),a("span",{staticClass:"line-number"},[s._v("64")]),a("br"),a("span",{staticClass:"line-number"},[s._v("65")]),a("br"),a("span",{staticClass:"line-number"},[s._v("66")]),a("br"),a("span",{staticClass:"line-number"},[s._v("67")]),a("br"),a("span",{staticClass:"line-number"},[s._v("68")]),a("br"),a("span",{staticClass:"line-number"},[s._v("69")]),a("br"),a("span",{staticClass:"line-number"},[s._v("70")]),a("br"),a("span",{staticClass:"line-number"},[s._v("71")]),a("br"),a("span",{staticClass:"line-number"},[s._v("72")]),a("br"),a("span",{staticClass:"line-number"},[s._v("73")]),a("br"),a("span",{staticClass:"line-number"},[s._v("74")]),a("br"),a("span",{staticClass:"line-number"},[s._v("75")]),a("br"),a("span",{staticClass:"line-number"},[s._v("76")]),a("br"),a("span",{staticClass:"line-number"},[s._v("77")]),a("br"),a("span",{staticClass:"line-number"},[s._v("78")]),a("br"),a("span",{staticClass:"line-number"},[s._v("79")]),a("br"),a("span",{staticClass:"line-number"},[s._v("80")]),a("br"),a("span",{staticClass:"line-number"},[s._v("81")]),a("br"),a("span",{staticClass:"line-number"},[s._v("82")]),a("br"),a("span",{staticClass:"line-number"},[s._v("83")]),a("br"),a("span",{staticClass:"line-number"},[s._v("84")]),a("br"),a("span",{staticClass:"line-number"},[s._v("85")]),a("br"),a("span",{staticClass:"line-number"},[s._v("86")]),a("br"),a("span",{staticClass:"line-number"},[s._v("87")]),a("br"),a("span",{staticClass:"line-number"},[s._v("88")]),a("br"),a("span",{staticClass:"line-number"},[s._v("89")]),a("br"),a("span",{staticClass:"line-number"},[s._v("90")]),a("br"),a("span",{staticClass:"line-number"},[s._v("91")]),a("br"),a("span",{staticClass:"line-number"},[s._v("92")]),a("br"),a("span",{staticClass:"line-number"},[s._v("93")]),a("br"),a("span",{staticClass:"line-number"},[s._v("94")]),a("br"),a("span",{staticClass:"line-number"},[s._v("95")]),a("br"),a("span",{staticClass:"line-number"},[s._v("96")]),a("br"),a("span",{staticClass:"line-number"},[s._v("97")]),a("br"),a("span",{staticClass:"line-number"},[s._v("98")]),a("br"),a("span",{staticClass:"line-number"},[s._v("99")]),a("br"),a("span",{staticClass:"line-number"},[s._v("100")]),a("br"),a("span",{staticClass:"line-number"},[s._v("101")]),a("br"),a("span",{staticClass:"line-number"},[s._v("102")]),a("br"),a("span",{staticClass:"line-number"},[s._v("103")]),a("br"),a("span",{staticClass:"line-number"},[s._v("104")]),a("br"),a("span",{staticClass:"line-number"},[s._v("105")]),a("br"),a("span",{staticClass:"line-number"},[s._v("106")]),a("br"),a("span",{staticClass:"line-number"},[s._v("107")]),a("br"),a("span",{staticClass:"line-number"},[s._v("108")]),a("br"),a("span",{staticClass:"line-number"},[s._v("109")]),a("br"),a("span",{staticClass:"line-number"},[s._v("110")]),a("br"),a("span",{staticClass:"line-number"},[s._v("111")]),a("br"),a("span",{staticClass:"line-number"},[s._v("112")]),a("br"),a("span",{staticClass:"line-number"},[s._v("113")]),a("br"),a("span",{staticClass:"line-number"},[s._v("114")]),a("br"),a("span",{staticClass:"line-number"},[s._v("115")]),a("br"),a("span",{staticClass:"line-number"},[s._v("116")]),a("br"),a("span",{staticClass:"line-number"},[s._v("117")]),a("br"),a("span",{staticClass:"line-number"},[s._v("118")]),a("br")])])])}),[],!1,null,null,null);t.default=n.exports}}]);