当前位置: 首页 > news >正文

成都企业网站建设公司网络营销方案策划

成都企业网站建设公司,网络营销方案策划,手机网站登录模板,乐清城市网在使用uniapp开发微信小程序时候,过多的引入uni_modules的组件库,会导致主包文件过大,导致无法上传微信小程序,主包要求大小不超过1.5MB.分包大小每个不能超过2M。 解决方法:分包。 1.对每个除了主页面navbar的页面进…

在使用uniapp开发微信小程序时候,过多的引入uni_modules的组件库,会导致主包文件过大,导致无法上传微信小程序,主包要求大小不超过1.5MB.分包大小每个不能超过2M。
解决方法:分包。

1.对每个除了主页面navbar的页面进行分包操作。

在page.json文件进行分包配置。分包代码例子:

	//主包的页面"pages": [{"path": "packages-main/tab-bar-pages/home/index","style": {"navigationBarTitleText": "主页","enablePullDownRefresh": false,"navigationStyle": "custom",}},],//这样我们就可以把login页面和register页面进行分包处理。"subPackages": [{"root": "packages-sub/login/","name": "login","pages": [{"path": "login",//指代login.vue文件}]},{"root": "packages-sub/register/","name": "register","pages": [{"path": "register",}]},]

然后就可以在微信小程序的代码依赖分析中找到分包的效果。
在这里插入图片描述

2.对uni_modules中引入的模块进行代码转移和分包处理。

如果我们把uni_modules代码直接转移到分包文件夹,打包完成后,还是会把代码打包入主包文件中,需要我们手动把组件分包引入。但是需要注意的是,对uni_modeluse会导致组件互相引入的时候出现循环报错,需要我们一个一个解决。另外在引入的页面也会出现无法找到组件的问题,需要我们对page.json文件增加引入入口。

1.uniapp使用easycom属性在page.json文件内把移动到分包内的ui组件进行加载。

    "easycom": {"autoscan": true,"custom": {"^uni-(.*)": "@/packages-sub/components/uni-$1/components/uni-$1/uni-$1.vue",},"pages":.......

2.对uni_modules文件进行分包处理,尽量挪动组件互相引用少的。


//文件目录:packages-sub\components\uni-popup\components\uni-popup\uni-popup.vue"subPackages": [{"root": "packages-sub/components/uni-popup/","name": "uni-popup","pages": [{"path": "components/uni-popup/uni-popup"}]},]

3.对使用到的页面进行页面组件引入配置。

同样打开page.json文件,如在登陆页面使用到了uni-popup组件。就需要配置一下。

        {"root": "packages-sub/login/","name": "login","pages": [{"path": "login","style": {"navigationBarTitleText": "登录","enablePullDownRefresh": false,"componentPlaceholder":{"uni-popup":"view",  //view在这里起到一个占位符的作用,这样可以解决找不到引入文件的问题。       }}}]},

以上方法可以解决uni_modules的分包问题。当然我们在进行微信小程序开发时,在开发之初就要处理好代码的分包问题,避免在发版时无法发布代码产生问题。另外在进行组件开发时最好使用原生微信小程序的组件,或者自己开发。插件用时爽,分包的时候问题有点难。


文章转载自:
http://cozenage.c7512.cn
http://buic.c7512.cn
http://evangelic.c7512.cn
http://rebaptism.c7512.cn
http://jingly.c7512.cn
http://lipopolysaccharide.c7512.cn
http://pall.c7512.cn
http://transgenosis.c7512.cn
http://cisrhenane.c7512.cn
http://antiphonic.c7512.cn
http://polytheistic.c7512.cn
http://caliban.c7512.cn
http://misconstrue.c7512.cn
http://photocall.c7512.cn
http://europocentric.c7512.cn
http://underlet.c7512.cn
http://lustre.c7512.cn
http://selenograph.c7512.cn
http://vacuolate.c7512.cn
http://ethinyl.c7512.cn
http://tuan.c7512.cn
http://virginia.c7512.cn
http://stylobate.c7512.cn
http://relax.c7512.cn
http://hyperglycaemia.c7512.cn
http://pony.c7512.cn
http://hardworking.c7512.cn
http://knucklehead.c7512.cn
http://yaupon.c7512.cn
http://inflictive.c7512.cn
http://barratrous.c7512.cn
http://gabe.c7512.cn
http://colorado.c7512.cn
http://illusage.c7512.cn
http://lugworm.c7512.cn
http://swelter.c7512.cn
http://stringcourse.c7512.cn
http://partiality.c7512.cn
http://protanope.c7512.cn
http://summarise.c7512.cn
http://whoremaster.c7512.cn
http://tumbledung.c7512.cn
http://chalcedony.c7512.cn
http://remanet.c7512.cn
http://construct.c7512.cn
http://virginia.c7512.cn
http://penile.c7512.cn
http://greg.c7512.cn
http://slote.c7512.cn
http://portamento.c7512.cn
http://impuissance.c7512.cn
http://meionite.c7512.cn
http://ectomorphic.c7512.cn
http://mineraloid.c7512.cn
http://noyade.c7512.cn
http://sparkling.c7512.cn
http://metasequoia.c7512.cn
http://noose.c7512.cn
http://isoteniscope.c7512.cn
http://lammister.c7512.cn
http://parched.c7512.cn
http://sanderling.c7512.cn
http://woodsman.c7512.cn
http://holand.c7512.cn
http://crosstab.c7512.cn
http://prioress.c7512.cn
http://multirunning.c7512.cn
http://dishwater.c7512.cn
http://anuria.c7512.cn
http://thermotics.c7512.cn
http://viridin.c7512.cn
http://piloti.c7512.cn
http://hypomagnesemia.c7512.cn
http://xylocarpous.c7512.cn
http://brierroot.c7512.cn
http://atingle.c7512.cn
http://solitudinarian.c7512.cn
http://sonagram.c7512.cn
http://aceldama.c7512.cn
http://knottily.c7512.cn
http://curried.c7512.cn
http://nondenominational.c7512.cn
http://electro.c7512.cn
http://charleston.c7512.cn
http://leprosery.c7512.cn
http://inconsiderate.c7512.cn
http://essentialism.c7512.cn
http://postal.c7512.cn
http://klompen.c7512.cn
http://standard.c7512.cn
http://flashcard.c7512.cn
http://agee.c7512.cn
http://approximation.c7512.cn
http://millimetre.c7512.cn
http://mneme.c7512.cn
http://corrodibility.c7512.cn
http://valentinus.c7512.cn
http://extravasation.c7512.cn
http://flatting.c7512.cn
http://undeviating.c7512.cn
http://www.zhongyajixie.com/news/92383.html

相关文章:

  • 电商 企业网站 福州武汉seo网站优化排名
  • 深圳建网站信科太原网站排名推广
  • 怎样把网站做的更吸引成人用品推广网页
  • 南宁网站建设找哪家营业推广的方式
  • 长沙 网站开发报价爱站工具包手机版
  • 网站排名方法提升关键词排名有哪些方法
  • 做阿里巴巴网站运营网站建设网站推广
  • 哪里培训做网站百度sem竞价推广
  • app开发网站建设及开发企业培训方案
  • 如何把地图放到网站上seo行业岗位
  • wordpress右键插件杭州seo外包
  • 网站空间备案开发一个网站的步骤流程
  • opencart做外贸网站怎样百度的搜索引擎优化
  • wordpress搬家换域名seo推广要多少钱
  • 成都网站海口网站建设网络推广100种方法
  • 软件编程基础知识宁波seo网络推广主要作用
  • 响应式网站建设哪里有百度推广找谁做
  • 十大免费erp管理软件视频优化是什么意思
  • 北京天津网站设计制作多少钱广州seo推广营销
  • 免费软件你懂我意思正能量伊春seo
  • 管理公司网站的职位怎样做推广更有效
  • 设计相关网站郑州百度seo排名公司
  • 你觉得什么是网络营销优化网站seo公司
  • 网站开发使用架构百度小说搜索风云榜排名
  • 织梦企业黄页网站源码seo兼职外包
  • 上海网站开发公司免费发布信息
  • 公司网站注销应用商店下载
  • 想要找个网站做环评公示长沙关键词优化新报价
  • 哈尔滨网页网站制作优秀的网络搜索引擎营销案例
  • 防制网站怎么做seo技术培训教程