老师,我跟着老师敲,为什么报错了呢?
来源:2-14 加入tabbar选项卡
慕侠9181480
2019-09-21 19:32:18
{
"pages": [
"pages/welcome/welcome",
"pages/posts/posts",
"pages/posts/posts-detail/posts-detail",
"pages/demo/demo"
],
"window": {
"navigationBarBackgroundColor": "#405f80"
},
"tabBar": {
"list": [{
"pagePath": "pages/posts/posts"
// "text": "text",
// "iconPath": "iconPath",
// "selectedIconPath": "selectedIconPath"
},
{
"pagePath":"pages/demo/demo"
}]
}
}

1回答
好帮手慕言
2019-09-23
同学你好,多出一个花括号。
同学可以使用下方的代码测试。
"tabBar": {
"list": [
{
"pagePath": "pages/posts/post",
"text": "阅读",
"iconPath": "images/tab/yuedu.png",
"selectedIconPath": "images/tab/yuedu_hl.png"
},
{
"pagePath": "pages/demo/demo",
"text": "电影",
"iconPath": "images/tab/yuedu.png",
"selectedIconPath": "images/tab/yuedu_hl.png"
}
]
},如果帮助到了你,欢迎采纳~祝学习愉快~
相似问题