customTabBar:小程序自定义切换无闪烁的tabbar

上传者: 42110362 | 上传时间: 2021-06-09 13:50:58 | 文件大小: 20KB | 文件类型: ZIP
1、前言 很多时候,小程序自带的tabBar不能够满足项目需求,这个时候就需要我们自定义tabBar了。但是在网上找了很久,基本都是存在切换时闪烁的问题。幸运的是从基础库2.5.0开始,可以官方使用自定义tabBar了。 2、自定义tabBar样式 如下图所示,我们需要一个展示“首页”、“我的”,和一个可以点击跳转到发布的tabBar。这种样式,原生的就无法满足需求了,只能自定义tabBar了。 3、引入custom-tab-bar及相关配置 3.1、如下图所示,将custom-tab-bar导入项目根目录 3.2、在app.json中配置好切换的tabbar,并设置"custom": true,然后将基础库设置成2.5.0 3.3、使用自定义TabBar,在切换的TabBar界面的onShow中添加如下代码。如首页中设置 selected: 0,我的中设置 selected: 2。因为

文件下载

资源详情

[{"title":"( 28 个子文件 20KB ) customTabBar:小程序自定义切换无闪烁的tabbar","children":[{"title":"customTabBar-master","children":[{"title":"image","children":[{"title":"icon_component_HL.png <span style='color:#111;'> 688B </span>","children":null,"spread":false},{"title":"icon_release.png <span style='color:#111;'> 5.46KB </span>","children":null,"spread":false},{"title":"icon_API.png <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"icon_component.png <span style='color:#111;'> 653B </span>","children":null,"spread":false},{"title":"icon_API_HL.png <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":true},{"title":"custom-tab-bar","children":[{"title":"index.js <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"index.json <span style='color:#111;'> 23B </span>","children":null,"spread":false},{"title":"index.wxss <span style='color:#111;'> 720B </span>","children":null,"spread":false},{"title":"index.wxml <span style='color:#111;'> 708B </span>","children":null,"spread":false}],"spread":true},{"title":"app.json <span style='color:#111;'> 853B </span>","children":null,"spread":false},{"title":"pages","children":[{"title":"add","children":[{"title":"add.wxss <span style='color:#111;'> 24B </span>","children":null,"spread":false},{"title":"add.json <span style='color:#111;'> 27B </span>","children":null,"spread":false},{"title":"add.js <span style='color:#111;'> 830B </span>","children":null,"spread":false},{"title":"add.wxml <span style='color:#111;'> 58B </span>","children":null,"spread":false}],"spread":true},{"title":"index","children":[{"title":"index.js <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"index.json <span style='color:#111;'> 27B </span>","children":null,"spread":false},{"title":"index.wxss <span style='color:#111;'> 17B </span>","children":null,"spread":false},{"title":"index.wxml <span style='color:#111;'> 37B </span>","children":null,"spread":false}],"spread":true},{"title":"logs","children":[{"title":"logs.js <span style='color:#111;'> 448B </span>","children":null,"spread":false},{"title":"logs.json <span style='color:#111;'> 27B </span>","children":null,"spread":false},{"title":"logs.wxml <span style='color:#111;'> 37B </span>","children":null,"spread":false},{"title":"logs.wxss <span style='color:#111;'> 1B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"sitemap.json <span style='color:#111;'> 191B </span>","children":null,"spread":false},{"title":"app.wxss <span style='color:#111;'> 51B </span>","children":null,"spread":false},{"title":"app.js <span style='color:#111;'> 407B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"project.config.json <span style='color:#111;'> 720B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"util.js <span style='color:#111;'> 472B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明