创建底部导航栏报错,tabBar 哪里做错了?

小程序 文章 2020-09-06 19:41 589 0 全屏看文

AI助手支持GPT4.0

创建底部导航栏报错,tabBar 哪里做错了?An error is reported when creating the bottom navigation bar. What is wrong with tabBar?

创建底部导航栏报错,tabBar 哪里做错了?

 

请问问,我哪里做错了,谢谢大家

Excuse me, where did I do wrong? Thank you

回答:

A德佑-黄勇¹³³³³⁰⁶⁵³⁸¹:

路径尽量避免使用中文吧

citizen four:

14行,逗号

拾忆:

少了个逗号吧。

孙占萌:不行,没有效果
拾忆:删掉,然后百度一下JSON结构。
孙占萌:删除了,还是不行
拾忆:13行最后补个逗号,还是那句话,百度一下JSON结构。
孙占萌:{
  "pages":[
    "pages/index/index",
    "pages/logs/logs"
  ],
  "window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "#fff",
    "navigationBarTitleText": "SUNZM-TEST",
    "navigationBarTextStyle":"black"
  },
  "style": "v2",{
  "sitemapLocation": "sitemap.json",
  }
  "tabBar":[
    "color": "#a9b7b7"
    "selectedColor": "#11cd6e",
    "borderStyle": "white",
    "list": [
      {
        "selectedIconPath": "images/首页.png",
        "iconPath": "images/首页.png",
        "pagePath": "pages/index/index",
        "text": "首页"
      },
      {
        "selectedIconPath": "images/分类.png",
        "iconPath": "images/分类.png",
        "pagePath": "pages/logs/logs",
        "text": "日志"
      },
      {
        "selectedIconPath": "images/对话信息.png",
        "iconPath": "images/对话信息.png",
        "pagePath": "pages/user/userInfo",
        "text": "我的信息"
      },
    {
        "selectedIconPath": "images/用户.png",
        "iconPath": "images/用户.png",
        "pagePath": "pages/user/userInfo",
        "text": "开心对话"
      }
   ]



]
孙占萌:我是初学者,请老师们直接直接帮改成正确的好吗? 谢谢您
拾忆:
孙占萌:刚才的报错没有了,多谢老师!
再请教您个问题,我在点击“预览”时候提示如下报错,我的PNG文件放错目录了吗?
拾忆:是的,肯定是路径不对,自己好好看文档和demo对比下
孙占萌:我去看看文档
青寒:建议给这些热心的老师点个“有用”和点赞~

-EOF-

AI助手支持GPT4.0