创建一个与 /pages 的同级目录,命名为 /custom-tab-bar,注意目录层级与目录命名问题,不可用其他名称命名
![](https://img-blog.csdnimg.cn/img_convert/9a28ea34c5f8333f051e27f008c34d20.png)
再创建Index.vue文件,配置自定义tabBar
![](https://img-blog.csdnimg.cn/img_convert/2b943949cf81d4a483649144d356b77a.png)
在page.json中配置自定义tabBar
![](https://img-blog.csdnimg.cn/img_convert/efb0a85fdc226295c4f437599cf27452.png)
再在main.js中配置全局注册,可直接使用
![](https://img-blog.csdnimg.cn/img_convert/0476bf45ccf8a0261b53840d2d9f84cb.png)
使用:
![](https://img-blog.csdnimg.cn/img_convert/f5b84a549d76b37ffe27b4cdff033b54.png)
这样就可以使用了,在需要的页面直接引用就好了~
创建一个与 /pages 的同级目录,命名为 /custom-tab-bar,注意目录层级与目录命名问题,不可用其他名称命名
再创建Index.vue文件,配置自定义tabBar
在page.json中配置自定义tabBar
再在main.js中配置全局注册,可直接使用
使用:
这样就可以使用了,在需要的页面直接引用就好了~