如图, list 的顺序,图片,都没有问题,但是底部的 tabbar 图标就是不显示
后来发现这里面两个属性,selectedIconPath 和 iconPath ,前者是选中,后者是没有选中的,我一开始测试的时候 只写了一个属性,就是没有选中的那个属性,所以才没有显示
正确写法是要两个都写的,问题不是什么大问题,记录一下,就是想提醒自己,写代码要仔细一点
"list": [{
"pagePath": "pages/list/index",
"selectedIconPath": "img/home.png",
"iconPath": "img/home1.png",
"text": "首页"
},
{
"pagePath": "pages/logs/logs",
"iconPath": "img/user1.png",
"selectedIconPath": "img/user.png",
"text": "日志"
}
]
现在就好了,选中和未选中是两张图