一、将uni-custom-tabbar
复制到components
目录下
目录结构:
components
uni-custom-tabbar
uni-custom-tabbar.vue
二、在pages.json
中添加easycom
"easycom": {
"autoscan": true,
"custom": {
"^uni-(.*)": "@/components/uni-$1/uni-$1.vue"
}
},
"tabbar": {
"custom": true
}
三、在页面中引入
<uni-custom-tabbar :current="0"></uni-custom-tabbar>
参数 | 说明 | type |
---|---|---|
current | tabbar索引 | String |
paddingBottomHeight | 苹果X以上手机底部适配高度 | Number |
- 📧 电子邮件:[email protected]
- 🚩 个人博客:Reselfs'Blog
- 🐧 QQ交流群:240491909