5***@qq.com
5***@qq.com
  • 发布:2020-03-28 13:49
  • 更新:2020-06-12 14:25
  • 阅读:4072

使用官方提供的midButton属性在tabbar上放置中间凸起的图片,在微信小程序无效,在app上正常

分类:uni-app

下图第一张图是app,第二张图是微信小程序。难不成使用官方提供的属性,无法在微信小程序上实现中间凸起的效果吗?

"tabBar": {  
		"color": "#7a7e83",  
		"selectedColor": "#FF3e32",  
		"backgroundColor": "#ffffff",  
		"borderStyle": "black",  
		"midButton": {  
			"width":"64px",  
			"height":"66px",  
			"iconWidth":"45.5px",  
			"iconPath": "static/images/tabbar_vip.png"  
		},  
		"list": [{  
				"pagePath": "pages/tabbar/home",  
				"text": "首页",  
				"iconPath": "static/images/home_unselect.png",  
				"selectedIconPath": "static/images/home_select.png"  
			},  
			{  
				"pagePath": "pages/tabbar/activity",  
				"text": "活动",  
				"iconPath": "static/images/activity_unselect.png",  
				"selectedIconPath": "static/images/activity_select.png"  
			},  
			// #ifndef APP-PLUS    
			{  
				"pagePath": "pages/tabbar/vip",  
				"text": "vip",  
				"iconPath": "static/images/tabbar_vip.png",  
				"selectedIconPath": "static/images/tabbar_vip.png"  
			},  
			 // #endif    
			{  
				"pagePath": "pages/tabbar/find",  
				"text": "发现",  
				"iconPath": "static/images/find_unselect.png",  
				"selectedIconPath": "static/images/find_select.png"  
			},  
			{  
				"pagePath": "pages/tabbar/my",  
				"text": "我的",  
				"iconPath": "static/images/my_unselect.png",  
				"selectedIconPath": "static/images/my_select.png"  
			}  
		]  
	},
2020-03-28 13:49 负责人:无 分享
已邀请:
hhyang

hhyang - 如有问题,请添加QQ1606726660 备注付费咨询

人家文档上不是说了 仅app支持

  • 5***@qq.com (作者)

    那微信小程序上没法实现凸起的效果了吗


    2020-03-31 11:47

  • 996上班族

    回复 5***@qq.com: 合格的程序员,第一步要会看文档


    2020-06-12 14:23

5***@qq.com

5***@qq.com (作者)

没有人回复吗? midButton是不是在微信小程序上没有效果?

  • 就是玩

    是的,只能在app上用


    2022-08-02 14:00

996上班族

996上班族 - 996上班族

这里加个 ifdef app的判断吧,小程序写这类按钮应该问题不大的,往上放控件就行了。

该问题目前已经被锁定, 无法添加新回复