1***@qq.com
1***@qq.com
  • 发布:2023-12-12 16:56
  • 更新:2024-09-23 11:50
  • 阅读:198

uView自定义tabbar在支付宝小程序上错位,以前没错位的项目现在也开始错位了,如何解决?

分类:uni-app

自定义tabbar以组件形式引入页面,自定义tabbar组件:

<template>  
    <view>  
        <u-tabbar v-model="current" :list="tabarList" :mid-button="false" active-color="#0081ff" inactive-color="#606266"></u-tabbar>  
    </view>  
</template>  

<script>  
    export default {  
        name:"bottomBar",  
        data() {  
            return {  
                tabarList: [{  
                        iconPath: "home",  
                        selectedIconPath: "home-fill",  
                        text: '首页',  
                        customIcon: false,  
                        pagePath: '/pages/index/index',  
                    },  
                    {  
                        iconPath: "account",  
                        selectedIconPath: "account-fill",  
                        text: '我的',  
                        customIcon: false,  
                        pagePath: '/pages/userInfo/index',  
                    },  
                ],  
                current: 0,  
            };  
        }  
    }  
</script>  

<style>  

</style>

首页引入后发生错位,仅首页发生错位,其他页面正常,删除pages.json的tabbar配置项正常显示,配置tabbar项首页自定义tabbar会被顶起,且pages.json中tabbar设置文字会被显示出来。

2023-12-12 16:56 负责人:无 分享
已邀请:
小小菜76055421

小小菜76055421

博主最后怎么解决的

5***@qq.com

5***@qq.com

怎么解决呢

要回复问题请先登录注册